Skip to content

Redeem a rebook quote — move the booking

POST
/account/bookings/{booking_id}/rebookings
curl --request POST \
--url https://quikstik-core.fly.dev/account/bookings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rebookings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: example' \
--data '{ "quote_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

The body is the id of a quote the server wrote; it carries no price. The quote must be open, issued to this person for this booking, unexpired, and still describe the world it priced (same departure, same amount owed, same agreement version) — else 410 quote_expired (detail: used | expired | stale). The claim is one guarded update made before the move and never undone. Issues the operator RebookBookingCommand with the guest as actor through the same rebook sink. Even exchange and downgrade complete in this call (a downgrade’s refund is the rebook’s own money event). An upcharge is 409 not_rebookable (detail: upcharge_needs_staff) before anything is claimed. Idempotency-Key is required.

booking_id
required
string format: uuid
Idempotency-Key
required
string
>= 1 characters

Idempotency key for the command envelope. A retry with the same key is a no-op.

Media typeapplication/json
object
quote_id
required
string format: uuid

Example generated

{
"quote_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Moved

Media typeapplication/json
object
booking_id
required
string format: uuid
status
required
string
Allowed values: rebooked
kind
required
string
Allowed values: downgrade even
delta_net_minor
required
integer format: int64
delta_tax_minor
required
integer format: int64

Example

{
"status": "rebooked",
"kind": "downgrade"
}

Malformed body

Media typeapplication/json
object
reason
required
string

Example generated

{
"reason": "example"
}

Missing or invalid session bearer token

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

The session’s effect authority does not cover this operation

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

Unknown booking, or a quote that is not this person’s for this booking

Media typeapplication/json
object
reason
required

Stable machine reason

string
detail

Finer machine code under reason

string
current
object
booking_id
required
string format: uuid
refund_minor
required

Minor units the card gets back

integer format: int64
refund_bps
required
integer
<= 10000
tier_hours

Hours-before-departure the applying tier requires; absent when no tier applies

integer
deadline_at

Last instant this refund still applies; absent when no tier applies

string format: date-time
currency
required
string

Example generated

{
"reason": "example",
"detail": "example",
"current": {
"booking_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"refund_minor": 1,
"refund_bps": 1,
"tier_hours": 1,
"deadline_at": "2026-04-15T12:00:00Z",
"currency": "example"
}
}

not_rebookable, inside_notice_window, or no_room (the target filled since the quote)

Media typeapplication/json
object
reason
required

Stable machine reason

string
detail

Finer machine code under reason

string
current
object
booking_id
required
string format: uuid
refund_minor
required

Minor units the card gets back

integer format: int64
refund_bps
required
integer
<= 10000
tier_hours

Hours-before-departure the applying tier requires; absent when no tier applies

integer
deadline_at

Last instant this refund still applies; absent when no tier applies

string format: date-time
currency
required
string

Example generated

{
"reason": "example",
"detail": "example",
"current": {
"booking_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"refund_minor": 1,
"refund_bps": 1,
"tier_hours": 1,
"deadline_at": "2026-04-15T12:00:00Z",
"currency": "example"
}
}

The quote is used, expired or stale — ask for a new one

Media typeapplication/json
object
reason
required

Stable machine reason

string
detail

Finer machine code under reason

string
current
object
booking_id
required
string format: uuid
refund_minor
required

Minor units the card gets back

integer format: int64
refund_bps
required
integer
<= 10000
tier_hours

Hours-before-departure the applying tier requires; absent when no tier applies

integer
deadline_at

Last instant this refund still applies; absent when no tier applies

string format: date-time
currency
required
string

Example generated

{
"reason": "example",
"detail": "example",
"current": {
"booking_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"refund_minor": 1,
"refund_bps": 1,
"tier_hours": 1,
"deadline_at": "2026-04-15T12:00:00Z",
"currency": "example"
}
}

rebook_owed_floor, or an unknown request field

Media typeapplication/json
object
reason
required

Stable machine reason

string
detail

Finer machine code under reason

string
current
object
booking_id
required
string format: uuid
refund_minor
required

Minor units the card gets back

integer format: int64
refund_bps
required
integer
<= 10000
tier_hours

Hours-before-departure the applying tier requires; absent when no tier applies

integer
deadline_at

Last instant this refund still applies; absent when no tier applies

string format: date-time
currency
required
string

Example generated

{
"reason": "example",
"detail": "example",
"current": {
"booking_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"refund_minor": 1,
"refund_bps": 1,
"tier_hours": 1,
"deadline_at": "2026-04-15T12:00:00Z",
"currency": "example"
}
}

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