ZingaShopSign in

Categories

Categories

Categories organize your ZingaShop catalog into a nested tree. These endpoints
let you list the tree and create or update categories.

Requires data:read to read and data:write:categories (or data:write:*) to
write.

List categories

GET /papi/v1/categories
{
  "data": [
    {
      "id": "…",
      "name": "Car Care",
      "slug": "car-care",
      "path": "car-care",
      "depth": 0,
      "parentId": null,
      "sortOrder": 0,
      "isActive": true
    },
    {
      "id": "…",
      "name": "Waxes",
      "slug": "waxes",
      "path": "car-care/waxes",
      "depth": 1,
      "parentId": "…",
      "sortOrder": 0,
      "isActive": true
    }
  ]
}

path is the full slug path from the root, and depth is the level in the
tree — use them to render the hierarchy without extra calls.

Create a category

POST /papi/v1/categories       → 201 Created
Field Required Notes
name yes Display name
slug no URL slug (generated from name if omitted); must be unique among its siblings
parentId no Parent category id; omit for a top-level category
sortOrder no Ordering among siblings
isActive no Whether the category is active
curl -X POST https://api-v1.zingasuite.com/papi/v1/categories \
  -H "Authorization: Bearer zk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Waxes", "parentId": "<parent-id>", "sortOrder": 1 }'

A duplicate slug under the same parent returns 409 slug_exists_under_parent.

Update a category

PATCH /papi/v1/categories/{id}

Updatable fields: name, sortOrder, isActive.

curl -X PATCH https://api-v1.zingasuite.com/papi/v1/categories/<id> \
  -H "Authorization: Bearer zk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "sortOrder": 2, "isActive": false }'
Was this helpful?