Skip to content

What cancelling or rebooking would do to the money — before the confirm tap

GET
/bookings/{booking_id}/quotes
curl --request GET \
--url 'https://quikstik-core.fly.dev/bookings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/quotes?action=cancel' \
--header 'Authorization: Bearer <token>' \
--header 'x-tenant-id: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0'

Read-only. action=amend&riders=-k quotes a rider leaving a booking with the amendment lane’s own arithmetic (refund_net_minor + refund_tax_minor = refund_minor; riders must be negative). action=cancel[&waiver=hardship|rain_rule|goodwill|flight_disruption] returns the refund the policy lane will post (refund_bps from resolve_cancellation_split, refund_minor from the ledger-tie arithmetic the self-serve quote uses; null + needs_staff when the journal is not the plain capture shape, governed_by_channel for an OTA-governed booking). The lane that applies it is POST /bookings/{booking_id}/amendments {cancel} (idempotency key required; effective_date = lane.effective_date, today in the shop’s business calendar). action=rebook&new_variant_id=&new_start_time= returns the priced delta (delta_net/tax/gross_minor, even) from the same pricing POST /rebookings revisions use. Nothing is stored.

booking_id
required
string format: uuid
x-tenant-id
required
string format: uuid

Tenant identifier (UUID).

Authn/authz semantics are intentionally TBD for this contract slice; this header exists to keep the contract explicitly multi-tenant from day 0.

action
required
string
Allowed values: cancel rebook amend
waiver
string
new_variant_id
string format: uuid
new_start_time
string format: date-time

The consequence.

Media typeapplication/json
object
key
additional properties
any

Example generated

{}

Missing or invalid session bearer token

Media typeapplication/json
object
reason
required

Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).

string

Example

{
"reason": "sold_out"
}

The session’s effect authority does not cover this operation

Media typeapplication/json
object
reason
required

Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).

string

Example

{
"reason": "sold_out"
}

No such booking.

already_cancelled or a rebook refusal (needs_staff, party_unknown).

bad_action, unknown_waiver_reason, waiver_not_allowed, rebook_needs_variant_and_start, start_in_past, no_rate_for_slot.

No durable backend is wired for this operation (fail-closed)

Media typeapplication/json
object
reason
required

Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).

string

Example

{
"reason": "sold_out"
}