Reservations API
List
GET /reservations/get/
Filters:
services,providers,customers: comma-separated IDs;status: exact status;past=true: include past reservations;full=true: include reservation data properties, for exampleprice,tickets, the booking-form answers, andinternalNote.
Every reservation also has bookedFor: the names of the person the booking is for, as an array of strings, empty when the booking form has no such field or the customer left it empty.
internalNote is the staff's internal note. Customers never see it in TheBooking, but every token with the read scope reads it with full=true, and webhooks carry it. Keep that in mind before you pass reservation data to a system that customers can see.
Create
POST /reservations/add/
{
"serviceId": "s_demo",
"customerId": "c_demo",
"providerId": 12,
"availabilityId": "plan-slot-id",
"start": 1779190000,
"end": 1779193600,
"data": {
"tickets": 1
}
}
The endpoint requires a current canonical slot. It rejects unavailable, non-bookable, stale, or over-capacity requests with 403. A request for a paused provider returns 422 with Service provider is paused.
Edit and reschedule
POST /reservations/edit/ requires id.
Core fields use dedicated commands:
serviceIdcustomerIdproviderIdstartendstatus(pending,confirmed, orcancelled)
Changing date or provider invokes the coordinated reschedule flow. When TheBooking refuses the reschedule, for example because the new time is taken or the provider is paused, the request returns 422 with the message Reservation could not be rescheduled and a code that says why. Send custom fields inside data or as additional top-level keys.
Remove
POST /reservations/remove/?id=r_example
Only a pending reservation, or one that has already ended, can be removed; any other returns 403. To stop an upcoming appointment, set its status to cancelled instead: the record and its history remain.
Response
GET /reservations/get/ returns the reservations in response. The fields follow the Reservation schema of the API reference; values here are examples.
{
"status": "OK",
"response": [
{
"id": "r_demo",
"serviceId": "s_demo",
"customerId": "c_demo",
"providerId": 12,
"start": 1779190000,
"end": 1779193600,
"status": "confirmed",
"bookedFor": ["Leo Grant"]
}
]
}
Times are Unix timestamps. status is pending, confirmed, or cancelled. Creation returns the new id.
Errors
| HTTP status | When |
|---|---|
400 | The request is not valid. |
401 | The token is missing or not valid. |
403 | The token has no write scope; the slot is no longer valid, bookable, or has no room left (fetch availability again); or the reservation cannot be removed. |
404 | No reservation, service, or customer has this ID. |
422 | The provider is paused, or the reschedule was refused. |