Rebook (move) a booking to a new departure, with its price revision
const url = 'https://quikstik-core.fly.dev/rebookings';const options = { method: 'POST', headers: { 'x-tenant-id': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"booking_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","obligation_ref":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","new_offering_variant_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","new_start_time":"2026-04-15T12:00:00Z","new_capacity":1,"revision":"even_exchange","effective_date":{"year":1,"month":1,"day":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/rebookings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-tenant-id: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --data '{ "booking_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "obligation_ref": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "new_offering_variant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "new_start_time": "2026-04-15T12:00:00Z", "new_capacity": 1, "revision": "even_exchange", "effective_date": { "year": 1, "month": 1, "day": 1 } }'Moves one booking — addressed by booking_id + obligation_ref — to a new departure
(new_offering_variant_id + new_start_time) and posts the price revision against the
obligation. The durable effect is one transaction: the booking moves, its capacity is swapped
(the old departure’s seat released, the new one held), and the money leg the revision directs
is enqueued for the ledger to settle asynchronously: upcharge →
priced-charge, downgrade → partial refund, even_exchange → no money event. Idempotent:
a rebook that moves money requires an Idempotency-Key (400 without one). Fail-closed:
503 when no backend is wired.
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 booking being moved.
The booking’s ledger obligation (the revision posts against it).
The offering variant of the new departure.
Start time of the new departure (RFC3339 UTC); with the variant, the departure key.
Recorded capacity of the new departure if it must be created (null = uncapped).
Same price — no money event, only the lifecycle move.
object
Move to a more expensive offering (a forward priced charge). list is the new catalog
price (deferred in full); discount is the upgrade gap recorded as contra-revenue
(0 ⇒ a plain incremental charge); tax is on the discounted base.
object
An amount in integer minor units (e.g. cents); floating-point money is forbidden.
object
An amount in integer minor units (e.g. cents); floating-point money is forbidden.
object
An amount in integer minor units (e.g. cents); floating-point money is forbidden.
object
object
Move to a cheaper offering — a pre-fulfillment partial refund of the delta.
object
An amount in integer minor units (e.g. cents); floating-point money is forbidden.
object
An amount in integer minor units (e.g. cents); floating-point money is forbidden.
object
Business/effective date of the rebook, for period close.
object
Responses
Section titled “Responses”Rebook accepted; capacity swapped and any money leg enqueued
object
The booking stays an active booking after the move.
Which ledger leg the rebook drove (none for an even exchange).
Example
{ "status": "rebooked", "money": "priced_charge"}Malformed body, missing idempotency key, or a non-positive directed amount (an upcharge
list or a downgrade net that is not strictly positive).
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}Missing or invalid session bearer token
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}The session’s effect authority does not cover this operation
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}No room on the target departure’s capacity chain — the leaf or an ancestor (e.g. the
permit hour window) is short. Nothing changed: the booking stays on its old departure.
pool_key names the short pool and short_by the seats missing, so the operator can
raise the right dial and retry (never a 503: an outage would say so).
object
capacity_full is the name. no_room is the old name, kept in this enum for one
release for clients that matched on it; the gateway no longer sends it as reason
and says deprecated_reason: no_room alongside instead.
Present with capacity_full for one release — the old reason, so a client that matched on it still can.
Example
{ "reason": "capacity_full", "deprecated_reason": "no_room"}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"}