Skip to content

Set an offering variant's capacity-keying policy

POST
/offerings/capacity-policy
curl --request POST \
--url https://quikstik-core.fly.dev/offerings/capacity-policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--data '{ "variant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "granularity_kind": "per_date", "tz": "example", "launch_windows": [ { "key": "example", "launches": [ { "hour": 1, "minute": 1 } ] } ] }'

Operator-scoped, authoritative provisioning of an offering variant’s capacity-keying policy: the granularity (per_date or per_launch_window), the timezone the offering’s wall clock resolves in, and — for per_launch_window — the launch windows that share a cap node. Resolves against operator effect authority; this is not a customer surface. Replaces the variant’s prior policy.

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.

Media typeapplication/json
object
variant_id
required

The offering variant whose capacity policy is being set.

string format: uuid
granularity_kind
required

How the variant’s capacity is keyed.

string
Allowed values: per_date per_launch_window
tz
required

IANA timezone the offering’s wall clock resolves in (e.g. “America/New_York”).

string
>= 1 characters
launch_windows

Launch windows that share a cap node; required for per_launch_window, ignored for per_date.

Array<object>
object
key
required

Stable window identifier (the cap node key derives from this).

string
launches
required
Array<object>
object
hour
required
integer
<= 23
minute
required
integer
<= 59

Capacity policy applied

Malformed policy (empty timezone, unknown granularity kind, per-launch-window without windows, or an out-of-range launch time)