Resend a traveller email
Sends an email of a hosted-site order to its traveller again.
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.
PartnerApiKeyX-Partner-Key<token>Partner API Key (X-Partner-Key)
id*stringOrder id (id from the order response).
uuidIdempotency-Key*stringUUID idempotency key for safe retries of this operation.
uuidThe email to send again.
- body
An email of a hosted-site order to send to its traveller again.
type*|Required. receipt (the receipt of what was charged to the traveller's card) or
delivery (one item's delivery email: its codes, eSIM installation, top-up or booking confirmation).
"receipt""delivery"orderItemId?|Required for delivery: the item (items[].id) whose delivery email is sent.
Not allowed for receipt, which covers the whole order.
uuidOK
- response
The email that was sent again.
orderId*stringThe order.
uuidtype*stringreceipt or delivery, as requested.
"receipt""delivery"orderItemId?|The item of a delivery email; null for a receipt.
uuidrecipient?|The traveller's email address the order recorded at checkout, masked: its first character
and its domain, for example t***@example.com. The email is only ever sent there. null only when a
request that was already sent is sent again after the traveller's details were erased.
curl -X POST 'https://api.sandbox.openroam.com/v1/orders/01a1432e-7121-7b0e-a0a0-c35454d3b883/emails/resend' \ -H 'Idempotency-Key: 0b8f7f3e-6b7a-4a52-9a5e-3d2f1a9c7e10' \ -H 'Content-Type: application/json' \ -d '{ "type": "receipt"}'{ "orderId": "01a14329-9cc4-7a1b-9f6e-3c2d1e0b4a58", "type": "delivery", "orderItemId": "01a14329-9cc4-73a3-8ca6-22a3efdde687", "recipient": "a***@example.com"}Quote an order POST
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.
Cancel an item POST
Cancels an order item and refunds what was paid for it, less any cancellation penalty. Available when the item's `actions.cancellation` is `available`; while a refund is running it shows `inProgress`, and `manualReview` means support must handle it. A rejected item is refunded in full automatically and reported by `order-item.refunded`; the `fulfillmentFailed` reason then returns that refund. The `fulfillmentFailed` reason is accepted only for a rejected item; a cancellation that is not valid for the item returns `400` with code `10001`. A delivered item of a kind that cannot take back a delivery (airtime, utility, gift cards, eSIMs) can never be cancelled and returns `422` with code `18000` (`CANCELLATION_NOT_SUPPORTED`). Otherwise a cancellation that is not allowed now, for example while the item is still being delivered, returns `409` with code `18001` (`CANCELLATION_NOT_AVAILABLE`), and `details[0].reason` repeats `actions.cancellation.availability` (`IN_PROGRESS`, `MANUAL_REVIEW` or `NOT_AVAILABLE`). The same `409` with `IN_PROGRESS` answers a cancel that meets a refund, a delivery or a change of the same order still running; send it again shortly. The amount is recalculated at this point, so it can differ from an earlier cancellation preview. A refund started by OpenRoam support returns the same `409` with `MANUAL_REVIEW`. An item of another partner, or an unknown id, returns `404` with code `10004`. Returns the `orderItemId`, the refund `amount`, the `method` it is returned to and its `status`. A balance payment is refunded to the wallet that paid it. Refund progress is also reported by the `order-item.refunded` webhook. Requires an `Idempotency-Key` header (a UUID). Repeating a completed request with the same key and body returns `200` with the refund that request started, as it reads now, and refunds nothing again. One still running returns `409` with code `12002` (`IDEMPOTENCY_KEY_IN_PROGRESS`) and a `Retry-After` header, and a different body with the same key `409` with code `12001`. A request that ended in an error can be sent again with the same key and body.