Product Categories API

Manage the product category tree — retrieve, create, update, and delete

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.

GET /api/product_category/get

Retrieve a single product category by ID, optionally filtered by language.

Query Parameters

ParameterTypeRequiredDescription
idintUnique identifier of the category
language_idintIdentifier of the language variant

Example Request

GET /api/product_category/get?id=5
X-API-KEY: {your_api_key}
GET /api/product_category/list

Retrieve the list of product categories, optionally filtered by language.

Query Parameters

ParameterTypeRequiredDescription
language_idintFilter by language identifier

Example Request

GET /api/product_category/list?language_id=1
X-API-KEY: {your_api_key}
POST /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

FieldTypeRequiredDescription
idint0 = new category, >0 = update
namestringName of the category (e.g. "Elektronika")
parent_idintIdentifier 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
  }
}
POST /api/product_category/delete

Delete a product category by ID.

POST Fields — data object

FieldTypeRequiredDescription
idintIdentifier 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 } }

Get in touch with us

Interested in our software? Feel free to write to us!

Need help?

If you can't find the answer and need assistance

Create your account now,
pay later!

Try it free for 3 days, no risk, no obligation!