Skip to main content
GET
/
barbers
/
{id}
/
workingHours
Calculate working hours for a week
curl --request GET \
  --url https://api.guile.app/barbers/{id}/workingHours \
  --header 'Authorization: Bearer <token>'
{
  "weekStartDate": "2023-12-25",
  "weekEndDate": "2023-12-25",
  "dailyHours": [
    {
      "date": "2023-12-25",
      "dayOfWeek": "monday",
      "workingDuration": "<string>",
      "totalBreakDuration": "<string>"
    }
  ],
  "overrides": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "startsOn": "2023-12-25",
      "endsOn": "2023-12-25",
      "type": "timeOff",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "startsAt": "<string>",
      "endsAt": "<string>",
      "description": "<string>"
    }
  ],
  "total": "<string>"
}

Path Parameters

id
string<uuid>
required

The unique, opaque system identifier for a resource. This case-sensitive ID is also used as path parameters in URLs or in other properties or parameters that reference a resource by ID rather than URL.

Query Parameters

weekStartDate
string
required

Any date within the desired week. This will be adjusted to the start of that week. A date, expressed in YYYY-MM-DD RFC 3339 date format.

Response

Ok. The operation succeeded.

Weekly working hours calculation

weekStartDate
string<date>
required

Start date of the week, in RFC 3339 date format (YYYY-MM-DD).

weekEndDate
string<date>
required

End date of the week, in RFC 3339 date format (YYYY-MM-DD).

dailyHours
object[]
required

Daily working hours breakdown

overrides
object[]
required

Applied overrides for this week

total
string<duration>
required

Total working duration for the week