---
title: "Shipping protection quote"
description: "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/overview).

Shipping protection is priced for US shipments.

## Headers

| Header | Description | Required |
|--------|-------------|----------|
| Content-Type | application/json | Yes |

No authentication header is needed for this endpoint.

## Body

<ParamField body="storeId" type="string" required>
  Your store identifier. `shop` is accepted as an alias.
</ParamField>
<ParamField body="platform" type="string">
  Default `SHOPIFY`.
</ParamField>
<ParamField body="currency" type="string">
  Cart currency. Default `USD`.
</ParamField>
<ParamField body="country" type="string" required>
  Shopper's two-letter country code. A quote is only returned for `US`.
</ParamField>
<ParamField body="province" type="string">
  Shopper's state or province code, used for the per-item eligibility check.
</ParamField>
<ParamField body="visitId" type="string">
  The visit identifier for this session.
</ParamField>
<ParamField body="cartItems" type="object[]" required>
  The cart lines. Each needs `productId`, `variantId`, `price` and `quantity`; a line missing any of them is returned unpriced.
</ParamField>
<ParamField body="isSBCheckoutExtension" type="boolean">
  `true` when the call comes from the checkout extension. The per-item product-protection eligibility then follows the checkout settings.
</ParamField>

## Example request

```bash
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

<ResponseField name="quoteId" type="string">
  Shipping protection quote identifier.
</ResponseField>
<ResponseField name="price" type="number">
  Price of the shipping protection plan for this cart.
</ResponseField>
<ResponseField name="siProductId" type="string">
  The shipping protection product to add to the cart.
</ResponseField>
<ResponseField name="siVariantId" type="string">
  The variant of that product priced for this cart.
</ResponseField>
<ResponseField name="policyProductOptionValueList" type="string[]">
  Option values of the plan product, on platforms that use them.
</ResponseField>
<ResponseField name="policyProductModifierId" type="string">
  Modifier id, on platforms that use product modifiers.
</ResponseField>
<ResponseField name="coveredProductsList" type="object[]">
  The lines the plan covers, as priced.
</ResponseField>
<ResponseField name="productList" type="object[]">
  Every line you sent, with the eligibility result.
  <Expandable title="fields">
    <ResponseField name="sbCategoryId" type="string">
      The product's SureBright category, when the product is known.
    </ResponseField>
    <ResponseField name="isShippingInsuranceEligible" type="boolean">
      Present and `false` when the item cannot carry shipping protection and was left out of the price.
    </ResponseField>
    <ResponseField name="isEligible" type="boolean">
      Whether the item can carry product protection, for the checkout extension to decide what else to offer.
    </ResponseField>
    <ResponseField name="ineligibilityReason" type="string">
      Why `isEligible` is `false`, for example `Product is not eligible for shipping protection`, `Store does not support this country`, `Product protection is not enabled on checkout for this store`, `Missing product information`.
    </ResponseField>
  </Expandable>
</ResponseField>
<ResponseField name="coverageList" type="object[]">
  Coverage bullets to show, `{coverageName, optionType, iconType}`. `optionType` is `COVERAGE_OPTION` for the desktop list and `MOBILE_COVERAGE_OPTION` for the mobile list.
</ResponseField>
<ResponseField name="brandLogoSrc" type="string">
  Your brand logo, when configured on the widget.
</ResponseField>

## Errors

No-quote outcomes come back with HTTP `200` and `isError: true`; `productList` is still returned so you can show per-item eligibility.

| Code | Body | Meaning |
|------|------|---------|
| `200` | `{"isError": true, "message": "Shipping insurance is not enabled for this store", "productList": [...]}` | Shipping protection is off for the store |
| `200` | `{"isError": true, "message": "No products eligible for shipping protection", "productList": [...]}` | Every line was dropped |
| `200` | `{"isError": true, "message": "Insufficient data in cart items", "productList": [...]}` | No line had all of `productId`, `variantId`, `price`, `quantity` |
| `200` | `{"isError": true, "message": "Unable to get Quote."}` or `"Shipping quote service error"` | Pricing failed, including a non-US `country` |
| `400` | `{"isError": true, "message": "Insufficient params"}` | `storeId` missing |
| `500` | `{"isError": true, "message": "Internal Server Error"}` | Unexpected failure |

Responses are not cached.
