Skip to main content
POST
/
barbers
/
{id}
/
schedules
/
default
Set default schedule
curl --request POST \
  --url https://api.guile.app/barbers/{id}/schedules/default \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "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"
}

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 default schedule

id
string<uuid>
required

Identifier of the schedule to set as default

Response

Ok. The operation succeeded.

A barber schedule resource

id
string<uuid>
required

Unique identifier for the schedule

name
string
required

The name for this schedule

Maximum string length: 100
schedule
object
required

The daily schedule configuration

isDefault
boolean
required

Indicates if this is the default 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.