Skip to content

Categories

These API’s are for creating, accessing, and updating categories inside of CM Box.

POST /api/content/management/categories

Creates a new category.

Headers

Content-Type: application/json

Request Body

name - Name of the category
description - Description of the category
parent - ID of the parent taxonomy or category

Example Request

{
"name": "main cat 5",
"description": "",
"parent": "TAXONOMY_173935E6F72546B89E2B82DC1ACBFA53"
}

Response

200 - OK on success

Example Response

{
"name": "main cat 5",
"apiName": "tes_ma4",
"apiNameSearch": "",
"description": "",
"parent": "TAXONOMY_173935E6F72546B89E2B82DC1ACBFA53",
"id": "CATEGORY_B8FFCE3CFF264A45A238D611326EA097",
"sortOrder": 5
}

GET /api/content/management/categories

Retrieves a list of all categories.

Response

200 - OK on success

Example Response

{
"count": 4,
"items": [
{
"name": "main cat 1",
"apiName": "tes_mai",
"apiNameSearch": "",
"description": "",
"parent": "TAXONOMY_173935E6F72546B89E2B82DC1ACBFA53",
"id": "CATEGORY_CF957ADE4C8949ED91CD5F282DB57842",
"sortOrder": 1,
"expanded": false
},
{
"name": "main cat 2",
"apiName": "tes_ma1",
"apiNameSearch": "",
"description": "",
"parent": "TAXONOMY_173935E6F72546B89E2B82DC1ACBFA53",
"id": "CATEGORY_59D4CADB3A574A418AD730A68D59DEFC",
"sortOrder": 2,
"expanded": false
},
{
"name": "main cat 3",
"apiName": "tes_ma2",
"apiNameSearch": "",
"description": "",
"parent": "TAXONOMY_173935E6F72546B89E2B82DC1ACBFA53",
"id": "CATEGORY_5DC1EC4C53F8402FB12A10FB6C5729D3",
"sortOrder": 3
},
{
"name": "main cat 4",
"apiName": "tes_ma3",
"apiNameSearch": "",
"description": "",
"parent": "TAXONOMY_173935E6F72546B89E2B82DC1ACBFA53",
"id": "CATEGORY_FF320B6CC2B74A18B71DB2FA748D9528",
"sortOrder": 4
},
]
}

GET /api/content/management/categories/:id

Retrieves a list of children categories based on the provided parent ID

Template Params

:id - ID of the parent taxonomy or category

Response

200 - OK on success

Example Response

[
{
"name": "main cat 3",
"apiName": "tes_ma2",
"apiNameSearch": "",
"description": "",
"parent": "TAXONOMY_173935E6F72546B89E2B82DC1ACBFA53",
"id": "CATEGORY_5DC1EC4C53D2402FB12A10FB6C5729D3",
"sortOrder": 3
},
{
"name": "main cat 4",
"apiName": "tes_ma3",
"apiNameSearch": "",
"description": "",
"parent": "TAXONOMY_173935E6F72546B89E2B82DC1ACBFA53",
"id": "CATEGORY_FF320B6CC2B74A18B71DB2FA748D9528",
"sortOrder": 4
},
{
"name": "main cat 2",
"apiName": "tes_ma1",
"apiNameSearch": "",
"description": "",
"parent": "TAXONOMY_173935E6F72546B89E2B82DC1ACBFA53",
"id": "CATEGORY_59D4CADB3A574A418AD730A68D59DEFC",
"sortOrder": 2,
},
{
"name": "main cat 1",
"apiName": "tes_mai",
"apiNameSearch": "",
"description": "",
"parent": "TAXONOMY_173935E6F72546B89E2B82DC1ACBFA53",
"id": "CATEGORY_CF957ADE4C8949ED91CD5F282DB57842",
"sortOrder": 1,
}
]

PUT /api/content/management/categories/:id

Update an existing category.

Headers

Content-Type: application/json

Template Params

:id - Category Id

Request Body

name - Name of the category
apiName - short name of the category used for filtering
description - Description of the category
parent - id of the parent taxonomy or category
id - ID of the category you wish to update
sortOrder - the sort order for this category

Example Request

Content-Type: application/json

{
"name": "main cat 1",
"apiName": "tes_mai",
"apiNameSearch": "",
"description": "",
"parent": "TAXONOMY_173935E6F72546B89E2B82DC1ACBFA53",
"id": "CATEGORY_CF957ADE4C8949ED91CD5F282DB57842",
"sortOrder": 1,
}

Response

200 - OK on success

Example Response

{
"name": "main cat 1",
"apiName": "tes_mai",
"apiNameSearch": "",
"description": "",
"parent": "TAXONOMY_173935E6F72546B89E2B82DC1ACBFA53",
"id": "CATEGORY_CF957ADE4C8949ED91CD5F282DB57842",
"sortOrder": 1,
"expanded": false
}

DELETE /api/content/management/:id

Delete a category with the specified Id.

Template Params

:id - Id of the requested categoryt

Response

200 - OK on success