Ir al contenido

Endpoints

Bookings & availability

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

Las rutas son relativas a la URL base. Cada tarjeta indica el permiso que necesita la llamada y cada parámetro, con su tipo y sus límites.

GET
/bookings

List bookings, newest first.

Permiso: calendar
Paginado

Parámetros de consulta

  • fromopcionalstring (ISO 8601 date-time with offset)

    Bookings that start at or after this time.

  • toopcionalstring (ISO 8601 date-time with offset)

    Bookings that start at or before this time.

  • statusopcionalstring

    Comma-separated list of statuses.

    Valores permitidos:pendingconfirmedcompletedno_showcancelledpending_completion

  • contact_idopcionalinteger

    Bookings of this contact.

  • serviceopcionalstring

    Service name (case-insensitive).

  • service_idopcionalinteger

    Bookings linked to this service.

GET
/bookings/:id

Retrieve a booking.

Permiso: calendar

Parámetros de ruta

  • idobligatoriointeger

    Booking ID.

POST
/bookings

Book an appointment for a contact.

Permiso: calendar

Cuerpo JSON

  • contact_idobligatoriointeger

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

  • date_timeobligatoriostring (ISO 8601 date-time with offset)

    Start time.

  • duration_minutesopcionalinteger

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

  • service_idopcionalinteger

    A service from GET /services.

  • service_typeopcionalstring

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

  • locationopcionalstring

    Up to 300 characters.

  • location_idopcionalinteger

    A business location.

  • notesopcionalstring

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

  • statusopcionalenum

    Default "pending".

    Valores permitidos:pendingconfirmedcompletedno_show

  • conversation_idopcionalinteger

    Link the booking to a conversation.

  • customer_nameopcionalstring

    Override the contact name, 1–200 characters.

  • customer_phoneopcionalstring

    Override the contact phone, 3–50 characters.

  • slot_tokenopcionalstring

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

  • override_availabilityopcionalboolean

    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.

Permiso: calendar

Parámetros de ruta

  • idobligatoriointeger

    Booking ID.

Cuerpo JSON

  • date_timeopcionalstring (ISO 8601 date-time with offset)

    New start time.

  • duration_minutesopcionalinteger

    5–1,440.

  • service_idopcionalinteger | null

    A service from GET /services.

  • service_typeopcionalstring | null

    Up to 200 characters.

  • locationopcionalstring

    Up to 300 characters.

  • location_idopcionalinteger

    A business location.

  • notesopcionalstring

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

  • statusopcionalenum

    New status.

    Valores permitidos:pendingconfirmedcompletedno_showcancelled

  • customer_nameopcionalstring

    1–200 characters.

  • customer_phoneopcionalstring

    3–50 characters.

  • slot_tokenopcionalstring

    The slot_token of the new slot.

  • override_availabilityopcionalboolean

    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.

Permiso: calendar

Parámetros de ruta

  • idobligatoriointeger

    Booking ID.

Cuerpo JSON

  • reasonopcionalstring

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

PUT
/bookings/:id/status

Set the booking status.

Permiso: calendar

Parámetros de ruta

  • idobligatoriointeger

    Booking ID.

Cuerpo JSON

  • statusobligatorioenum

    New status.

    Valores permitidos:confirmedcompletedno_showpending

GET
/availability/slots

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

Permiso: calendar

Parámetros de consulta

  • dateobligatoriostring (YYYY-MM-DD)

    The day to check.

  • service_idopcionalinteger

    Use this service's duration and rules.

  • durationopcionalinteger

    Slot length in minutes, 5–1,440.

  • location_idopcionalinteger

    A business location.

  • granularityopcionalinteger

    Minutes between slot starts, 5–120.

  • exclude_booking_idopcionalinteger

    Ignore this booking (when rescheduling it).

GET
/services

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

Cualquier miembro del equipo
Paginado
GET
/services/:id

Retrieve a service.

Cualquier miembro del equipo

Parámetros de ruta

  • idobligatoriointeger

    Service ID.