Menu
List categories
List categories
/v1/categoriesUse it in a workflow
- Add a step and choose the SCAYLE Storefront connector.
- Pick the List categories action (under categories).
- Fill in the fields below, then reference the result from later steps as
{{listCategories.response.data}}.
Request
Query parameters
shopIdintegerThe numeric ID of the shop to resolve the request against. Every shop in a multi-shop setup has a unique `shopId`. **Priority:** `shopId` (or the `X-Shop-Id` header) takes precedence over all other shop identification parameters. When `shopId` is present, `shopKey`, `countryCode`, and `locale` are ignored entirely. **Alternative:** If neither `shopId` nor `X-Shop-Id` is provided, you must supply all three of `shopKey`, `countryCode`, and `locale` together to identify the shop.
shopKeystringThe unique string key identifying the shop (e.g. `sa`, `de`). **Must be provided together with `countryCode` and `locale`** as a query-parameter alternative to `shopId`. All three parameters are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `shopId` or the `X-Shop-Id` header is present.
countryCodestringThe ISO 3166-1 alpha-2 country code of the shop (e.g. `DE`, `AT`). Automatically normalised to uppercase. **Must be provided together with `shopKey` and `locale`** as a query-parameter alternative to `shopId`. All three parameters are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `shopId` or the `X-Shop-Id` header is present.
localestringThe locale of the shop (e.g. `en_GB`, `de_DE`). Used to validate that the resolved shop's locale matches the requested locale. **Must be provided together with `shopKey` and `countryCode`** as a query-parameter alternative to `shopId`. All three parameters are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `shopId` or the `X-Shop-Id` header is present.
idsarray<integer>Restrict results to categories that match the specified comma-separated list of IDs.
formatstringThe format in which the categories are returned, either as a hierarchical tree or as a flat list. In the flat list format, all categories are presented in a single sequence that follows the hierarchy's top‑to‑bottom order, without any nesting. The two formats treat hidden categories differently (unless `showHidden=true` is set): the tree excludes a hidden category together with its whole subtree, while the flat list only excludes the hidden categories themselves, so visible categories below a hidden ancestor are still returned. Their `parentId` and `rootlineIds` can therefore reference hidden categories that are not part of the list. Categories below a hidden ancestor also do not show up in any `childrenIds` in the list and `depth` may skip levels between consecutive entries, so consumers should iterate the list instead of following child links. _Note: This parameter is ignored when the `ids` parameter is used._
One oftreelistDefault "tree"
showHiddenbooleanA flag which determines whether hidden categories should be returned.
Default false
depthintegerThe maximum depth of nested categories to retrieve. If not provided, all levels are returned.
witharray<string>A list of optional fields that can be included in the response, typically omitted to improve efficiency and minimize response size. This parameter can also control how much data certain fields return. For example, custom data is included automatically, but it can be restricted to specific keys or omitted entirely. The table below provides a comprehensive list of all possible fields and their purpose: Field | Description --- | --- `parents` | Include all ancestor categories.<br><br>_Note: This option is supported only when retrieving a single category or when the request uses the `ids` parameter to fetch the category list._ `children` | Include all descendant categories.<br><br>_Note: The number of levels returned can be adjusted using the `depth` parameter._ `properties:name(keyA\|...)` | Include the properties, limited to the specified names. `productSorting` | Include the product sorting configuration, which defines how products are ordered within the category. Reflects the customer segment of the shopper identified by `X-Customer-Token`. `seo` | Include the SEO metadata for the category page (meta title, meta description, SEO headline, SEO description, canonical URL, and search engine indexing flag). `countryLevelCustomData` | Include the country-level custom data. `countryLevelCustomData:key()` | Include the country‑level custom data as an empty object. `countryLevelCustomData:key(keyA\|...)` | Include the country‑level custom data, limited to the specified keys. `shopLevelCustomData` | Include the shop-level custom data. `shopLevelCustomData:key()` | Include the shop‑level custom data as an empty object. `shopLevelCustomData:key(keyA\|...)` | Include the shop‑level custom data, limited to the specified keys.
Headers
X-Shop-IdintegerThe numeric ID of the shop to resolve the request against. Every shop in a multi-shop setup has a unique shop ID. **Priority:** `X-Shop-Id` (or the `shopId` query parameter) takes precedence over all other shop identification parameters. When this header is present, `X-Shop-Key`, `X-Country-Code`, and `X-Locale` are ignored entirely. **Alternative:** If neither `X-Shop-Id` nor `shopId` is provided, you must supply all three of `X-Shop-Key`, `X-Country-Code`, and `X-Locale` together to identify the shop.
X-Shop-KeystringThe unique string key identifying the shop (e.g. `sa`, `de`). **Must be provided together with `X-Country-Code` and `X-Locale`** as a header-based alternative to `X-Shop-Id`. All three headers are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `X-Shop-Id` or the `shopId` query parameter is present.
X-Country-CodestringThe ISO 3166-1 alpha-2 country code of the shop (e.g. `DE`, `AT`). Automatically normalised to uppercase. **Must be provided together with `X-Shop-Key` and `X-Locale`** as a header-based alternative to `X-Shop-Id`. All three headers are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `X-Shop-Id` or the `shopId` query parameter is present.
X-LocalestringThe locale of the shop (e.g. `en_GB`, `de_DE`). Used to validate that the resolved shop's locale matches the requested locale. **Must be provided together with `X-Shop-Key` and `X-Country-Code`** as a header-based alternative to `X-Shop-Id`. All three headers are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `X-Shop-Id` or the `shopId` query parameter is present.
X-Customer-TokenstringA JWT identifying the customer. When `productSorting` is included and the customer belongs to a customer segment with its own sorting for a category, `productSorting` returns that segment's keys, the same keys `GET /v1/products` applies. Without it, or with an invalid or expired token, the default keys are returned and the request does not fail.
Response
Returns 200 with a array<object>. Read it in later steps with {{listCategories.response.data.<field>}}.
Need more? See the SCAYLE Storefront guide for connection setup and behaviour shared by every action.