GET Category and any of its child categories, if any by category ID
GET/v/c/:categoryId
- Requires Data Viewer ApiKey permissions.
- Example URI: https://instancename.piminto.com/api/en-us/v/c/3
Provides the ability to retrieve complete information about an existing category.
Returns
Specify the unique identifier of the category either from the category creation request or from the Category Tree, and the endpoint will return complete information about the corresponding category, structured data of its child categories, and information about the number of products in that category.
Returns an Error if an invalid category identifier was specified.
Request
Path Parameters
unique PIMS internal category ID
Responses
- 200
- default
success
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- filter_dropdown
- filter_range_float
- Array [
- ]
- ]
- ]
- Array [
- ]
The status of the API request. A value of "OK" indicates that the request was successfully sent and processed.
currentCategory object[]required
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 categoryId.
The relative path of the category that is calculated and uses '>' as a separator for the unique category ID.
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.
cat_data objectrequired
Metadata associated with the category. Extendable
Describes the activity status of the category. In the context of GET API requests, categories are filtered based on their status, and only categories with the active status will be returned. If the status is not explicitly specified, the category is considered active by default and will be included in the query results.
The path for the image of the category.
A numerical classification for the category's rank.
cat_filters object[]
Is an array of filters used to filter data by attribute products in this category, and its structure and number of elements depend on the PIM settings. The following is an example of one possible structure.
The name of the filter.
filter_values object[]required
An array of values for the filter, with each item having a "label" and "value" option.
The label option for the filter value.
The value option for the filter value.
The attribute name by which products will be filtered within this category.
Possible values: [multiselect
, dropdown
]
The type of the filter.
The name of the filter.
filter_values required
An object that contains the minimum and maximum attribute values allowed by the filter.
The attribute name by which products will be filtered within this category.
Possible values: [range_float
]
The type of the filter.
The number of parts in this category.
childCategories object[]
Structured category data for children of current category
A numerical classification for the category's rank.
The proper sorting order for the categories when displayed in a user interface.
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 categoryId.
cat_data object
The path for the image of the category.
{
"status": "OK",
"currentCategory": [
{
"id": 6,
"cat_name": "Category-1 Name",
"cat_parent_id": 2,
"cat_path_id": "2 > 6",
"cat_path": "Category Name > Category-1 Name",
"cat_data": {
"status": "active",
"cat_image": "https://instancename.com/data/category.jpg",
"cat_rank": 10,
"cat_filters": [
{},
{}
]
},
"sku_count": 1000
}
],
"childCategories": [
{
"cat_rank": 5,
"cat_order": 1,
"id": 8,
"cat_name": "Category-2 Name",
"cat_data": {
"cat_image": "https://instancename.com/data/category.jpg"
}
}
]
}
The reason for the error is included in the response body
- application/json
- Schema
- Example (from schema)
Schema
Indicates the status of the API request. In this case, the value "Error" means that an error occurred while processing the request.
Provides a message that describes the reason for the error that occurred while processing the API request. In this case, the value 'Category does not exist' indicates that an invalid category identifier was specified.
{
"status": "Error",
"status_message": "Category does not exist."
}