Base URL
https://{tenant}.logzi.com/api/product_category/
Every request returns a JSON response. On success result.code == 1, on failure result.code == 0. Categories are stored in a tree structure; parent_id = 0 denotes top-level categories.
/api/product_category/get
Retrieve a single product category by ID, optionally filtered by language.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | int | Unique identifier of the category | |
language_id | int | Identifier of the language variant |
Example Request
GET /api/product_category/get?id=5
X-API-KEY: {your_api_key}
/api/product_category/list
Retrieve the list of product categories, optionally filtered by language.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
language_id | int | Filter by language identifier |
Example Request
GET /api/product_category/list?language_id=1
X-API-KEY: {your_api_key}
/api/product_category/save
Create or update a product category. For a new record use data[id] = 0. For a top-level category use parent_id = 0.
POST Fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
id | int | 0 = new category, >0 = update | |
name | string | Name of the category (e.g. "Elektronika") | |
parent_id | int | Identifier of the parent category; 0 = top-level category |
Example Request
POST /api/product_category/save
X-API-KEY: {your_api_key}
Content-Type: application/json
{
"data": {
"id": 0,
"name": "Elektronika",
"parent_id": 0
}
}
/api/product_category/delete
Delete a product category by ID.
POST Fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
id | int | Identifier of the category to delete |
Example Request
POST /api/product_category/delete
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "data": { "id": 5 } }
Create your account now,
pay later!