Hub Gateway API
List Categories
Category filter options for the Hub catalog.
GET /api/hub/categoriesUse Case
Return the categories worth showing in the catalog filter: active, non-internal
categories that have at least one Hub-visible (priced) product. This keeps the
filter from listing empty or internal buckets. Ordered by rank then name.
Response sets cache-control: no-store.
The returned handle values are the same ones accepted by the category query
parameter on List Products.
Header Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
x-hub-api-key | string | true | Shared Hub service key. |
Example Request
curl "https://<your-b2b-host>/api/hub/categories" \
-H "x-hub-api-key: $HUB_API_KEY"Response Parameters
| Parameter | Data Type | Description |
|---|---|---|
items | array | Category options. |
items[].handle | string | Stable category handle (use as the category filter). |
items[].name | string | Display label. |
Example Response
{ "items": [ { "handle": "dining", "name": "Dining" } ] }Error Responses
| Status | Body | Description |
|---|---|---|
401 | { "error": "Unauthorized" } | Bad or missing API key. |
500 | { "error": "Failed to load categories" } | Unhandled server error. |