Set an offering variant's capacity-keying policy
const url = 'https://quikstik-core.fly.dev/offerings/capacity-policy';const options = { method: 'POST', headers: { 'x-tenant-id': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"variant_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","granularity_kind":"per_date","tz":"example","launch_windows":[{"key":"example","launches":[{"hour":1,"minute":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/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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “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.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The offering variant whose capacity policy is being set.
How the variant’s capacity is keyed.
IANA timezone the offering’s wall clock resolves in (e.g. “America/New_York”).
Launch windows that share a cap node; required for per_launch_window, ignored for per_date.
object
Stable window identifier (the cap node key derives from this).
object
Responses
Section titled “Responses”Capacity policy applied
Malformed policy (empty timezone, unknown granularity kind, per-launch-window without windows, or an out-of-range launch time)