List Category

Headers#

No authentication header is needed for this endpoint.

Flat list and Ln category tree#

Most stores get a flat list: one call returns every category active on the store, and category / view are ignored.

Stores that SureBright has enabled for the Ln category tree (isLnCategoryEnabled) get the tree one level at a time:

RequestResponse
no categoryThe top-level categories the store sells into
category=<sbCategoryId>That node's children. A child that is a leaf comes back as the store's priced category (one item per store category and country)
view=leavesEvery offered leaf in one flat array, sorted by lnPathName (category is ignored)

Every item in a tree response carries isLnCategory: true, lnSbCategoryId, lnLevel, parentSbCategoryId, isLeaf and childCount. Non-leaf nodes have an empty labelList and no pricing; pass their sbCategoryId as category to descend. Leaf items are the same shape as a flat category plus:

  • quoteSbCategoryId – the id quotes resolve against (same value as sbCategoryId); send it as storeCategoryList[].sbCategoryId when listing quotes by category

  • legacySbCategoryIdList – the flat category ids this leaf replaces, for mapping an existing classification to its leaf

  • lnPathName – the full path, for example Home Appliances > Small Home Appliance > Air Fryers

Use view=leaves when you price items rather than browse. Use the level-by-level walk when you build a category picker.

Walking the tree#

bash
# 1. Top level
curl 'https://{HOST_NAME}/quote/api/storeCategory/listStoreCategories?storeId=example-store.myshopify.com'

# 2. Children of one node (its sbCategoryId from step 1)
curl 'https://{HOST_NAME}/quote/api/storeCategory/listStoreCategories?storeId=example-store.myshopify.com&category=9d2c7e1a-3f4b-4c5d-8e6f-1a2b3c4d5e6f'

# 3. Every priced leaf in one call
curl 'https://{HOST_NAME}/quote/api/storeCategory/listStoreCategories?storeId=example-store.myshopify.com&view=leaves'

A non-leaf node in step 1 or 2 looks like this; pass its sbCategoryId as category to descend:

json
{
  "sbCategoryId": "9d2c7e1a-3f4b-4c5d-8e6f-1a2b3c4d5e6f",
  "sbCategoryName": "Home Appliances",
  "categoryName": "Home Appliances",
  "labelList": [],
  "isLnCategory": true,
  "lnSbCategoryId": "9d2c7e1a-3f4b-4c5d-8e6f-1a2b3c4d5e6f",
  "lnLevel": 1,
  "parentSbCategoryId": null,
  "isLeaf": false,
  "childCount": 3
}

A leaf carries the store category fields of the flat list plus the tree fields:

lnSbCategoryIdstring

The leaf's id in the tree. It can differ from sbCategoryId when the store's pricing is still configured under a flat category the leaf replaces.

quoteSbCategoryIdstring

The id to send as storeCategoryList[].sbCategoryId on By Category.

legacySbCategoryIdListstring[]

The flat category ids this leaf replaces.

lnPathNamestring

The full path, for example Home Appliances > Small Home Appliance > Air Fryers.

lnLevelnumber

Depth in the tree, 1 for a top-level node.

parentSbCategoryIdstring

The parent node, null at the top level.

Nodes are sorted by their configured order, then by name; view=leaves is sorted by lnPathName. A node with no priced leaf beneath it is left out, so the tree only shows what the store sells into.

Errors#

CodeMeaning
400Neither storeId nor storeParentId sent; category is not a single id; view is not leaves; or (tree stores) category is unknown for this store or has no child categories
503Tree stores only: the Ln category tree could not be loaded
GEThttps://api.surebright.com/quote/api/storeCategory/listStoreCategories

Lists the warranty categories active on a store. Send either storeId or storeParentId. Stores on the flat category list get every active category in one array. Stores enabled for the Ln category tree (isLnCategoryEnabled) get one level of the tree per call: omit category for the top level, pass category=<sbCategoryId> for a node's children, or pass view=leaves for every offered leaf at once. Use the returned sbCategoryId when listing quotes by category.

Query parameters

storeIdstring

A unique identifier for a store, shared as part of the integration kit. Required when storeParentId is not sent.

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

Unique identifier for the store parent. Required when storeId is not sent. Used instead of storeId when both are sent.

Example: 13612f29-8ec5-49ad-bab1-5ab09b51367e
categorystring

Ln tree stores only: sbCategoryId of a non-leaf node returned by a previous call; the response is that node's children. Ignored for stores on the flat list.

Example: 4c3103e4-38dc-4171-96e5-b4b77ab0e96f
viewstring

Ln tree stores only: view=leaves returns every offered leaf of the tree in one flat array (category is ignored). Ignored for stores on the flat list.

Example: leaves