İçeriğe geç

Endpoint'ler

Bookings & availability

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

Yollar temel URL'ye göredir. Her kart, çağrının gerektirdiği izni ve her parametreyi türü ve sınırlarıyla listeler.

GET
/bookings

List bookings, newest first.

İzin: calendar
Sayfalı

Sorgu parametreleri

  • fromisteğe bağlıstring (ISO 8601 date-time with offset)

    Bookings that start at or after this time.

  • toisteğe bağlıstring (ISO 8601 date-time with offset)

    Bookings that start at or before this time.

  • statusisteğe bağlıstring

    Comma-separated list of statuses.

    İzin verilen değerler:pendingconfirmedcompletedno_showcancelledpending_completion

  • contact_idisteğe bağlıinteger

    Bookings of this contact.

  • serviceisteğe bağlıstring

    Service name (case-insensitive).

  • service_idisteğe bağlıinteger

    Bookings linked to this service.

GET
/bookings/:id

Retrieve a booking.

İzin: calendar

Yol parametreleri

  • idzorunluinteger

    Booking ID.

POST
/bookings

Book an appointment for a contact.

İzin: calendar

JSON gövdesi

  • contact_idzorunluinteger

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

  • date_timezorunlustring (ISO 8601 date-time with offset)

    Start time.

  • duration_minutesisteğe bağlıinteger

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

  • service_idisteğe bağlıinteger

    A service from GET /services.

  • service_typeisteğe bağlıstring

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

  • locationisteğe bağlıstring

    Up to 300 characters.

  • location_idisteğe bağlıinteger

    A business location.

  • notesisteğe bağlıstring

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

  • statusisteğe bağlıenum

    Default "pending".

    İzin verilen değerler:pendingconfirmedcompletedno_show

  • conversation_idisteğe bağlıinteger

    Link the booking to a conversation.

  • customer_nameisteğe bağlıstring

    Override the contact name, 1–200 characters.

  • customer_phoneisteğe bağlıstring

    Override the contact phone, 3–50 characters.

  • slot_tokenisteğe bağlıstring

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

  • override_availabilityisteğe bağlıboolean

    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.

İzin: calendar

Yol parametreleri

  • idzorunluinteger

    Booking ID.

JSON gövdesi

  • date_timeisteğe bağlıstring (ISO 8601 date-time with offset)

    New start time.

  • duration_minutesisteğe bağlıinteger

    5–1,440.

  • service_idisteğe bağlıinteger | null

    A service from GET /services.

  • service_typeisteğe bağlıstring | null

    Up to 200 characters.

  • locationisteğe bağlıstring

    Up to 300 characters.

  • location_idisteğe bağlıinteger

    A business location.

  • notesisteğe bağlıstring

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

  • statusisteğe bağlıenum

    New status.

    İzin verilen değerler:pendingconfirmedcompletedno_showcancelled

  • customer_nameisteğe bağlıstring

    1–200 characters.

  • customer_phoneisteğe bağlıstring

    3–50 characters.

  • slot_tokenisteğe bağlıstring

    The slot_token of the new slot.

  • override_availabilityisteğe bağlıboolean

    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.

İzin: calendar

Yol parametreleri

  • idzorunluinteger

    Booking ID.

JSON gövdesi

  • reasonisteğe bağlıstring

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

PUT
/bookings/:id/status

Set the booking status.

İzin: calendar

Yol parametreleri

  • idzorunluinteger

    Booking ID.

JSON gövdesi

  • statuszorunluenum

    New status.

    İzin verilen değerler:confirmedcompletedno_showpending

GET
/availability/slots

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

İzin: calendar

Sorgu parametreleri

  • datezorunlustring (YYYY-MM-DD)

    The day to check.

  • service_idisteğe bağlıinteger

    Use this service's duration and rules.

  • durationisteğe bağlıinteger

    Slot length in minutes, 5–1,440.

  • location_idisteğe bağlıinteger

    A business location.

  • granularityisteğe bağlıinteger

    Minutes between slot starts, 5–120.

  • exclude_booking_idisteğe bağlıinteger

    Ignore this booking (when rescheduling it).

GET
/services

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

Herhangi bir ekip üyesi
Sayfalı
GET
/services/:id

Retrieve a service.

Herhangi bir ekip üyesi

Yol parametreleri

  • idzorunluinteger

    Service ID.