Quote an order
Prices a mixed order body with current prices, without placing an order.
Prices a mixed order body with current prices, without placing an order.
Takes the same body as order creation (one to five items of one or several product types, a total quantity
of at most five) and needs no Idempotency-Key. Nothing is charged, held or created; referenceId
is checked for its format and not for uniqueness. Returns currency, items, total and
expiresAt. Each item is the quote item that its product's own quote route returns, with
productType; its publicId can be a new one (gift cards, hotels and flights issue one), so order
with the publicId of the quote. total is the sum of each item's price times its
quantity in the quote currency. expiresAt is the earliest details.expiresAt of the items
that have one, and null when none has.
Items are checked as the order checks them: first the inputs of every item, then the offer of every
item, then each item is priced in request order. The first failing item ends the quote with the code and
path of its product's quote route, under items[i], for example 409 / 11002 at
items[i].inputs.maxPrice when the current price is above the guard. An eSIM top-up whose
inputs.iccid is not one of your eSIMs returns 404 with code 10004 (NOT_FOUND).
A quote does not reserve a price: to hold the quoted price, send it as inputs.maxPrice in the order.
PartnerApiKeyX-Partner-Key<token>Partner API Key (X-Partner-Key)
The order to price.
- body
An order of one to five items, of one or several product types, paid from the wallet.
items*array<|||||>Required. One to five items; the sum of their quantity is at most five.
currency?|Three-letter currency code the order is priced and charged in, for example USD. When omitted or
empty, the API key's default currency is used. An unsupported code gives 400 / 10001 at currency,
reason NOT_SUPPORTED, before any item is checked.
referenceId?|Optional reference of your own, up to 128 characters, without leading or trailing whitespace. It must be
unique among your orders (a reused value returns 409) and can be used to find the order with the
referenceId filter of the order list.
maxTotal?|Optional highest accepted order total, in the order currency: the sum of every item's price times its quantity. A higher total gives 409 / 11002 at maxTotal before anything is charged; a currency other than the order currency gives 400 / 10001 at maxTotal.currency.
OK
- response
Current prices for the items of a mixed order body, in request order.
currency*stringThe quote currency: the body currency, or the API key's currency when it is omitted.
items*array<|||||>One quoted item per request item, in request order. Each is the quote item of its product with
productType; its publicId may be a new one that the order should use.
total*The sum of each item's price times its quantity, in the quote currency.
expiresAt?|The earliest details.expiresAt of the items that have one (UTC): order before then. null when no item
has an expiry.
date-timecurl -X POST 'https://api.sandbox.openroam.com/v1/orders/quote' \ -H 'Content-Type: application/json' \ -d '{ "currency": "USD", "items": [ { "productType": "airtime", "publicId": "airtime_raanuxyz6cxzie3w3my6c3r2wm", "quantity": 1, "inputs": { "phoneNumber": "+994501234567" } }, { "productType": "esim", "publicId": "esim_eu_3gb_7d", "quantity": 1, "inputs": { "isInstant": true } } ]}'{ "currency": "USD", "items": [ { "productType": "airtime", "publicId": "airtime_raanuxyz6cxzie3w3my6c3r2wm", "quantity": 1, "name": "Test operator 40 AZN", "value": { "amount": 40, "currency": "AZN" }, "price": { "amount": 25, "currency": "USD" }, "details": { "estimatedDeliveredValue": { "amount": 40, "currency": "AZN" } } }, { "productType": "esim", "publicId": "esim_eu_3gb_7d", "quantity": 1, "name": "Europe 3 GB 7 days", "price": { "amount": 25, "currency": "USD" } } ], "total": { "amount": 50, "currency": "USD" }, "expiresAt": null}Get fulfillment status GET
Gets the current fulfillment state of every item in an order. Returns the order `id`, its `items` (the same item shape as the order, with each item's `fulfillment` status, typed `result` and `failure`) and `fulfillmentVersion`. The version increases with every meaningful fulfillment change, including a later revision of an already delivered result, the cancellation of a delivered item and the completed refund of a delivered item, which changes the order's `status`, and matches `fulfillmentVersion` in the `order.fulfillment.updated` webhook: keep the highest version you have seen and use this endpoint to recover after a missed delivery. The refund of an item that was not delivered and an amendment do not change the version; read the order for those. An order of another partner, or an unknown id, returns `404` with code `10004`.
Resend a traveller email POST
Sends an email of a hosted-site order to its traveller again. For a traveller who did not receive an email. The body names the email: `{"type":"receipt"}`, the receipt of what was charged to the traveller's card, or `{"type":"delivery","orderItemId":"..."}`, one item's delivery email (its codes, eSIM installation, top-up or booking confirmation). The email is built as the order reads now, in the site's brand and the traveller's language, and goes only to the address the traveller gave at checkout; the body takes no address. Requires the `manage` order permission; a site credential can send its own site's emails. Returns `{ orderId, type, orderItemId, recipient }`, the address masked, once the email service took the email. An order of another partner, or an item not in the order, is `404` / `10004`. An order with no traveller email address (not placed on a hosted site, or the traveller's details were erased) is `422` / `18006` (`EMAIL_NOT_SUPPORTED`), reason `NO_TRAVELLER_EMAIL`. An email that cannot be sent now is `409` / `18007` (`EMAIL_NOT_AVAILABLE`) with `details[0].reason`: `NOTHING_TO_SEND` (nothing was charged yet, or the item is not delivered yet), `NOT_ELIGIBLE` (the item was rejected or refunded, its codes are withheld, or what it delivered has ended), `IN_PROGRESS` (a refund or another change of the order is running; try again shortly), `EMAILS_OFF`, or `UNSUBSCRIBED` (path `id`: the traveller unsubscribed from the site's emails; it stays so until they resubscribe). An order's emails can be sent again five times in any hour, across every credential; past that, `429` / `10006` (`RATE_LIMITED`), reason `RATE_LIMITED`, with `Retry-After`. A refusal of the email service is `503` / `10007` (with `Retry-After` when known) or `502` / `10008`; nothing was sent, so send the same request again. Requires an `Idempotency-Key` header (a UUID). The same key and body never send twice: a completed request answers as it did, one still running is `409` / `12002`, and a different body `409` / `12001`. Sending the email again later needs a new key.