How to get the category tree
Categories organize products in the PIM and often map to external taxonomy on marketplaces.
Prerequisites
- Authenticated with
TOKENandTENANT
Step 1 — List categories
curl -s "https://api.catazenta.com/v1/categories?page=1&page_size=100" \
-H "Authorization: Bearer ${TOKEN}" \
-H "X-Tenant-Id: ${TENANT}"
Each item typically includes:
| Field | Use |
|---|---|
id | Assign to products (category_ids) |
code | Stable identifier in imports |
parent_id | Build tree — null = root |
label | Display name (may be localized) |
Step 2 — Build the tree in code
roots = categories where parent_id is null
for each root:
children = categories where parent_id = root.id
recurse
Paginate if total exceeds page_size — Pagination.
Step 3 — Assign categories to a product
When creating or updating a product, pass category IDs:
curl -s -X PATCH "https://api.catazenta.com/v1/products/PRODUCT_UUID" \
-H "Authorization: Bearer ${TOKEN}" \
-H "X-Tenant-Id: ${TENANT}" \
-H "Content-Type: application/json" \
-d '{"category_ids": ["CATEGORY_UUID"]}'
Use the most specific leaf node that fits the SKU.
Step 4 — Channel mappings (marketplaces)
Internal categories often map to Amazon browse nodes or other external taxonomies:
- Configure the Amazon connector or channel settings.
- Map internal category → external node per export profile.
- Validate with a small export job.
UI guide: Categories & channels.
UI equivalent
Categories in the PIM shows the same tree — drag-and-drop ordering depends on tenant configuration.
Next steps
- Create product with
category_ids - Category API — full OpenAPI
- Catalog fundamentals