Skip to main content
POST
/
barbers
/
{barberId}
/
appointments
Create an appointment as a barber
curl --request POST \
  --url https://api.guile.app/barbers/{barberId}/appointments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "location": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "shopName": "<string>"
  },
  "givenName": "<string>",
  "occursOn": "2023-11-07T05:31:56Z",
  "duration": "<string>",
  "cost": "456.78",
  "services": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "cost": "456.78",
      "duration": "<string>"
    }
  ],
  "surname": "<string>"
}
'
{
  "givenName": "<string>",
  "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>"
    }
  ],
  "occursOn": "2023-11-07T05:31:56Z",
  "duration": "<string>",
  "cost": "456.78",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "state": "pending",
  "paymentState": "pending",
  "totalAuthorized": "456.78",
  "totalCaptured": "456.78",
  "totalRefunded": "456.78",
  "surname": "<string>",
  "cancelationFeeType": "lateCancelation"
}

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 an appointment as a barber.

location
object
required

The location for this appointment.

givenName
string<text>
required

The given name of the customer.

Required string length: 1 - 55
occursOn
string<date-time>
required

The date and time the appointment occurs on. This is expressed in RFC 3339 YYYY-MM-DDThh:mm:ss.sssZ date-time format in UTC time zone.

duration
string<duration>
required

The duration of the appointment. The value is an ISO 8601 duration string.

For example, an appointment lasting 30 minutes would be represented as PT30M.

cost
string<decimal>
required

The cost of the appointment, excluding any tips, fees or taxes.

Example:

"456.78"

services
object[]

The services for this appointment, if applicable.

surname
string<text>

The surname of the customer, if known.

Required string length: 1 - 55

Response

Created.

A representation of an appointment.

givenName
string<text>
required

The given name of the customer.

Required string length: 1 - 55
barber
object
required

The barber for this appointment.

location
object
required

The location for this appointment.

services
object[]
required

The services for this appointment.

occursOn
string<date-time>
required

The date and time the appointment occurs on. This is expressed in RFC 3339 YYYY-MM-DDThh:mm:ss.sssZ date-time format in UTC time zone.

duration
string<duration>
required

The duration of the appointment. The value is an ISO 8601 duration string.

For example, an appointment lasting 30 minutes would be represented as PT30M.

cost
string<decimal>
required

The cost of the appointment, excluding any tips, fees or taxes.

Example:

"456.78"

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.

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.

state
enum<string>
required

The appointment state. This is derived and immutable.

Available options:
pending,
scheduled,
canceled,
completed
paymentState
enum<string>
required

The state state of the appointment. This is derived and immutable.

Available options:
pending,
authorized,
paid,
failed
totalAuthorized
string<decimal>
required

The sum amount of authorized payments for this appointment.

Example:

"456.78"

totalCaptured
string<decimal>
required

The sum amount of captured payments for this appointment.

Example:

"456.78"

totalRefunded
string<decimal>
required

The sum amount of refunded payments for this appointment.

Example:

"456.78"

surname
string<text>

The surname of the customer, if known.

Required string length: 1 - 55
cancelationFeeType
enum<string>

If included, the type of cancelation fee incurred. This is derived and immutable.

Available options:
lateCancelation,
noShow