Skip to main content
POST
/
barbers
/
{barberId}
/
recurringAppointments
Create a recurring appointment
curl --request POST \
  --url https://api.guile.app/barbers/{barberId}/recurringAppointments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "frequency": "daily",
  "startDate": "2023-12-25",
  "active": true,
  "customerReference": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "givenName": "<string>",
    "surname": "<string>"
  },
  "location": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "shopName": "<string>"
  },
  "services": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "cost": "456.78",
      "duration": "<string>"
    }
  ],
  "endDate": "2023-12-25"
}
'
{
  "frequency": "daily",
  "startDate": "2023-12-25",
  "active": true,
  "customerReference": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "givenName": "<string>",
    "surname": "<string>"
  },
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "barber": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "givenName": "<string>",
    "surname": "<string>",
    "preferredName": "<string>"
  },
  "location": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "shopName": "<string>"
  },
  "services": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "cost": "456.78",
      "duration": "<string>"
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "endDate": "2023-12-25"
}

Headers

Idempotency-Key
string
required

A client-generated idempotency key to ensure operations are only processed once even if a client retries the operation. The V4 UUID format, as defined in RFC 4122, is recommended to avoid collisions but is not required.

Path Parameters

barberId
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 body for creating a recurring appointment. Only barbers can create recurring appointments.

frequency
enum<string>
required

The frequency at which appointments recur. Appointments are created in the background by the system based on this frequency.

Available options:
daily,
weekly,
biweekly,
semimonthly,
monthly,
quarterly,
annually
startDate
string<date>
required

The start date for the recurring appointment series. Appointments will be created starting from this date.

active
boolean
default:true
required

Whether the recurring appointment is active. When inactive, no new appointments will be created for this series.

customerReference
object
required

A reference to the customer for this recurring appointment.

location
object
required

The location for appointments in this series.

services
object[]
required

The services for appointments in this series.

endDate
string<date>

The end date for the recurring appointment series, if specified. If not specified, appointments are created up to one year from the start date or current date, whichever is later.

Response

Created.

A representation of a recurring appointment.

frequency
enum<string>
required

The frequency at which appointments recur. Appointments are created in the background by the system based on this frequency.

Available options:
daily,
weekly,
biweekly,
semimonthly,
monthly,
quarterly,
annually
startDate
string<date>
required

The start date for the recurring appointment series. Appointments will be created starting from this date.

active
boolean
required

Whether the recurring appointment is active. When inactive, no new appointments will be created for this series.

customerReference
object
required

A reference to the customer for this recurring appointment.

id
string<uuid>
required

The unique identifier for this recurring appointment.

barber
object
required

A reference to the barber for this recurring appointment.

location
object
required

The location for appointments in this series.

services
object[]
required

The services for appointments in this series.

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.

endDate
string<date>

The end date for the recurring appointment series, if specified. If not specified, appointments are created up to one year from the start date or current date, whichever is later.