Skip to Content
OpenRoam Docs
Gift cards

Quote gift cards

Prices the order body with current prices, without placing an order.

POST
/v1/giftcards/quote

Prices the order body with current prices, without placing an order.

Takes the same body as order and checks it the same way: each item completely (its inputs, then its publicId, then its price) before the next, in request order. The first failure aborts the quote and is named at items[i], as the order names it, for example 409 / 11002 at items[i].inputs.maxPrice when the current price is above it. A range offer may be quoted on an equivalent offer of the same card that sells the same value for less: the item then returns that offer's publicId, which the order should use.

Authorization

PartnerApiKey
headerX-Partner-Key<token>

Partner API Key (X-Partner-Key)

Request Body

  1. body

The body B2B gift card 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, with at most 5 cards in total.

Response Body

OK

  1. response

Current prices for the requested items, in request order. total is the sum of each item's unit price times its quantity. A quote reserves nothing and does not expire.

currency*string
items*array<>
total*
Example Request
curl -X POST 'https://api.sandbox.openroam.com/v1/giftcards/quote' \  -H 'Content-Type: application/json' \  -d '{  "currency": "USD",  "referenceId": "partner-order-42",  "items": [    {      "publicId": "giftcard_p5udmgvqke2bcrwlk35drsqfqm",      "quantity": 1,      "inputs": {        "maxPrice": {          "amount": 50,          "currency": "USD"        }      }    },    {      "publicId": "giftcard_tm4m2tnb4u3dlthj3pvo6zqkha",      "quantity": 1,      "inputs": {        "recipientEmail": "friend@example.com",        "giftMessage": "Happy birthday!",        "value": {          "amount": 25,          "currency": "USD"        },        "maxPrice": {          "amount": 30,          "currency": "USD"        }      }    }  ]}'
Example Response
{  "currency": "USD",  "items": [    {      "publicId": "giftcard_p5udmgvqke2bcrwlk35drsqfqm",      "quantity": 1,      "name": "Amazon 50 USD",      "value": {        "amount": 50,        "currency": "USD"      },      "price": {        "amount": 48.98,        "currency": "USD"      }    },    {      "publicId": "giftcard_tm4m2tnb4u3dlthj3pvo6zqkha",      "quantity": 1,      "name": "Amazon 25 USD",      "value": {        "amount": 25,        "currency": "USD"      },      "price": {        "amount": 26.25,        "currency": "USD"      }    }  ],  "total": {    "amount": 75.23,    "currency": "USD"  }}