By Url

Get the protection plans and prices SureBright offers for a product, from its product page URL. Parameters, example request and response, and errors.

Headers#

No authentication header is needed for this endpoint.

How the product is resolved#

SureBright resolves the product from the URL you send, so the store's catalog must already be indexed by SureBright.

  • Shopify stores: send the plain product page URL containing /products/<handle>. If the product has more than one variant, include ?variant=<variantId>; otherwise the URL is rejected with 503 Invalid Url.

  • Custom storefronts that SureBright has enabled for URL quotes: send the URL Base64-encoded. A value that cannot be decoded returns 400 Invalid website URL.

This is the same endpoint as By Product. Send productUrl instead of productId and variantId; storeId and country are required in both cases.

Error codes#

The HTTP status code and the errorType in the body carry the same value.

CodeMeaning
501Insufficient parameters (storeId, country, and productUrl or productId + variantId)
502Validation failed: country must be US or CA
503Invalid URL: the product or variant could not be resolved from productUrl
504Product not found, or not eligible for a warranty
505No price band configured for the product's category and price
500Something unexpectedly went wrong

Country and State Codes#

GEThttps://api.surebright.com/quote/api/quote/listWarrantyQuotes

Fetches the warranty quotes for the product shown on a product page URL. SureBright resolves the product from the URL, so this endpoint is for stores whose catalog SureBright already indexes. No authentication is required.

Query parameters

storeIdstringrequired

A unique identifier for a store will be shared as part of the integration kit.

Example: ecca4210-09a4-446c-ad87-5e65bd50df12
countrystringrequired

The country code of the identified customer location

Example: US
statestring

The state code of the identified customer location. Accepted but not currently used by this endpoint.

Example: AL
productUrlstringrequired

The product page URL shown to the customer. For Shopify stores send the plain URL containing /products/<handle>, optionally with ?variant=<variantId> (required when the product has more than one variant). For custom storefronts that SureBright has enabled for URL quotes, send the URL Base64-encoded.

Example
https://store.example.com/products/robot-vacuum?variant=43456715358462
platformstring

Store platform. Defaults to SHOPIFY. Ignored for custom storefronts enabled for URL quotes.

Example: SHOPIFY