Categories API
Get Categories
GET /api/v1/manager-core/products/{type}/categories
Get all categories for a product type.
Query Parameters:
| Parameter | Type | Required | Validation |
|---|---|---|---|
| language | string | Yes | exists:languages,code |
Parameters:
type(path) - Product type (products, materials, all)
Get Category
GET /api/v1/manager-core/products/{type}/categories/{id}
Parameters:
type(path) - Product typeid(path) - Category ID
Add Category
POST /api/v1/manager-core/products/{type}/categories/add
Parameters:
type(path) - Product type
Request Body:
| Parameter | Type | Required | Validation |
|---|---|---|---|
| name | string/array | Yes | - |
| description | string/array | No | - |
| parent | integer | No | Parent category ID |
Edit Category
POST /api/v1/manager-core/products/{type}/categories/edit
Parameters:
type(path) - Product type
Request Body:
| Parameter | Type | Required | Validation |
|---|---|---|---|
| id | integer | Yes | exists:product_categories,id |
| name | array | Yes | - |
| title | array | No | - |
| description | array | No | - |
| sort_description | array | No | - |
| measurements | array | No | - |
| measurements.* | integer | No | exists:measurement_types,id |
| image.id | integer | No | exists:images,id |
| icon.id | integer | No | exists:images,id |
| vatRates | object | No | (country_id: vat_rate_id) |
Order Categories
POST /api/v1/manager-core/products/{type}/categories/order
Parameters:
type(path) - Product type
Request Body:
| Parameter | Type | Required | Validation |
|---|---|---|---|
| data | array | Yes | array of (id, position, parent) |
Delete Category
POST /api/v1/manager-core/products/{type}/categories/delete
Parameters:
type(path) - Product type
Request Body:
| Parameter | Type | Required | Validation |
|---|---|---|---|
| id | integer | Yes | exists:product_categories,id |