Request an availability snapshot
const url = 'https://quikstik-core.fly.dev/availability/snapshot-requests';const options = { method: 'POST', headers: { 'x-tenant-id': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"offering_variant_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","window":{"start":"example","end":"example"},"quantity":1,"participant_count":1,"resource_requirements":[{"kind":"example","resource_type":"example","quantity":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/availability/snapshot-requests \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-tenant-id: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --data '{ "offering_variant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "window": { "start": "example", "end": "example" }, "quantity": 1, "participant_count": 1, "resource_requirements": [ { "kind": "example", "resource_type": "example", "quantity": 1 } ] }'Requests a point-in-time availability snapshot for an offering variant, time window, and (optional) participant/resource requirements.
This endpoint is intentionally read/query oriented:
- It does not allocate inventory.
- It does not execute booking workflows.
- It does not guarantee the snapshot can be used to reserve anything.
The snapshot is a contract vocabulary placeholder aligned to the future command/event seam:
commerce.request_availability_snapshot (command) and
commerce.availability.snapshot_generated (event).
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
object
RFC3339 timestamp.
RFC3339 timestamp.
Quantity requested (participants/items); semantics TBD.
Participant count (if applicable); semantics TBD.
object
Resource requirement kind (vocabulary only). Examples: equipment, staff, venue.
Allowed values and semantics are TBD.
Resource type identifier (TBD).
Example generated
{ "offering_variant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "window": { "start": "example", "end": "example" }, "quantity": 1, "participant_count": 1, "resource_requirements": [ { "kind": "example", "resource_type": "example", "quantity": 1 } ]}Responses
Section titled “Responses”Authoritative availability snapshot (recompute-on-request; advisory, not a reservation)
object
Unix epoch milliseconds.
object
RFC3339 timestamp.
RFC3339 timestamp.
object
Start time (RFC3339). Null when the offering is not slot-based (TBD).
Availability status (vocabulary only). Examples: available, unavailable, inquire, unknown.
Allowed values and semantics are TBD (do not infer algorithmic behavior).
Non-binding count (TBD).
Human-readable hint only.
How available_quantity was arrived at. Present on every line read from the capacity
chain (absent only for unknown/unconfigured lines). offered = chain_remaining − withheld;
withheld is seats reserved for other demand classes on this departure. Lets any reader
reconcile the storefront number against the pools without a database.
object
Minimum of limit − committed over the leaf and every ancestor.
Example generated
{ "snapshot_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "generated_at_ms": 1, "window": { "start": "example", "end": "example" }, "lines": [ { "offering_variant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "start_time": "example", "status": "example", "available_quantity": 1, "notes": "example", "basis": { "chain_remaining": 1, "withheld": 1, "offered": 1 } } ]}