Sandbox keys reach the airlines’ test systems: nobody flies on these orders and no booking fee is charged. Check status and tickets[], not the HTTP code.
Assign seats on an order
Give each traveller a seat from the map, paying for it where the booking is already ticketed.
/v1/orders/{orderID}/seatsRequires X-API-KeyAssigns seats on an order. Each seat names segment_id, passenger_id and seat_id (or row and column), and is priced from GET /v1/orders/{orderID}/seats; a seat not on that map is 422 extra_not_priced. Infants hold no seat (400).
- On an unpaid hold, seats are added and paid with the fare; after
expires_atit is422 hold_expired. - On a ticketed order, send a
paymentcovering the seats, in the order's currency.
Returns the updated Order. Idempotency. Idempotency-Key is required when a payment is sent (400 idempotency_key_required without it) and works as on POST /v1/orders. Another write still running on the order is 409 order_busy (Retry-After: 5). A refusal from the airline is 422; 503 airline_unreachable means nothing was sent (retry with the same key); 502 extras_outcome_unknown means the answer was lost: do not resend.
Request example
curl --request POST \
--url https://api.norba.io/v1/orders/{orderID}/seats \
--header "X-API-Key: $NORBA_KEY" \
--header "Idempotency-Key: 3f2b8c1e-6d4a-4e9b-9a57-0c1d2e3f4a5b" \
--header "Content-Type: application/json" \
--data '{ "seats": [ { "seat_id": "17A", "segment_id": "SEG-2", "passenger_id": "PAX96101" } ] }'Response example
{
"order_id": "AA001Y1XD7ZA6",
"status": "confirmed",
"seats": [
{
"seat_id": "17A",
"row": 17,
"column": "A",
"segment_id": "SEG-2",
"passenger_id": "PAX96101",
"price": {
"amount": 23,
"currency": "EUR"
}
}
]
}Path parameters
orderIDstringRequiredCanonical order ID.
AA001Y1XD7ZA6Request body
paymentobjectRequired on a ticketed order: card, amount, currency.
seatsarray<object>RequiredEach with segment_id, passenger_id, and seat_id (or row + column).
Error codes
400idempotency_key_required, payment_method_not_allowed, seats is required, a seat for an infant, payment.amount is less than the airline's price for these extras, payment.currency must be …, the currency of this order, or another validation message.
404order_not_found — not this account's order in this key's environment.
409illegal_transition, order_busy, idempotency_key_in_flight, idempotency_key_reused, or extras_outcome_unknown (with attempt_id).
422extra_not_priced, hold_expired, or airline_refused.
502extras_outcome_unknown with attempt_id: the answer was lost. Do not resend.
503airline_unreachable or ledger_unavailable (Retry-After: 5, nothing was sent), or coming_soon.