SureBright API overview

What the SureBright REST API does, the production host, which endpoints need an API key, an endpoint map and your first request in curl.

The SureBright API lets a storefront, app or back office that is not on one of SureBright's platform integrations sell protection plans: look up a product's SureBright category, get plan quotes to show the shopper, and create, update and cancel the plan contracts when the order is paid or changes. It is a JSON REST API served from api.surebright.com in production.

Hosts and authentication#

Production is https://api.surebright.com. The staging host is shared by your SureBright contact or in your Integration Kit, and staging uses its own keys.

Only the Order endpoints under /partner/api/v1/order need credentials: a merchant API key, prefixed sb_live_, in the X-SureBright-Access-Token header. Quote and store category endpoints are public and take no key. There is no sandbox mode: mark orders you send while building with "isTestOrder": true. See Authentication.

Your first request#

List the SureBright categories your store's products map to. No key is needed.

bash
curl 'https://api.surebright.com/quote/api/storeCategory/listStoreCategories?storeId={storeId}'

Then run the Quickstart, four requests that end with a recorded test order, and follow Integrate with the API, which walks one order from the first quote to a cancelled plan.

Endpoint map#

MethodPathPurposeKey
GET/quote/api/storeCategory/listStoreCategoriesList your store's SureBright categoriesNo
GET/quote/api/quote/category/listQuotesQuote plans from a category and a priceNo
GET/quote/api/quote/listWarrantyQuotesQuote plans for a platform product and variantNo
GET/quote/api/quote/listWarrantyQuotes with productUrlQuote plans from a product page URLNo
POST/quote/api/whole-system/listQuotesQuote whole-system plansNo
POST/partner/api/v1/orderCreate contracts when an order is paidYes
PUT/partner/api/v1/orderUpdate or cancel an order's contractsYes
GET/partner/api/v1/orderLook up an order's contractsYes
POST/partner/api/v1/order/whole-systemCreate whole-system contractsYes
POST/partner/api/v1/order/whole-system/cancelCancel a whole-system contractYes

Those are the operations in the machine-readable spec, /api-reference/openapi.json. Other documented endpoints, each with its own page: cart quotes, product quotes in bulk, shipping protection quotes, categorize a product, fulfillment dates (its own server-to-server token), POS sale ingest (enabled per merchant) and partner sign-in (OIDC).

Show the offer without building UI#

Most stores do not call the Quote API from their own code: the SureBright storefront SDK shows the offer on product and cart pages and adds the plan to the cart. See SDK installation and Headless and custom storefronts.

Before you go live#