Skip to content

Quotes

Protection quotes for customers during checkout.

Operations

Get a protection quote

Request

During check out, get the protection quote amount for the cart and add that amount to the order.

Security
api_key
Headers
Content-Typestringrequired

Content-Type must be application/json

Example:application/json
Acceptstringrequired

Accept must be application/json

Example:application/json
Bodyapplication/jsonrequired
cartobject(Cart)required
curl -i -X POST \
  https://app.useonward.com/api/v1/quotes \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "cart": {
      "amount_protected": {
        "cents": 1299,
        "currency": "USD"
      }
    }
  }'

Responses

Successful operation

Bodyapplication/json
idstring

Onward's ID for this Quote

Example:"8c0d0946dc595ecfe090ef85"
tokenstring

Tokenized reference to this Quote that you will use when creating the protected Order after checkout

Example:"c0740f7e3d4718a64fd9ce18101961d210d1c61c8c8afd62f95d62d8c433347b$$qkJClv/+sWfpOfPqp4sI46PxzBuBCW4eEDKsL4q87aFhRT9mdCpIuEWwuRuvbkX4BS8=--AUnUz8WgunyUi
priceobject(Money)

Price of protection to be charged to the customer

variantobject

(Only included for Shopify shops) The Shopify Variant to add to cart in order to purchase this Quote

Response
{ "id": "8c0d0946dc595ecfe090ef85", "token": "c0740f7e3d4718a64fd9ce18101961d210d1c61c8c8afd62f95d62d8c433347b$$qkJClv/+sWfpOfPqp4sI46PxzBuBCW4eEDKsL4q87aFhRT9mdCpIuEWwuRuvbkX4BS8=--AUnUz8WgunyUiZ4o--nnYz0Lj5WsxSqsUxtBpIIQ==", "price": { "cents": 1299, "currency": "USD" }, "variant": { "id": 0, "sku": "string" } }