curl -X POST https://api.saoma.io/v1/venues/4242/bookings/STAYCATION-ABC123/cancel \
-H "Authorization: Bearer $SAOMA_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "reason": "Stay cancelled by the customer" }'
{
"data": {
"id": "7f1a9c3b-8d4e-4f21-a1b2-c3d4e5f60718",
"booking_number": 4832,
"status": "cancelled",
"external_reference": "staycation.ABC123",
"external_id": "STAYCATION-ABC123"
}
}
{
"error": "booking_not_cancellable"
}
Bookings
Cancel a booking
Cancel a booking you created.
POST
/
v1
/
venues
/
{venue_id}
/
bookings
/
{booking_id}
/
cancel
curl -X POST https://api.saoma.io/v1/venues/4242/bookings/STAYCATION-ABC123/cancel \
-H "Authorization: Bearer $SAOMA_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "reason": "Stay cancelled by the customer" }'
{
"data": {
"id": "7f1a9c3b-8d4e-4f21-a1b2-c3d4e5f60718",
"booking_number": 4832,
"status": "cancelled",
"external_reference": "staycation.ABC123",
"external_id": "STAYCATION-ABC123"
}
}
{
"error": "booking_not_cancellable"
}
Cancels a booking. Requires the
bookings:write scope.
The cancellation is total and triggers no refund in Saoma: you collected
the payment, so you handle the customer refund on your side. No cancellation
fee is recorded.
What happens in Saoma:
- the booking moves to
cancelledand its slot is released (you receive the updated day through the availability push); - the assigned therapist is notified;
- no email or SMS is sent to the customer.
Path parameters
Same value as for Create a booking:
venue UUID, slug, or your own id for the venue.
The Saoma booking id (UUID) returned at creation, or the
external_id you
sent when creating it.Body parameters
Response
Errors
| HTTP | Body | Meaning |
|---|---|---|
| 400 | { "error": "…" } | Malformed reason |
| 403 | { "error": "Insufficient scope" } | Key lacks bookings:write |
| 404 | { "error": "Venue not found" } | Unknown venue |
| 404 | { "error": "Booking not found" } | No booking with this id at this venue |
| 409 | { "error": "booking_not_cancellable" } | Already cancelled or completed |
Example
curl -X POST https://api.saoma.io/v1/venues/4242/bookings/STAYCATION-ABC123/cancel \
-H "Authorization: Bearer $SAOMA_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "reason": "Stay cancelled by the customer" }'
{
"data": {
"id": "7f1a9c3b-8d4e-4f21-a1b2-c3d4e5f60718",
"booking_number": 4832,
"status": "cancelled",
"external_reference": "staycation.ABC123",
"external_id": "STAYCATION-ABC123"
}
}
{
"error": "booking_not_cancellable"
}