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:
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 assbCategoryId); send it asstoreCategoryList[].sbCategoryIdwhen listing quotes by categorylegacySbCategoryIdList– the flat category ids this leaf replaces, for mapping an existing classification to its leaflnPathName– the full path, for exampleHome 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#
# 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:
{
"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:
lnSbCategoryIdstringThe 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.
quoteSbCategoryIdstringThe id to send as storeCategoryList[].sbCategoryId on By Category.
legacySbCategoryIdListstring[]The flat category ids this leaf replaces.
lnPathNamestringThe full path, for example Home Appliances > Small Home Appliance > Air Fryers.
lnLevelnumberDepth in the tree, 1 for a top-level node.
parentSbCategoryIdstringThe 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#
https://api.surebright.com/quote/api/storeCategory/listStoreCategoriesLists 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
storeIdstringA unique identifier for a store, shared as part of the integration kit. Required when storeParentId is not sent.
ecca4210-09a4-446c-ad87-5e65bd50df12storeParentIdstringUnique identifier for the store parent. Required when storeId is not sent. Used instead of storeId when both are sent.
13612f29-8ec5-49ad-bab1-5ab09b51367ecategorystringLn 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.
4c3103e4-38dc-4171-96e5-b4b77ab0e96fviewstringLn 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.
leaves