Cancel the whole booking as its buyer, at the refund the guest was shown
const url = 'https://quikstik-core.fly.dev/account/bookings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cancellation';const options = { method: 'POST', headers: { 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"acknowledged_refund_minor":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://quikstik-core.fly.dev/account/bookings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cancellation \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --data '{ "acknowledged_refund_minor": 1 }'Issues the operator CancelBookingCommand { reason: customer_initiated, units: null } with the
guest as actor, through the same cancel sink as POST /cancellations; the refund fraction is
the tenant schedule’s tier at the moment of the call. The body carries only the figure the
guest was shown: the server recomputes it, and a different current figure is
409 quote_changed with the current quote (never a cancellation on a stale number).
Idempotency-Key is required (the ledger’s own key is derived per booking, so a reused client key can never swallow another booking’s refund). Whole booking only — rider removal is the amendment lane. The
weather waiver is an operator action and is not promised here.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Idempotency key for the command envelope. A retry with the same key is a no-op.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The refund the guest was shown. Never posted — only compared to the server’s figure.
Example generated
{ "acknowledged_refund_minor": 1}Responses
Section titled “Responses”Cancelled; the ledger will post exactly refund_minor when it drains the event
object
Example
{ "status": "cancelled"}Malformed body
object
Example generated
{ "reason": "example"}Missing or invalid session bearer token
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}The session’s effect authority does not cover this operation
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}Expired, consumed, unknown, or unresolvable — indistinguishable by design
object
Example generated
{ "reason": "example"}quote_changed (body carries current) or not_cancellable (detail:
already_cancelled | ota_booking | departed | needs_staff)
object
Stable machine reason
Finer machine code under reason
object
Minor units the card gets back
Hours-before-departure the applying tier requires; absent when no tier applies
Last instant this refund still applies; absent when no tier applies
Example generated
{ "reason": "example", "detail": "example", "current": { "booking_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "refund_minor": 1, "refund_bps": 1, "tier_hours": 1, "deadline_at": "2026-04-15T12:00:00Z", "currency": "example" }}No durable backend is wired for this operation (fail-closed)
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}