Skip to content

List the tenant's policy documents (all scopes, all versions)

GET
/policies
curl --request GET \
--url https://quikstik-core.fly.dev/policies \
--header 'Authorization: Bearer <token>' \
--header 'x-tenant-id: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0'

Every document version the tenant has set — live (live: true) and retired — newest version first within each scope. Auth: a staff session, or an operator key scoped bookings.read.

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.

The documents

Media typeapplication/json
object
policies
required
Array<object>
object
policy_id
required
string format: uuid
scope_kind
required
string
Allowed values: tenant offering variant channel
scope_ref
required
string
version
required
integer
>= 1
rules
required

A scope’s partial policy: every rule optional, absent = inherit. operator_cancel is not settable (the server refuses a document that names it). governs is for channel scope only.

object
cancel

Tiers are most-notice-first; the most generous qualifying tier applies, else below.

object
tiers
required
Array<object>
object
min_hours_before
required
integer
refund_bps
required
integer
<= 10000
below
required

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
kind
required
string
Allowed values: refund_all no_refund refund fee ota_governed
bps
integer
<= 10000
fee

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
kind
required
string
Allowed values: none flat percent keep_deposit
minor
integer format: int64
currency
string
Allowed values: USD
bps
integer
<= 10000
reschedule
object
tiers
required
Array<object>
object
min_hours_before
required
integer
outcome
required

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
kind
required
string
Allowed values: refund_all no_refund refund fee ota_governed
bps
integer
<= 10000
fee

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
kind
required
string
Allowed values: none flat percent keep_deposit
minor
integer format: int64
currency
string
Allowed values: USD
bps
integer
<= 10000
below
required

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
kind
required
string
Allowed values: refund_all no_refund refund fee ota_governed
bps
integer
<= 10000
fee

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
kind
required
string
Allowed values: none flat percent keep_deposit
minor
integer format: int64
currency
string
Allowed values: USD
bps
integer
<= 10000
fee

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
kind
required
string
Allowed values: none flat percent keep_deposit
minor
integer format: int64
currency
string
Allowed values: USD
bps
integer
<= 10000
refund_as
object
kind
required
string
Allowed values: money credit
expires_days
integer
weather
object
kind
required
string
Allowed values: none clause
decision_hour_local
integer
<= 23
forecast_source
string
rain_chance_bps
integer
<= 10000
fraction_of_ride_bps
integer
<= 10000
outcome
string
Allowed values: full_refund_or_rebook
no_show

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
kind
required
string
Allowed values: refund_all no_refund refund fee ota_governed
bps
integer
<= 10000
fee

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
kind
required
string
Allowed values: none flat percent keep_deposit
minor
integer format: int64
currency
string
Allowed values: USD
bps
integer
<= 10000
overrides
object
waiver_reasons
required
Array<string>
Allowed values: hardship rain_rule goodwill flight_disruption
text

Rendering hints only; the full page renders from the rules.

object
summary_short
required
string
summary_multi_day
string
governs
boolean
effective_from_ms
required
integer format: int64
retired_at_ms
integer format: int64
nullable
live
required
boolean
created_by
required
string format: uuid

Example

{
"policies": [
{
"scope_kind": "tenant",
"rules": {
"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"
}
},
"overrides": {
"waiver_reasons": [
"hardship"
]
}
}
}
]
}

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"
}