During check out, get the protection quote amount for the cart and add that amount to the order.
Security
api_key
- https://app.useonward.com/api/v1https://app.useonward.com/api/v1/quotes
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"
}
}
}'Successful operation
Tokenized reference to this Quote that you will use when creating the protected Order after checkout
Example:"c0740f7e3d4718a64fd9ce18101961d210d1c61c8c8afd62f95d62d8c433347b$$qkJClv/+sWfpOfPqp4sI46PxzBuBCW4eEDKsL4q87aFhRT9mdCpIuEWwuRuvbkX4BS8=--AUnUz8WgunyUi
Response
{ "id": "8c0d0946dc595ecfe090ef85", "token": "c0740f7e3d4718a64fd9ce18101961d210d1c61c8c8afd62f95d62d8c433347b$$qkJClv/+sWfpOfPqp4sI46PxzBuBCW4eEDKsL4q87aFhRT9mdCpIuEWwuRuvbkX4BS8=--AUnUz8WgunyUiZ4o--nnYz0Lj5WsxSqsUxtBpIIQ==", "price": { "cents": 1299, "currency": "USD" }, "variant": { "id": 0, "sku": "string" } }