Skip to main content
PUT
/
barbers
/
{id}
/
schedules
/
week-specific
Set schedule for a specific week
curl --request PUT \
  --url https://api.guile.app/barbers/{id}/schedules/week-specific \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "weekStartDate": "2023-12-25",
  "scheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "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.

Body

application/json

Request to set a week-specific schedule

weekStartDate
string<date>
required

Start date of the week (Monday), in RFC 3339 date format (YYYY-MM-DD). The provided date will be adjusted to the Monday of that week.

scheduleId
string<uuid>
required

ID of the schedule to assign to this week

Response

Ok. The operation succeeded.

A schedule assigned to a specific week

id
string<uuid>
required

Unique identifier for this assignment

weekStartDate
string<date>
required

Start date of the week (Monday), in RFC 3339 date format (YYYY-MM-DD). The provided date will be adjusted to the Monday of that week.

schedule
object
required

Reference to the assigned schedule

createdAt
string<date-time>
required

The date-time when this resource was created, in RFC 3339 date-time YYYY-MM-DDThh:mm:ss.sssZ format, UTC. This is derived and immutable.

updatedAt
string<date-time>
required

The date-time when this resource was updated, in RFC 3339 date-time YYYY-MM-DDThh:mm:ss.sssZ format, UTC. This is derived and immutable.