POST /api/v1/bookings/{bookingId}/cancel
Cancels a booking. The slot is freed, the money does not move: no payment line is removed, no paid total is recomputed, no financial status is rewritten. A refund is a different operation.
| Role in the organization | This endpoint |
|---|---|
owner | Allowed |
admin | Allowed |
member | Allowed |
curl -X POST -H "x-api-key: $VILLASLOT_API_KEY" \
"https://villaslot.app/api/v1/bookings/5b2c…/cancel"200 OK — the booking, status: "CANCELLED".422 Unprocessable Entity — the booking is already cancelled, completed or expired.401 Unauthorized — missing or invalid key, or a key whose bearer left the organization.404 Not Found — unknown id, or an id belonging to another organization. The two are
deliberately indistinguishable.429 Too Many Requests — over 120 requests in a minute for this key.Irreversible. A cancelled booking is not re-opened; the customer has to be booked again. An agent does not cancel without an explicit human go-ahead for that exact booking.