انتقل إلى المحتوى

الـ Endpoints

Bookings & availability

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

المسارات نسبية للـ base URL. كل كارت بيوضّح الصلاحية اللي الاستدعاء محتاجها وكل parameter، مع نوعه وحدوده.

GET
/bookings

List bookings, newest first.

الصلاحية: calendar
مقسّم لصفحات

معاملات الاستعلام

  • 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

الـ body بصيغة 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.

الـ body بصيغة 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.

الـ body بصيغة 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.

الـ body بصيغة 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

معاملات الاستعلام

  • 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.