Sandbox orders are test bookings

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.

Orders

Change order

Apply an OrderChange — pay a hold, add extras, or accept a reshop offer.

PUT/v1/orders/{orderID}Requires X-API-Key

Applies a change to an order. action:

ActionMeaning
ticketing / payment / complete_paymentpay the order
ancillaries / seatsadd extras or seats
reissueaccept a reshop offer (new flights) in offer_ids
  • No action is 400 action_required. cancel_segments is 400 use_cancel_confirm: cancel some flights with POST /v1/orders/{orderID}/cancel/confirm.
  • reissue: when the offer's total_amount is positive, include a payment for it. POST /v1/orders/{orderID}/change/confirm does the same with a simpler body.
  • Prefer POST /v1/orders/{orderID}/services and /seats for extras. Extras here are priced from the order's seat map or service list (422 extra_not_priced otherwise).
  • Paying an order already paid is 409 already_paid. A payment must be in the order's currency. On an unpaid hold past expires_at it is 422 hold_expired. A cancelled, refunded or failed order is 409 illegal_transition.

Idempotency. Idempotency-Key is required when the call pays (400 idempotency_key_required) 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 change_outcome_unknown means the answer was lost: do not resend.

Request example

curl --request PUT \
  --url https://api.norba.io/v1/orders/{orderID} \
  --header "X-API-Key: $NORBA_KEY" \
  --header "Idempotency-Key: 3f2b8c1e-6d4a-4e9b-9a57-0c1d2e3f4a5b" \
  --header "Content-Type: application/json" \
  --data '{ "action": "ticketing", "payment": { "currency": "EUR", "amount": 380.62, "card": { "number": "4111111111111111", "holder": "AGENCY TRAVEL SL", "expiry_month": 11, "expiry_year": 2029 } } }'

Response example

Response example
{
  "order_id": "AA001Y1XD7ZA6",
  "pnr": "JBQGEY",
  "status": "ticketed",
  "total_amount": 380.62,
  "tickets": [
    {
      "ticket_number": "001-1234567890",
      "passenger_id": "PAX96101",
      "status": "issued"
    }
  ]
}

Authorization

X-API-KeystringRequired

Your API key from the dashboard. A missing or invalid key answers 401; see Authentication.

Path parameters

orderIDstringRequired

Canonical order ID.

Example: AA001Y1XD7ZA6

Query parameters

airlinestring

IATA code. Optional: taken from your stored order; a different value is 400 airline does not match the order.

Example: AA

Request body

actionstringRequired

ticketing, payment, complete_payment, ancillaries, seats or reissue.

ancillariesarray<Ancillary>

Ancillaries to add. Prefer POST /v1/orders/{orderID}/services.

offer_idsarray<string>

The reshop offers being accepted (reissue).

paymentobject

card, amount, currency, as on POST /v1/orders. To pay the order, amount must cover the order total less your service_fee.

seatsarray<Seat>

Seats to assign. Prefer POST /v1/orders/{orderID}/seats.

Error codes

400

action_required, use_cancel_confirm, idempotency_key_required, payment_method_not_allowed, payment.currency must be …, the currency of this order, payment.amount is less than the airline's price for this order, airline does not match the order, or another validation message.

404

order_not_found — not this account's order in this key's environment.

409

illegal_transition, already_paid, order_busy, idempotency_key_in_flight, idempotency_key_reused, or an …_outcome_unknown code with attempt_id (this or an earlier payment on the order has no known outcome: do not pay again).

422

hold_expired (unpaid hold past expires_at), extra_not_priced, a named refusal, or airline_refused.

502

change_outcome_unknown with attempt_id: the answer was lost. Do not resend.

503

airline_unreachable or ledger_unavailable (Retry-After: 5, nothing was sent), or coming_soon.

PUT /v1/orders/{orderID} — Change order | Norba API