Quote flights
Prices flight fares again with the airline, without placing an order.
Prices flight fares again with the airline, without placing an order.
Takes the same body as order: { currency, referenceId, items[] } with 1 to 5 items, each
{ publicId, quantity, inputs } and quantity 1. inputs may be left out: the quote then prices
the fare alone. Inputs that are sent are checked as the order checks them, and their paid extras are added to
the price. Prices are in currency, or in the API key's currency when it is omitted. Nothing is charged or
held.
Returns { currency, items, total }. Each item has a new publicId: order with it before
details.expiresAt. It keeps the fare's price, which caps an order without inputs.maxPrice.
details carries the fare's conditions, included baggage and price breakdown, hasSeatMaps, the paid
extras (availableServices) that can be sent in the order's inputs.selectedServices, and
fareOptions: the fares for the same flights and airline, cheapest first and including the quoted one, each
with its own publicId that can be quoted or ordered.
A higher airline price is returned with 200; only inputs.maxPrice stops a quote. Each item is checked
completely, its inputs, its publicId and its price, before the next one, and the first failure names its
item: an invalid input or a quantity other than 1 gives 400 / 10001 at its path under items[i]; a
price above inputs.maxPrice 409 / 11002 at items[i].inputs.maxPrice; an offer the airline no
longer sells 409 / 11003 at items[i]; an unknown, expired or another partner's publicId, or a
search itinerary id, 400 / 11004 at items[i]. An unsupported currency gives 400 / 10001 at
currency.
PartnerApiKeyX-Partner-Key<token>Partner API Key (X-Partner-Key)
- body
The body B2B flight quote and order both take.
currency?|Order currency, three letters in either case; the API key's currency when omitted. An unsupported code gives
400 / 10001 at currency, reason NOT_SUPPORTED, before any item is checked.
referenceId?|Optional partner order reference, unique per partner, at most 128 characters without leading or trailing spaces. A quote validates it and ignores it.
items*array<>1 to 5 items, each one fare for its passengers.
OK
- response
Current prices for the requested items, in request order, in currency. total is the
sum of each item's unit price times its quantity. Each item has a new publicId that keeps its fare price:
order with it before its details.expiresAt. Nothing is charged or held.
currency*stringitems*array<>total*curl -X POST 'https://api.sandbox.openroam.com/v1/flights/quote' \ -H 'Content-Type: application/json' \ -d '{ "currency": "USD", "referenceId": "partner-trip-7", "items": [ { "publicId": "flight_k3m9q2x7v4b8n6c1z5r0t2w8y4", "quantity": 1, "inputs": { "passengers": [ { "passengerIndex": 1, "title": "mr", "givenName": "Tom", "familyName": "Lee", "gender": "m", "bornOn": "1988-04-02", "email": "tom@example.com", "phoneNumber": "+447700900123", "identityDocuments": [ { "type": "passport", "uniqueIdentifier": "533380006", "issuingCountryCode": "GB", "expiresOn": "2031-06-30" } ], "selectedSeats": [ { "sliceIndex": 1, "segmentIndex": 1, "seatDesignator": "32A" } ] }, { "passengerIndex": 2, "title": "ms", "givenName": "Mia", "familyName": "Lee", "gender": "f", "bornOn": "2019-03-14", "email": "tom@example.com", "phoneNumber": "+447700900123", "identityDocuments": [ { "type": "passport", "uniqueIdentifier": "533380007", "issuingCountryCode": "GB", "expiresOn": "2030-01-31" } ] } ], "selectedServices": [ { "id": "flight_s8d2k4m6n1p3q5r7t9v0w2x4y6", "quantity": 1 } ], "maxPrice": { "amount": 1250, "currency": "USD" } } } ]}'{ "currency": "string", "items": [ { "publicId": "string", "quantity": 0, "name": "string", "price": { "amount": 0, "currency": "string" }, "details": { "expiresAt": "2019-08-24T14:15:22Z", "quotedAt": "2019-08-24T14:15:22Z", "hasSeatMaps": true, "terms": { "payment": { "type": "payNow", "dueNow": { "amount": 0, "currency": "string" }, "dueLater": { "amount": 0, "currency": "string" }, "dueLaterAt": "property" }, "cancellation": { "type": "fullyRefundable", "freeUntil": "2019-08-24T14:15:22Z", "freeUntilLocalTime": "2026-12-01T08:30:00", "timezone": "string", "schedule": [ { "from": "2019-08-24T14:15:22Z", "fromLocalTime": "2026-12-01T08:30:00", "refund": { "amount": 0, "currency": "string" }, "penalty": { "amount": 0, "currency": "string" } } ], "fee": { "amount": 0, "currency": "string" } }, "changes": { "allowed": true, "fee": { "type": "fixed", "amount": { "amount": 0, "currency": "string" }, "percent": 0, "min": { "amount": 0, "currency": "string" }, "max": { "amount": 0, "currency": "string" } } } }, "includedBaggage": [ { "type": "unknown", "quantity": 0, "weightKg": 0, "description": "string" } ], "priceBreakdown": { "base": { "amount": 0, "currency": "string" }, "tax": { "amount": 0, "currency": "string" } }, "availableServices": [ { "id": "string", "type": "string", "price": { "amount": 0, "currency": "string" }, "passengerIndexes": [ 0 ], "segments": [ { "sliceIndex": 0, "segmentIndex": 0 } ], "maxQuantity": 0, "baggage": { "type": "string", "maximumWeightKg": 0, "maximumLengthCm": 0, "maximumHeightCm": 0, "maximumDepthCm": 0 } } ], "fareOptions": [ { "publicId": "string", "name": "string", "price": { "amount": 0, "currency": "string" }, "details": { "expiresAt": "2019-08-24T14:15:22Z", "cabinClass": "economy", "fare": { "fareBasisCode": "string", "brandName": "string", "fareFamily": "string", "validatingCarrier": "string" }, "terms": { "payment": { "type": "payNow", "dueNow": { "amount": 0, "currency": "string" }, "dueLater": { "amount": 0, "currency": "string" }, "dueLaterAt": "property" }, "cancellation": { "type": "fullyRefundable", "freeUntil": "2019-08-24T14:15:22Z", "freeUntilLocalTime": "2026-12-01T08:30:00", "timezone": "string", "schedule": [ { "from": "2019-08-24T14:15:22Z", "fromLocalTime": "2026-12-01T08:30:00", "refund": { "amount": 0, "currency": "string" }, "penalty": { "amount": 0, "currency": "string" } } ], "fee": { "amount": 0, "currency": "string" } }, "changes": { "allowed": true, "fee": { "type": "fixed", "amount": { "amount": 0, "currency": "string" }, "percent": 0, "min": { "amount": 0, "currency": "string" }, "max": { "amount": 0, "currency": "string" } } } }, "includedBaggage": [ { "type": "unknown", "quantity": 0, "weightKg": 0, "description": "string" } ], "priceBreakdown": { "base": { "amount": 0, "currency": "string" }, "tax": { "amount": 0, "currency": "string" } }, "passengerPricing": [ { "passengerType": "adult", "count": 0, "pricePerPassenger": { "amount": 0, "currency": "string" }, "priceBreakdown": { "base": { "amount": 0, "currency": "string" }, "tax": { "amount": 0, "currency": "string" } }, "fareBasisCode": "string", "bookingClass": "string" } ], "offerPassengers": [ { "passengerIndex": 0, "type": "adult", "age": 0, "fareType": "string", "includedBaggage": [ { "type": "unknown", "quantity": 0, "weightKg": 0, "description": "string" } ], "availableServices": [ { "id": "string", "type": "string", "price": { "amount": 0, "currency": "string" }, "passengerIndexes": [ 0 ], "segments": [ { "sliceIndex": 0, "segmentIndex": 0 } ], "maxQuantity": 0, "baggage": { "type": "string", "maximumWeightKg": 0, "maximumLengthCm": 0, "maximumHeightCm": 0, "maximumDepthCm": 0 } } ] } ], "availableServices": [ { "id": "string", "type": "string", "price": { "amount": 0, "currency": "string" }, "passengerIndexes": [ 0 ], "segments": [ { "sliceIndex": 0, "segmentIndex": 0 } ], "maxQuantity": 0, "baggage": { "type": "string", "maximumWeightKg": 0, "maximumLengthCm": 0, "maximumHeightCm": 0, "maximumDepthCm": 0 } } ], "identityDocumentsRequired": true, "supportedDocumentTypes": [ "string" ], "segments": [ { "sliceIndex": 0, "segmentIndex": 0, "cabinClass": "economy", "baggage": [ { "type": "unknown", "quantity": 0, "weightKg": 0, "description": "string" } ] } ] } } ] } } ], "total": { "amount": 0, "currency": "string" }}Get a flight seat map GET
Returns the seat map of a flight offer, with the seats each passenger can take and their prices. The seat map is read from the airline on each call, so availability can change between calls; prices are in the API key's currency. `isSupported` is false when the airline offers no seat selection for the offer. Segments are named by `sliceIndex` and `segmentIndex`, their 1-based position in the offer; a segment without a seat map is left out. A seat can be booked only for the passengers in its `availableFor`. Send chosen seats in the order's `inputs.passengers[].selectedSeats`, one per passenger per segment. An unknown, expired or another partner's `publicId` returns 400 / 11004.
Search flights POST
Searches flight itineraries and the fares bookable on them. Send one slice per flight (one for one-way, two for a return, more for a multi-city trip) and every passenger; at least one passenger must be an `adult`, and children and infants need an `age`. Optional `filters`: `maxStops`, `preferredAirlines` and `excludedAirlines` select itineraries; `refundableOnly` and `maxPrice` select fares, and an itinerary left without a fare is not returned. The body rejects an unknown field at every level, and the route takes no query parameters. Returns `{ items, pagination }`. Each item is one itinerary, the same flights sold by the same airline, with its fares as `offers`, cheapest first; items are ordered by their cheapest fare, then total duration. `page` and `limit` (defaults 1 and 10, `limit` at most 100) page through itineraries, and `pagination.totalCount` counts them. Each page runs a new airline search, so fares can change between pages. An item's `id` is valid only within this response and cannot be ordered; quote and order an offer's `publicId` before its `details.expiresAt`. Prices are for all passengers, in `currency` or the API key's currency, and are indicative. Errors: an invalid or unknown field, or a query parameter, 400 / 10001; an unsupported `currency` 404 / 10004.