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.
No authentication header is needed for either endpoint. Responses are not cached.
Platform orders#
GET https://{HOST_NAME}/quote/api/quote/{platform}/order/listQuotes
One of shopify, woocommerce, shift4shop, magento, bigcommerce (lower case, in the path).
Your store identifier on that platform.
The platform's order id. careLeadId is accepted as an alias.
The visit identifier for this session.
Required for every platform except Shopify: WOOCOMMERCE, SHIFT4SHOP, MAGENTO or BIGCOMMERCE.
SYNC to save the quotes before responding. Default ASYNC.
Shopify only. fr returns French coverage text where it exists.
curl 'https://{HOST_NAME}/quote/api/quote/shopify/order/listQuotes?shopName=example-store.myshopify.com&leadId=5801234567890&visitId=6a0d0c1e-2b4f-4d8e-9f21-3c5e7a9b1d2f"eSyncMode=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:
isErrorbooleanShopify only. true with an empty quoteList when the order itself could not be quoted; see statusMessage.
statusMessagestringShopify 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#
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.
Base64 (UTF-8) of a JSON object:
SYNC to save the quotes before responding.
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}"eSyncMode=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.
orderDetailsobjectThe order as SureBright has it, including orderLineItemList and orderPurchaseDate.