Get list of product categories
The Get list of product categories method returns the list of product categories of the current reseller or any of its downstream resellers.
An API token of a manager is required for authorization. To get an API token via the Operator Control Panel, see Viewing and updating Manager's information.
The manager's API token specified in an API request determines:
- The role and access level of the manager, which determine the availability of a method.
- The current reseller and downstream resellers accessible within a method.
GET {base_url}/api/v3/customer_store/resellers/{reseller_id}/product_categories
Arguments
Name | Parameter Type | Data type | Required/Optional | Description |
---|---|---|---|---|
X-Api-Token | header | string | Required | API token of a manager that performs the operation (see Viewing and updating Manager's information) |
Content-Type | header | string | Required | Media type of the request. Specify the following: application/vnd.api+json |
Accept | header | string | Required | Supported media types of the answer. Specify the following: application/vnd.api+json |
base_url | path | string | Required | ActivePlatform URL |
reseller_id | path | integer | Required | ID of the current reseller or any of its downstream resellers (see Viewing and updating Reseller general information) |
per_page | query | integer | Optional | Page navigation: number of elements per page |
page | query | integer | Optional | Page navigation: page number |
Response model
Name | Data type | Description | |||||
---|---|---|---|---|---|---|---|
data | array of objects | Response data | |||||
id | string | Product category ID | |||||
type | string | Data type | |||||
attributes | object | Product category information | |||||
created_at | string | Date and time of the product category creation | |||||
updated_at | string | Date and time when the product category was updated | |||||
key | string | Product category key | |||||
name | string | Product category name | |||||
description | string | Description of the product category | |||||
priority | integer | Product category priority | |||||
public | bool | Indicates whether a product category is displayed in Reseller Store (see Main page and Catalog), Storefront of Customer Store (see Catalog page and Viewing Category pages list), and all related public products are available for ordering via the Customer Control Panel (see details in Creating a Product category) | |||||
logo | string | Link to the product category logo file |
Request example
GET /api/v3/customer_store/resellers/1/product_categories
Host: https://test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
Response example
{
"data": [
{
"id": "5",
"type": "product_categories",
"attributes": {
"created_at": "2017-07-11T10:58:21.037+03:00",
"updated_at": "2017-07-13T13:01:24.431+03:00",
"key": "default",
"name": "default",
"description": "",
"priority": 1,
"public": false,
"logo": null
}
},
{
"id": "6",
"type": "product_categories",
"attributes": {
"created_at": "2017-07-11T10:58:35.864+03:00",
"updated_at": "2017-07-13T13:01:33.474+03:00",
"key": "new",
"name": "new",
"description": "000",
"priority": 2,
"public": true,
"logo": null
}
}
]
}