Coverage text

The coverage bullets the widget shows for a category, with and without a priced store category.

Every quote carries its coverage bullets in coverageV1. When you need the text before you have a quote, for example on a category landing page, a comparison table or a product page where the price is not yet known, use these two endpoints. Both are read-only and need no authentication.

EndpointReturns
GET /quote/api/insurerCategory/listCoverageOptionsThe bullets of the one coverage type your store offers for a category
GET /quote/api/insurerCategory/listProductCoverageEvery coverage type the category can carry on your store, with bullets and plan terms, even before the category is priced

Coverage options for a category#

GET https://{HOST_NAME}/quote/api/insurerCategory/listCoverageOptions

stringrequired

Your store identifier.

stringrequired

The SureBright category (from List Category or a quote).

string

Default SHOPIFY.

bash
curl 'https://{HOST_NAME}/quote/api/insurerCategory/listCoverageOptions?storeId=example-store.myshopify.com&sbCategoryId=2b7e4f10-9c3a-4d5e-8f61-7a2b3c4d5e6f'

Response#

isErrorboolean

false on success.

coverageTypestring

AD (accidental damage), B (breakdown) or AB (both).

coverageListobject[]

Errors#

CodeBodyMeaning
400{"isError": true, "message": "Insufficient params"}storeId or sbCategoryId missing
500{"isError": true, "message": "Internal server error"}The store does not offer this category on this platform, or no coverage text is configured for it

Product coverage for a category#

GET https://{HOST_NAME}/quote/api/insurerCategory/listProductCoverage

Answers "what protection can this product carry here" from the product's SureBright category alone. It works for a store whose categories are not priced yet, so By Product would return no plans, and it can classify a product URL for you when you do not have the category.

stringrequired

Your store identifier.

string

The SureBright category. Required unless base64ProductURL is sent.

string

A product page URL, Base64-encoded. SureBright classifies it first and uses the resulting category. See Categorize a product.

string

Default SHOPIFY.

string

US or CA. Limits the answer to what the store offers in that country.

bash
curl 'https://{HOST_NAME}/quote/api/insurerCategory/listProductCoverage?storeId=example-store.myshopify.com&sbCategoryId=2b7e4f10-9c3a-4d5e-8f61-7a2b3c4d5e6f&country=US'

Response#

isErrorboolean

false on success.

sbCategoryIdstring

The category answered for (the classified one when you sent a URL).

categoryNamestring

Its name, or null when the store does not offer it.

isStoreCategoryRequiredboolean

Always false: this answer does not depend on a priced store category.

coverageTypeListobject[]

One entry per coverage type the store offers for the category. Empty when it offers none.

Errors#

CodeBodyMeaning
400{"isError": true, "message": "Insufficient params: storeId and sbCategoryId (or base64ProductURL)"}Missing inputs, or the URL could not be classified
404{"isError": true, "message": "No active coverage for this category on this store"}The lookup failed
500{"isError": true, "message": "Internal server error"}Unexpected failure