Menu
Get a category
Get a category
/v1/categories/{key}Use it in a workflow
- Add a step and choose the SCAYLE Storefront connector.
- Pick the Get a category action (under categories).
- Fill in the fields below, then reference the result from later steps as
{{getACategory.response.data}}.
Request
Path parameters
keyoneOfrequiredThe unique numeric identifier of the category or its slug‑based path from the root.
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.
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 an object. Read it in later steps with {{getACategory.response.data.<field>}}.
idintegerA unique numeric identifier.
namestringThe name of the category.
slugstringA unique, human-readable identifier automatically generated based on the category name, typically used in URLs.
pathstringThe breadcrumb from the root category to the current category, using slugs to form the URL structure.
parentIdintegerThe unique numeric identifier of the parent category. Root‑level categories use a value of `0`.
rootlineIdsarray<integer>The ordered list of category IDs forming the hierarchical path from the root category to the current category.
childrenIdsarray<integer>The list of category IDs of the direct descendants in the hierarchy.
propertiesarray<object>A list of key-value pairs defining specific properties of the category.
namestringrequiredThe name of the property.
valuestring | number | nullrequiredThe value of the property.
isHiddenbooleanFlag indicating whether the category should be displayed on the frontend.
depthintegerThe hierarchical depth of the category. The root has depth `1`, and each descendant increases the depth by one.
supportedFilterarray<string>A list of filters that can be used for filtering products in the category
shopLevelCustomDataobjectAdditional data relevant for all shops.
countryLevelCustomDataobjectAdditional data relevant for the current shop.
parentobjectCircular reference: #/components/schemas/Category
childrenarray<object>The child categories at the next level of the hierarchy. _Note: This field is omitted when it appears within the `parent` field to avoid recursive nesting, when categories are retrieved using the `list` format, or when a single category is requested without including its children through the `with` parameter._
productSortingobjectThe configuration that defines how products are ordered within the category. On the categories, navigation and search v2 endpoints, reflects the customer segment of the shopper identified by `X-Customer-Token`. _Note: When a category has both custom sorting and smart sorting enabled, products are ordered by the custom sorting key first. If several products share the same custom sorting value, the smart sorting key determines their order._
smartSortingKeystring | nullrequiredThe smart sorting key used to order products.
customSortingKeystring | nullrequiredThe custom sorting key used to order products.
seoobjectSEO metadata for a category page.
metaTitlestring | nullrequiredThe meta title used in search engine results pages.
metaDescriptionstring | nullrequiredThe meta description used in search engine results pages.
seoHeadlinestring | nullrequiredThe SEO headline displayed as the main heading on the category page.
seoDescriptionstring | nullrequiredThe SEO description displayed on the category page.
canonicalUrlstring | nullrequiredThe canonical URL for the category page, used to prevent duplicate content issues.
allowSearchEngineIndexingboolean | nullrequiredFlag indicating whether search engines are allowed to index the category page.
{
"id": 0,
"name": "string",
"slug": "string",
"path": "string",
"parentId": 0,
"rootlineIds": [
0
],
"childrenIds": [
0
],
"properties": [
{
"name": "string",
"value": "string"
}
],
"isHidden": false,
"depth": 0,
"supportedFilter": [
"string"
],
"shopLevelCustomData": {}
}
Need more? See the SCAYLE Storefront guide for connection setup and behaviour shared by every action.