Skip to main content
GET
/
barbers
/
{id}
/
schedules
/
weekly
Get calculated schedule for a specific week
curl --request GET \
  --url https://api.guile.app/barbers/{id}/schedules/weekly \
  --header 'Authorization: Bearer <token>'
{
  "weekStartDate": "2023-12-25",
  "schedule": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "schedule": {
      "monday": {
        "workingHours": [
          {
            "startsAt": "<string>",
            "duration": "<string>"
          }
        ],
        "breaks": [
          {
            "startsAt": "<string>",
            "duration": "<string>",
            "description": "<string>"
          }
        ]
      },
      "tuesday": {
        "workingHours": [
          {
            "startsAt": "<string>",
            "duration": "<string>"
          }
        ],
        "breaks": [
          {
            "startsAt": "<string>",
            "duration": "<string>",
            "description": "<string>"
          }
        ]
      },
      "wednesday": {
        "workingHours": [
          {
            "startsAt": "<string>",
            "duration": "<string>"
          }
        ],
        "breaks": [
          {
            "startsAt": "<string>",
            "duration": "<string>",
            "description": "<string>"
          }
        ]
      },
      "thursday": {
        "workingHours": [
          {
            "startsAt": "<string>",
            "duration": "<string>"
          }
        ],
        "breaks": [
          {
            "startsAt": "<string>",
            "duration": "<string>",
            "description": "<string>"
          }
        ]
      },
      "friday": {
        "workingHours": [
          {
            "startsAt": "<string>",
            "duration": "<string>"
          }
        ],
        "breaks": [
          {
            "startsAt": "<string>",
            "duration": "<string>",
            "description": "<string>"
          }
        ]
      },
      "saturday": {
        "workingHours": [
          {
            "startsAt": "<string>",
            "duration": "<string>"
          }
        ],
        "breaks": [
          {
            "startsAt": "<string>",
            "duration": "<string>",
            "description": "<string>"
          }
        ]
      },
      "sunday": {
        "workingHours": [
          {
            "startsAt": "<string>",
            "duration": "<string>"
          }
        ],
        "breaks": [
          {
            "startsAt": "<string>",
            "duration": "<string>",
            "description": "<string>"
          }
        ]
      }
    },
    "isDefault": true,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "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>"
    }
  ],
  "weekSpecificSchedule": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "weekStartDate": "2023-12-25",
    "schedule": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    },
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

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.

Calculated schedule for a specific week

weekStartDate
string<date>
required

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

schedule
object
required

The calculated schedule for this week.

overrides
object[]
required

Schedule overrides affecting this week.

weekSpecificSchedule
object

Week-specific schedule used for this week, if any.