Shipping protection quote
Price shipping protection for the items in a cart and learn which items are eligible.
POST https://{HOST_NAME}/quote/api/quote/shipping
Use this endpoint on the cart page or in checkout to offer shipping protection for the whole order. Send the cart lines; SureBright drops items that cannot carry shipping protection, prices the rest, and returns the plan product to add to the cart together with the coverage bullets. Shipping protection must be enabled on your store; see Shipping protection.
Shipping protection is priced for US shipments.
Headers#
No authentication header is needed for this endpoint.
Body#
Your store identifier. shop is accepted as an alias.
Default SHOPIFY.
Cart currency. Default USD.
Shopper's two-letter country code. A quote is only returned for US.
Shopper's state or province code, used for the per-item eligibility check.
The visit identifier for this session.
The cart lines. Each needs productId, variantId, price and quantity; a line missing any of them is returned unpriced.
true when the call comes from the checkout extension. The per-item product-protection eligibility then follows the checkout settings.
Example request#
curl -X POST 'https://{HOST_NAME}/quote/api/quote/shipping' \
-H 'Content-Type: application/json' \
-d '{
"storeId": "example-store.myshopify.com",
"platform": "SHOPIFY",
"currency": "USD",
"country": "US",
"visitId": "6a0d0c1e-2b4f-4d8e-9f21-3c5e7a9b1d2f",
"cartItems": [
{ "productId": "8011223344556", "variantId": "44011223344556", "price": 349.00, "quantity": 1 },
{ "productId": "8011223344999", "variantId": "44011223344999", "price": 29.00, "quantity": 2 }
]
}'Response#
quoteIdstringShipping protection quote identifier.
pricenumberPrice of the shipping protection plan for this cart.
siProductIdstringThe shipping protection product to add to the cart.
siVariantIdstringThe variant of that product priced for this cart.
policyProductOptionValueListstring[]Option values of the plan product, on platforms that use them.
policyProductModifierIdstringModifier id, on platforms that use product modifiers.
coveredProductsListobject[]The lines the plan covers, as priced.
productListobject[]Every line you sent, with the eligibility result.
coverageListobject[]Coverage bullets to show, {coverageName, optionType, iconType}. optionType is COVERAGE_OPTION for the desktop list and MOBILE_COVERAGE_OPTION for the mobile list.
brandLogoSrcstringYour brand logo, when configured on the widget.
Errors#
No-quote outcomes come back with HTTP 200 and isError: true; productList is still returned so you can show per-item eligibility.
Responses are not cached.