Appearance
GET
/web-pages/draft/drafts/{draftId}/trees/{categoryNodeId}Required scope:
viskan:draft:readReturns the hierarchical category tree from a specific category that will be seen as the root of the tree.
Parameters
Path parameters
draftId string Format:
uuidIdentifier of the draft. A draft is a workspace that holds unpublished changes to web store content.
categoryNodeId string Format:
uuidID of a category node. Retrieves the tree starting from this category as root.
Query parameters
countryCode stringCountry code (in ISO 3166-1 alpha-2 format) to retrieve the categories' paths for. This or contentLocaleId must be provided.
languageCode stringLanguage code (in ISO 639-1 format) to retrieve the categories' paths for. This or contentLocaleId must be provided.
contentLocaleId stringThe content locale to retrieve the categories' paths for. This or countryCode and languageCode combination must be provided.
Response
The hierarchical category tree is successfully retrieved.
JSON
{
"categoryTreeId": "6b2a2871-f20d-4fa0-895e-e3c41976db7a",
"categoryId": "fb840e50-8a8b-477c-a3c8-fffe2bf97e1c",
"categoryName": "Start Page",
"hidden": false,
"indexed": true,
"protectionLevel": "NONE",
"protectionFallbackCategoryId": "0ee32a6e-0c4d-4f7b-bd89-f21ddad81135",
"pageId": "5cf50fd6-5ab3-43bc-8291-e74665d1f8ab",
"path": "/start",
"title": "Start Page",
"publishedAt": "2025-01-15T10:30:00+01:00",
"status": "MODIFIED",
"availableTranslations": [
{
"pageId": "946fe813-1c54-42f9-9e75-f87072badc22",
"contentLocaleId": "774ab227-18fe-4541-ba3b-06ad3e95ae75",
"languageCode": "sv",
"countryCode": "SE",
"path": "/start"
}
],
"children": [
{
}
]
}
| Error code | Description |
|---|---|
web-pages.category-tree.cyclic-dependency | Cyclic dependency detected in category tree. |
web-pages.get-tree.category-not-found | Could not find the category by ID. |
web-pages.get-tree.content-locale-id-is-exclusive-with-country-code-and-language-code | Content locale ID is exclusive with country code and language code. |
web-pages.get-tree.content-locale-not-found | Could not find the locale by ID or by country code and language code combination. |
web-pages.get-tree.country-code-invalid | Specified country code is invalid. |
web-pages.get-tree.draft-not-found | Draft not found. |
web-pages.get-tree.language-code-invalid | Specified language code is invalid. |
web-pages.get-tree.start-page-category-not-found | Start page category for the web store was not found. |
web-pages.get-tree.web-store-not-found | Web store specified on the selected draft was not found. |