Appearance
POST
/web-pages/draft/drafts/{draftId}/categoriesRequired scope:
viskan:draft:createCreates a category.
Parameters
Path parameters
draftId string Format:
uuidIdentifier of the draft. A draft is a workspace that holds unpublished changes to web store content.
Request body
JSON
{
"categoryName": "Start Page",
"hidden": false,
"indexed": true,
"protectionLevel": "NONE",
"protectionFallbackCategoryId": "0ee32a6e-0c4d-4f7b-bd89-f21ddad81135",
"treePlacement": [
{
"categoryTreeId": "6b2a2871-f20d-4fa0-895e-e3c41976db7a",
"parentCategoryTreeId": "fb840e50-8a8b-477c-a3c8-fffe2bf97e1c",
"siblingCategoryTreeId": "123e4567-e89b-12d3-a456-426614174000"
}
]
}
Response
Category successfully created.
JSON
{
"categoryId": "415eede9-b5ce-4992-ab10-a553acf5c0bb"
}
| Error code | Description |
|---|---|
web-pages.create-category.category-name-required | Category name is required. |
web-pages.create-category.category-name-too-long | Category name cannot exceed 30 characters. |
web-pages.create-category.draft-not-found | Draft not found. |
web-pages.create-category.fallback-category-not-found | Protection fallback category not found in the category tree. |
web-pages.create-category.fallback-category-protection-level-invalid | Protection fallback category cannot be set if protection level is NONE. |
web-pages.create-category.parent-category-not-found | Parent category with specified ID was not found in the category tree. |
web-pages.create-category.parent-category-removed | Parent category has been removed. |
web-pages.create-category.sibling-category-does-not-have-same-parent | Sibling category with specified ID does not have the same parent category as the new category being created. |
web-pages.create-category.sibling-category-not-found | Sibling category with specified ID was not found in the category tree. |
web-pages.create-category.sibling-category-removed | Sibling category has been removed. |