The booking's policy snapshot and what it allows now
const url = 'https://quikstik-core.fly.dev/bookings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/policy';const options = { method: 'GET', headers: { 'x-tenant-id': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://quikstik-core.fly.dev/bookings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/policy \ --header 'Authorization: Bearer <token>' \ --header 'x-tenant-id: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0'The one read the portal, the operator app and the agent use to say “you may cancel for $X”.
Returns the policy the booking was sold under (its snapshot — later edits to the merchant’s
policy never change it) and the resolved verdicts now: whole hours_before departure
(rounded toward less notice), the cancel outcome and the reschedule outcome, each with the
effective fee, refund_as and who governs (merchant | ota).
source: snapshot is the booking’s own row; source: legacy_schedule is a booking sold before
the policy model (not yet backfilled), answered from the merchant’s T-minus schedule exactly
as the cancel path does. A cancelled booking still answers (status: cancelled).
Auth: a staff session, an operator key scoped bookings.read, or a customer session that owns
the booking (the account reach rule). Any other booking id is 404 booking_not_found for a
customer — existence is never confirmed. Cache-Control: private, no-store.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”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.
Responses
Section titled “Responses”The snapshot and the verdicts now
object
Null when source is legacy_schedule.
object
object
The resolved rule set. Every field is present — nothing is left to inherit.
object
Tiers are most-notice-first; the most generous qualifying tier applies, else below.
object
object
One rule’s verdict. For a cancel, refund_all/no_refund/refund are the refund fraction; for a reschedule refund_all means a free change and no_refund means not allowed. ota_governed is produced by resolution for a booking whose channel governs it and is never stored in a document. refund carries bps; fee carries fee.
object
none as the inner fee of a fee outcome means “use the policy’s own fee”. flat carries minor + currency; percent carries bps; keep_deposit carries nothing.
object
object
object
One rule’s verdict. For a cancel, refund_all/no_refund/refund are the refund fraction; for a reschedule refund_all means a free change and no_refund means not allowed. ota_governed is produced by resolution for a booking whose channel governs it and is never stored in a document. refund carries bps; fee carries fee.
object
none as the inner fee of a fee outcome means “use the policy’s own fee”. flat carries minor + currency; percent carries bps; keep_deposit carries nothing.
object
One rule’s verdict. For a cancel, refund_all/no_refund/refund are the refund fraction; for a reschedule refund_all means a free change and no_refund means not allowed. ota_governed is produced by resolution for a booking whose channel governs it and is never stored in a document. refund carries bps; fee carries fee.
object
none as the inner fee of a fee outcome means “use the policy’s own fee”. flat carries minor + currency; percent carries bps; keep_deposit carries nothing.
object
none as the inner fee of a fee outcome means “use the policy’s own fee”. flat carries minor + currency; percent carries bps; keep_deposit carries nothing.
object
object
object
One rule’s verdict. For a cancel, refund_all/no_refund/refund are the refund fraction; for a reschedule refund_all means a free change and no_refund means not allowed. ota_governed is produced by resolution for a booking whose channel governs it and is never stored in a document. refund carries bps; fee carries fee.
object
none as the inner fee of a fee outcome means “use the policy’s own fee”. flat carries minor + currency; percent carries bps; keep_deposit carries nothing.
object
object
Rendering hints only; the full page renders from the rules.
object
True when the booking’s channel governs (verdicts are ota_governed).
object
RFC3339 UTC - the booking’s agreed start (the agreement chain’s; an amendment may have moved it from the departure’s). Notice is measured from it, as the cancel path does.
Whole hours, rounded toward less notice.
object
One rule’s verdict. For a cancel, refund_all/no_refund/refund are the refund fraction; for a reschedule refund_all means a free change and no_refund means not allowed. ota_governed is produced by resolution for a booking whose channel governs it and is never stored in a document. refund carries bps; fee carries fee.
object
none as the inner fee of a fee outcome means “use the policy’s own fee”. flat carries minor + currency; percent carries bps; keep_deposit carries nothing.
object
none as the inner fee of a fee outcome means “use the policy’s own fee”. flat carries minor + currency; percent carries bps; keep_deposit carries nothing.
object
object
object
One rule’s verdict. For a cancel, refund_all/no_refund/refund are the refund fraction; for a reschedule refund_all means a free change and no_refund means not allowed. ota_governed is produced by resolution for a booking whose channel governs it and is never stored in a document. refund carries bps; fee carries fee.
object
none as the inner fee of a fee outcome means “use the policy’s own fee”. flat carries minor + currency; percent carries bps; keep_deposit carries nothing.
object
none as the inner fee of a fee outcome means “use the policy’s own fee”. flat carries minor + currency; percent carries bps; keep_deposit carries nothing.
object
object
Example
{ "status": "created", "source": "snapshot", "snapshot": { "basis": "documents", "policy_refs": [ { "scope_kind": "tenant" } ] }, "policy": { "cancel": { "below": { "kind": "refund_all", "fee": { "kind": "none", "currency": "USD" } } }, "reschedule": { "tiers": [ { "outcome": { "kind": "refund_all", "fee": { "kind": "none", "currency": "USD" } } } ], "below": { "kind": "refund_all", "fee": { "kind": "none", "currency": "USD" } } }, "fee": { "kind": "none", "currency": "USD" }, "refund_as": { "kind": "money" }, "weather": { "kind": "none", "outcome": "full_refund_or_rebook" }, "no_show": { "kind": "refund_all", "fee": { "kind": "none", "currency": "USD" } }, "operator_cancel": "refund_all", "overrides": { "waiver_reasons": [ "hardship" ] } }, "now": { "cancel": { "outcome": { "kind": "refund_all", "fee": { "kind": "none", "currency": "USD" } }, "fee": { "kind": "none", "currency": "USD" }, "refund_as": { "kind": "money" }, "governed_by": "merchant" }, "reschedule": { "outcome": { "kind": "refund_all", "fee": { "kind": "none", "currency": "USD" } }, "fee": { "kind": "none", "currency": "USD" }, "refund_as": { "kind": "money" }, "governed_by": "merchant" } }}Unknown booking, or a booking the caller does not own.
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}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"}