Μετάβαση στο περιεχόμενο

Endpoints

Bookings & availability

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

Οι διαδρομές είναι σχετικές με το βασικό URL. Κάθε κάρτα δείχνει το δικαίωμα που απαιτεί η κλήση και κάθε παράμετρο, με τον τύπο και τα όριά της.

GET
/bookings

List bookings, newest first.

Δικαίωμα: calendar
Με σελιδοποίηση

Παράμετροι query

  • fromπροαιρετικόstring (ISO 8601 date-time with offset)

    Bookings that start at or after this time.

  • toπροαιρετικόstring (ISO 8601 date-time with offset)

    Bookings that start at or before this time.

  • statusπροαιρετικόstring

    Comma-separated list of statuses.

    Επιτρεπτές τιμές:pendingconfirmedcompletedno_showcancelledpending_completion

  • contact_idπροαιρετικόinteger

    Bookings of this contact.

  • serviceπροαιρετικόstring

    Service name (case-insensitive).

  • service_idπροαιρετικόinteger

    Bookings linked to this service.

GET
/bookings/:id

Retrieve a booking.

Δικαίωμα: calendar

Παράμετροι διαδρομής

  • idυποχρεωτικόinteger

    Booking ID.

POST
/bookings

Book an appointment for a contact.

Δικαίωμα: calendar

Σώμα JSON

  • contact_idυποχρεωτικόinteger

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

  • date_timeυποχρεωτικόstring (ISO 8601 date-time with offset)

    Start time.

  • duration_minutesπροαιρετικόinteger

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

  • service_idπροαιρετικόinteger

    A service from GET /services.

  • service_typeπροαιρετικόstring

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

  • locationπροαιρετικόstring

    Up to 300 characters.

  • location_idπροαιρετικόinteger

    A business location.

  • notesπροαιρετικόstring

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

  • statusπροαιρετικόenum

    Default "pending".

    Επιτρεπτές τιμές:pendingconfirmedcompletedno_show

  • conversation_idπροαιρετικόinteger

    Link the booking to a conversation.

  • customer_nameπροαιρετικόstring

    Override the contact name, 1–200 characters.

  • customer_phoneπροαιρετικόstring

    Override the contact phone, 3–50 characters.

  • slot_tokenπροαιρετικόstring

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

  • override_availabilityπροαιρετικό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.

Δικαίωμα: calendar

Παράμετροι διαδρομής

  • idυποχρεωτικόinteger

    Booking ID.

Σώμα JSON

  • date_timeπροαιρετικόstring (ISO 8601 date-time with offset)

    New start time.

  • duration_minutesπροαιρετικόinteger

    5–1,440.

  • service_idπροαιρετικόinteger | null

    A service from GET /services.

  • service_typeπροαιρετικόstring | null

    Up to 200 characters.

  • locationπροαιρετικόstring

    Up to 300 characters.

  • location_idπροαιρετικόinteger

    A business location.

  • notesπροαιρετικόstring

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

  • statusπροαιρετικόenum

    New status.

    Επιτρεπτές τιμές:pendingconfirmedcompletedno_showcancelled

  • customer_nameπροαιρετικόstring

    1–200 characters.

  • customer_phoneπροαιρετικόstring

    3–50 characters.

  • slot_tokenπροαιρετικόstring

    The slot_token of the new slot.

  • override_availabilityπροαιρετικό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.

Δικαίωμα: calendar

Παράμετροι διαδρομής

  • idυποχρεωτικόinteger

    Booking ID.

Σώμα JSON

  • reasonπροαιρετικόstring

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

PUT
/bookings/:id/status

Set the booking status.

Δικαίωμα: calendar

Παράμετροι διαδρομής

  • idυποχρεωτικόinteger

    Booking ID.

Σώμα JSON

  • statusυποχρεωτικόenum

    New status.

    Επιτρεπτές τιμές:confirmedcompletedno_showpending

GET
/availability/slots

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

Δικαίωμα: calendar

Παράμετροι query

  • dateυποχρεωτικόstring (YYYY-MM-DD)

    The day to check.

  • service_idπροαιρετικόinteger

    Use this service's duration and rules.

  • durationπροαιρετικόinteger

    Slot length in minutes, 5–1,440.

  • location_idπροαιρετικόinteger

    A business location.

  • granularityπροαιρετικόinteger

    Minutes between slot starts, 5–120.

  • exclude_booking_idπροαιρετικόinteger

    Ignore this booking (when rescheduling it).

GET
/services

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

Οποιοδήποτε μέλος της ομάδας
Με σελιδοποίηση
GET
/services/:id

Retrieve a service.

Οποιοδήποτε μέλος της ομάδας

Παράμετροι διαδρομής

  • idυποχρεωτικόinteger

    Service ID.