Order quotes (post-purchase)

List the plans still available for the items on an existing order, after the customer has bought.

Use these endpoints to offer protection after checkout: on the order status page, in a follow-up email, or in a registration flow. You identify the order; SureBright reads its lines, skips refunded quantities and items that already carry a plan, checks the post-purchase window, and returns one quote per eligible line.

There are two endpoints, depending on where the order lives.

Order recorded byEndpoint
Your e-commerce platform (Shopify, WooCommerce, Shift4Shop, Magento, BigCommerce)GET /quote/api/quote/{platform}/order/listQuotes
The SureBright Order API (point-of-sale and custom stores)GET /quote/api/order/listQuotes

No authentication header is needed for either endpoint. Responses are not cached.

Platform orders#

GET https://{HOST_NAME}/quote/api/quote/{platform}/order/listQuotes

stringrequired

One of shopify, woocommerce, shift4shop, magento, bigcommerce (lower case, in the path).

stringrequired

Your store identifier on that platform.

stringrequired

The platform's order id. careLeadId is accepted as an alias.

stringrequired

The visit identifier for this session.

string

Required for every platform except Shopify: WOOCOMMERCE, SHIFT4SHOP, MAGENTO or BIGCOMMERCE.

string

SYNC to save the quotes before responding. Default ASYNC.

string

Shopify only. fr returns French coverage text where it exists.

bash
curl 'https://{HOST_NAME}/quote/api/quote/shopify/order/listQuotes?shopName=example-store.myshopify.com&leadId=5801234567890&visitId=6a0d0c1e-2b4f-4d8e-9f21-3c5e7a9b1d2f&quoteSyncMode=SYNC'

Response#

quoteListobject[]

One standard quote object (see By Product) per order line that was looked at. Lines that are fully refunded are left out. Each entry adds:

isErrorboolean

Shopify only. true with an empty quoteList when the order itself could not be quoted; see statusMessage.

statusMessagestring

Shopify only, with isError: ORDER_DETAILS_NOT_FOUND, STORE_DETAILS_NOT_FOUND, INVALID_PROVINCE (the order ships to a region the store does not cover), POLICY_PURCHASE_WINDOW_EXPIRED, or FULFILLMENT_DATE_NOT_FOUND (pre-order store, order not yet fulfilled).

Errors#

CodeBodyMeaning
200{"quoteList": []}Nothing to offer, or (non-Shopify) the order or store was not found
400{"isError": true, "message": "Insufficient params"}shopName, leadId or visitId missing
500{"quoteList": []}Unexpected failure

Orders recorded through the Order API#

GET https://{HOST_NAME}/quote/api/order/listQuotes?payload={base64}

For stores that record sales with Create Contracts for Order rather than through a platform, this endpoint re-quotes the order's lines by their categories. All inputs go inside the payload JSON, Base64-encoded as a query parameter, in the same way as By Category.

stringrequired

Base64 (UTF-8) of a JSON object:

string

SYNC to save the quotes before responding.

bash
PAYLOAD=$(printf '%s' '{"country":"US","visitId":"6a0d0c1e-2b4f-4d8e-9f21-3c5e7a9b1d2f","platform":"CUSTOM","storeId":"example-pos-store","orderId":"INV-10492"}' | base64)
curl "https://{HOST_NAME}/quote/api/order/listQuotes?payload=${PAYLOAD}&quoteSyncMode=SYNC"

Response#

quoteListobject[]

One category quote (as on By Category) per order line that has a SureBright category your store sells into, priced on the line's price.

orderDetailsobject

The order as SureBright has it, including orderLineItemList and orderPurchaseDate.

Errors#

CodeBodyMeaning
200{"isError": true, "message": "Order not found."}No order matches orderId or sbOrderId for this store
200{"isError": true, "message": "Store Parent not found."} or a message that the account has no active categoriesThe account is not set up for category quotes
400{"isError": true, "message": "Insufficient params"}payload missing, or country, visitId, platform, a store id or an order id missing inside it
500Internal Server ErrorUnexpected failure