Categories Tree
GET/v/ctf
- Requires Data Viewer ApiKey permissions.
- Example URI: https://instancename.piminto.com/api/en-us/v/ctf
Provides the capability to retrieve the complete structure and hierarchy of categories from the root node to the end within your Product Information Management System (PIMS).
Returns
This endpoint provides the complete structure of categories, including all subcategories and nested nodes, starting from the root node and extending to all its child elements. The retrieved data displays the entire category hierarchy in the PIMS system, providing a comprehensive view of the data structure.
In this endpoint, the cat_data metadata field includes only the cat_image attribute, the path to the category image.
Request
Query Parameters
Set this parameter to cat_name to sort the tree nodes output by name; by default, nodes are sorted by the cat_order field
Responses
- 200
success
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
The status of the API request. A value of "OK" indicates that the request was successfully sent and processed.
categoriesTree object[]required
Structure and hierarchy of categories in PIMS
Automatically calculated value that represents a unique PIMS internal category ID. You can use to retrieve more details about the category.
The name of the category identified by category ID.
The ID of the parent category.
The calculated relative path of the category, uses '>' as a unique category ID separator.
The calculated relative path of the category, uses '>' as a category name separator.
Array of categoriesTree elements
The proper sort order for the categories when displayed in a user interface.
A numerical classification for the category's rank.
cat_data object
Metadata associated with the category. Extendable. In this endpoint, the cat_data metadata field includes only the "cat_image" attribute, the path to the category image.
The path for the image of the category.
{
"status": "OK",
"categoriesTree": [
{
"id": 2,
"cat_name": "Category Name",
"cat_parent_id": 0,
"cat_path_id": 2,
"cat_path": "Category Name",
"children": [
{
"cat_path_id": "2 > 6",
"cat_parent_id": "2",
"cat_path": "Category Name > Category-1 Name",
"cat_data": {
"cat_image": "https://instancename.com/data/category.jpg"
},
"cat_name": "Category-1 Name",
"id": "6",
"cat_order": 1,
"cat_rank": 1,
"children": [
{
"cat_name": "Child Category-1 Name",
"cat_path_id": "2 > 6 > 8",
"cat_path": "Category Name > Category-1 Name > Child Category-1 Name",
"cat_parent_id": "6",
"id": "8",
"cat_order": 1,
"children": [],
"cat_rank": 2
}
]
}
],
"cat_order": 1,
"cat_rank": 1,
"cat_data": {
"cat_image": "https://instancename.com/data/category.jpg"
}
}
]
}