View as Markdown

Retrieving and cancelling a booking

With these endpoints your client can show a confirmed booking and cancel it. Cliento's own "manage booking" page uses the same endpoints. That is the page linked from Cliento's confirmation email and SMS.

The {ref} in the URL

The {ref} in the URL is the cbUuid from the reserve and confirm responses, encoded as Base64. This is the same format Cliento's own confirmation links use. It is not cbRef, the short reference shown to the customer.

echo -n "4674c65b-a64f-43a5-94c7-af3b59053cc6" | base64
# NDY3NGM2NWItYTY0Zi00M2E1LTk0YzctYWYzYjU5MDUzY2M2

Store the cbUuid if your client needs to manage bookings later. No other identifier is supported.

The ref is the only credential: anyone with the ref can view and cancel the booking, just like anyone with the confirmation email can. Treat it like a secret and never expose refs of other customers' bookings.

Retrieve a booking

GET https://apibk.cliento.com/api/v2/booking/{ref}

Returns the booking, with a flag for whether it is cancelled. The response also has the account settings needed to render a manage-booking page.

Response 200

{
  "created": "2026-10-23T11:41:24+02:00",
  "date": "2026-10-30",
  "time": "09:00:00",
  "resource": "",
  "customer": "Test Testsson",
  "phoneNumber": "+46701234567",
  "customerEmail": "test@example.com",
  "cancelled": false,
  "services": [
    { "id": 68811, "name": "Women's haircut", "price": 595.0, "priceFrom": false, "duration": 45 }
  ],
  "payment": null,
  "prefs": { "...": "same preference object as in settings, shortened here" }
}
FieldDescription
createdWhen the booking was made, in the account's time zone
date, timeStart of the booking, in the account's time zone
resourcePublic name of the booked resource, may be empty
customer, phoneNumber, customerEmailThe customer details from the booking
cancelledtrue when the booking is cancelled
servicesThe booked services, same shape as in the reserve response
paymentThe online payment, or null when the booking was not paid online
prefsThe account preferences, see settings

When the booking was paid online, payment has these fields, among others: paymentProvider, paymentStatus, amount, refundedAmount, transactionDate and refundDate. refundDate is null until a refund is made. See Payments.

The prefs object tells you whether cancellation is possible:

PreferenceMeaning
web_allowCancellationThe account allows customers to cancel online
web_cancelUpToMinutesCancellation closes this many minutes before the booking starts

The cancellation deadline is the booking start time minus web_cancelUpToMinutes. Use it to decide whether to show a cancel button, and to explain why cancellation is closed. Check cancelled as well: a cancelled booking cannot be cancelled again.

Errors

StatusWhen
404The ref does not match a booking, or the account no longer exists

A malformed ref can also produce other error statuses. Treat every non-200 response as "booking not available" rather than branching on the exact status.

Cancel a booking

DELETE https://apibk.cliento.com/api/v2/booking/{ref}

Cancels the booking. Cliento sends cancellation notifications to the customer according to the account settings. A booking that was paid online with a completed payment is refunded automatically. How long the refund takes depends on the payment provider: Swish refunds are immediate, card refunds take a few days.

Response 204

No body. Cancelling an already cancelled booking is also 204, without repeating notifications or refunds, so the call is safe to retry.

Errors

StatusWhen
403Cancellation is not allowed: the account has online cancellation off, or the cancellation deadline has passed
404The ref does not match a booking, or the account no longer exists

After a successful cancellation the slot opens up for other customers. Retrieving the booking again returns it with "cancelled": true.

Rescheduling

There is no reschedule endpoint. To move a booking, cancel it and create a new booking through the regular booking flow. Note that the cancellation policy applies: past the cancellation deadline the booking cannot be moved either.