Skip to main content

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.

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.

Edit and reschedule​

POST /reservations/edit/ requires id.

Core fields use dedicated commands:

  • serviceId
  • customerId
  • providerId
  • start
  • end
  • status (pending, confirmed, or cancelled)

Changing date or provider invokes the coordinated reschedule flow. 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"
}
]
}

Times are Unix timestamps. status is pending, confirmed, or cancelled. Creation returns the new id.

Errors​

HTTP statusWhen
400The request is not valid.
401The token is missing or not valid.
403The 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.
404No reservation, service, or customer has this ID.