Aller au contenu

Endpoints

Bookings & availability

Appointments, free slots and the service catalog. Writes follow the same availability rules as the in-app Calendar.

Les chemins sont relatifs à l’URL de base. Chaque carte indique la permission requise par l’appel et chaque paramètre, avec son type et ses limites.

GET
/bookings

List bookings, newest first.

Permission : calendar
Paginé

Paramètres de requête

  • fromfacultatifstring (ISO 8601 date-time with offset)

    Bookings that start at or after this time.

  • tofacultatifstring (ISO 8601 date-time with offset)

    Bookings that start at or before this time.

  • statusfacultatifstring

    Comma-separated list of statuses.

    Valeurs autorisées :pendingconfirmedcompletedno_showcancelledpending_completion

  • contact_idfacultatifinteger

    Bookings of this contact.

  • servicefacultatifstring

    Service name (case-insensitive).

  • service_idfacultatifinteger

    Bookings linked to this service.

GET
/bookings/:id

Retrieve a booking.

Permission : calendar

Paramètres de chemin

  • idobligatoireinteger

    Booking ID.

POST
/bookings

Book an appointment for a contact.

Permission : calendar

Corps JSON

  • contact_idobligatoireinteger

    The customer. Name and phone come from the contact unless you override them.

  • date_timeobligatoirestring (ISO 8601 date-time with offset)

    Start time.

  • duration_minutesfacultatifinteger

    5–1,440. Defaults to the service duration, else 60.

  • service_idfacultatifinteger

    A service from GET /services.

  • service_typefacultatifstring

    Service name, up to 200 characters. Defaults to the service title.

  • locationfacultatifstring

    Up to 300 characters.

  • location_idfacultatifinteger

    A business location.

  • notesfacultatifstring

    Up to 5,000 characters. Added to the booking notes.

  • statusfacultatifenum

    Default "pending".

    Valeurs autorisées :pendingconfirmedcompletedno_show

  • conversation_idfacultatifinteger

    Link the booking to a conversation.

  • customer_namefacultatifstring

    Override the contact name, 1–200 characters.

  • customer_phonefacultatifstring

    Override the contact phone, 3–50 characters.

  • slot_tokenfacultatifstring

    The slot_token of a slot from GET /availability/slots.

  • override_availabilityfacultatifboolean

    Skip the availability check, like a manual entry in the Calendar.

  • Answers 201 with the booking.
PATCH
/bookings/:id

Change booking details. A new date_time reschedules it.

Permission : calendar

Paramètres de chemin

  • idobligatoireinteger

    Booking ID.

Corps JSON

  • date_timefacultatifstring (ISO 8601 date-time with offset)

    New start time.

  • duration_minutesfacultatifinteger

    5–1,440.

  • service_idfacultatifinteger | null

    A service from GET /services.

  • service_typefacultatifstring | null

    Up to 200 characters.

  • locationfacultatifstring

    Up to 300 characters.

  • location_idfacultatifinteger

    A business location.

  • notesfacultatifstring

    Up to 5,000 characters. Added as a new note.

  • statusfacultatifenum

    New status.

    Valeurs autorisées :pendingconfirmedcompletedno_showcancelled

  • customer_namefacultatifstring

    1–200 characters.

  • customer_phonefacultatifstring

    3–50 characters.

  • slot_tokenfacultatifstring

    The slot_token of the new slot.

  • override_availabilityfacultatifboolean

    Skip the availability check.

  • Send at least one field besides slot_token, override_availability and location_id.
POST
/bookings/:id/cancel

Cancel a booking. Cancelling an already cancelled booking returns it unchanged.

Permission : calendar

Paramètres de chemin

  • idobligatoireinteger

    Booking ID.

Corps JSON

  • reasonfacultatifstring

    Up to 1,000 characters, saved as a booking note.

PUT
/bookings/:id/status

Set the booking status.

Permission : calendar

Paramètres de chemin

  • idobligatoireinteger

    Booking ID.

Corps JSON

  • statusobligatoireenum

    New status.

    Valeurs autorisées :confirmedcompletedno_showpending

GET
/availability/slots

List bookable slots on one day. Each slot has start, end and slot_token.

Permission : calendar

Paramètres de requête

  • dateobligatoirestring (YYYY-MM-DD)

    The day to check.

  • service_idfacultatifinteger

    Use this service's duration and rules.

  • durationfacultatifinteger

    Slot length in minutes, 5–1,440.

  • location_idfacultatifinteger

    A business location.

  • granularityfacultatifinteger

    Minutes between slot starts, 5–120.

  • exclude_booking_idfacultatifinteger

    Ignore this booking (when rescheduling it).

GET
/services

List business services (name, duration, price, category).

Tout membre de l’équipe
Paginé
GET
/services/:id

Retrieve a service.

Tout membre de l’équipe

Paramètres de chemin

  • idobligatoireinteger

    Service ID.