---
title: "Cart quotes"
description: "Price a protection plan for a cart, so one plan covers every eligible item the shopper has added."
---

`POST https://{HOST_NAME}/quote/api/cart/listQuotes`

Use this endpoint when the widget sits on the cart page or in a cart drawer and you want one plan that covers the eligible items in the cart, instead of one plan per product. SureBright reads the cart, works out which items are eligible, prices the plan on their combined value, and returns the same quote object the product endpoints return.

For a single product on a product page, use **By Product** instead.

## Headers

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

No authentication header is needed for this endpoint.

## Query parameters

<ParamField query="quoteSyncMode" type="string">
  `SYNC` to have the quote saved before the response is returned. Send it when you will record an order with the returned `quoteId` and `quoteItemId`. Default `ASYNC`.
</ParamField>

## Body

<ParamField body="storeId" type="string" required>
  Your store identifier (the `myshopify.com` domain on Shopify). `shop` is accepted as an alias.
</ParamField>
<ParamField body="platform" type="string" required>
  One of `SHOPIFY`, `BIGCOMMERCE`, `SHIFT4SHOP`, `LIGHTSPEED`, `LIGHTSPEED_R_SERIES`, `MAGENTO`, `WOOCOMMERCE`.
</ParamField>
<ParamField body="country" type="string" required>
  Two-letter country code of the shopper, `US` or `CA`.
</ParamField>
<ParamField body="visitId" type="string" required>
  The visit identifier returned by the widget configuration call for this shopper session.
</ParamField>
<ParamField body="cartId" type="string">
  The platform cart token. When sent, SureBright reads the cart lines from the platform. Required unless you send `productId`, `variantId` and `quantity`.
</ParamField>
<ParamField body="productId" type="string">
  Product being added to the cart. Required with `variantId` and `quantity` when there is no `cartId`.
</ParamField>
<ParamField body="variantId" type="string">
  Variant being added to the cart.
</ParamField>
<ParamField body="quantity" type="number">
  Quantity being added.
</ParamField>
<ParamField body="cartItemList" type="object[]">
  Items already covered by a plan in the cart (`productId`, `variantId`, `quantity`). When empty, `policyAmountOffset` on each plan equals the plan price; otherwise it is the difference against the plan already in the cart.
</ParamField>

## Example request

```bash
curl -X POST 'https://{HOST_NAME}/quote/api/cart/listQuotes?quoteSyncMode=SYNC' \
  -H 'Content-Type: application/json' \
  -d '{
    "storeId": "example-store.myshopify.com",
    "platform": "SHOPIFY",
    "country": "US",
    "visitId": "6a0d0c1e-2b4f-4d8e-9f21-3c5e7a9b1d2f",
    "cartId": "c1-0f4a9b2e7d6c5b4a3f2e1d0c9b8a7f6e",
    "cartItemList": []
  }'
```

## Response

The body is the standard quote object. The fields below are specific to cart quotes; the rest are described on **By Product**.

<ResponseField name="quoteId" type="string">
  Quote identifier. Send it with the selected `quoteItemId` when you record the order.
</ResponseField>
<ResponseField name="statusMessage" type="string">
  `POLICY_FETCHED_SUCCESSFULLY` when plans were found. Otherwise the reason, for example `STORE_DETAILS_NOT_FOUND` or `POLICY_BAND_NOT_FOUND`.
</ResponseField>
<ResponseField name="PolicyData" type="object[]">
  One entry per plan. Each carries `quoteItemId`, `price`, `monthlyPrice`, `coverageYears`, `deductibleAmount`, `defaultSelection`, and the store's plan `productId` and `variantId` to add to the cart.
  <Expandable title="cart-specific fields">
    <ResponseField name="policyAmountOffset" type="number">
      What the shopper pays on top of the plan already in the cart. Equals `price` when `cartItemList` is empty.
    </ResponseField>
    <ResponseField name="policyProductOptionValueList" type="string[]">
      Option values of the plan product to add (BigCommerce and similar platforms).
    </ResponseField>
    <ResponseField name="policyProductModifierId" type="string">
      Modifier that carries the covered items on platforms that use product modifiers.
    </ResponseField>
  </Expandable>
</ResponseField>
<ResponseField name="coveredProductList" type="object[]">
  The cart items the plan covers: `productId`, `variantId`, `quantity`, `sku`, `price`.
</ResponseField>
<ResponseField name="isCartModified" type="boolean">
  `true` when SureBright changed the plan line already in the cart to match the new covered items.
</ResponseField>
<ResponseField name="policyCartLineItemId" type="string">
  The cart line of the plan SureBright added or updated, when `isCartModified` is `true`.
</ResponseField>
<ResponseField name="storeProductId" type="string">
  Echo of `productId`.
</ResponseField>
<ResponseField name="storeVariantId" type="string">
  Echo of `variantId`.
</ResponseField>
<ResponseField name="coverageV1" type="object">
  Coverage bullets for the widget: `info`, `popup`, `MOBILE_INFO`, `QUICK_VIEW_INFO`, each a list of `{coverageName, optionType, iconType}`.
</ResponseField>
<ResponseField name="tncLink" type="string">
  Link to the plan's terms.
</ResponseField>

## Errors

| Code | Body | Meaning |
|------|------|---------|
| `200` | `statusMessage` other than `POLICY_FETCHED_SUCCESSFULLY`, empty `PolicyData` | No plan for this cart (store, product or price not covered) |
| `400` | `{"isError": true, "message": "Insufficient params"}` | `country`, `visitId`, `platform` or `storeId` missing, or neither `cartId` nor `productId` + `variantId` + `quantity` sent |
| `500` | `{"isError": true, "message": "Internal Server Error"}` | Unexpected failure |

Responses are not cached. Each call returns a fresh quote.
