Skip to content

List categories​

GET
/public/categories

Returns active categories for the resolved tenant, optionally scoped to a parent category. By default empty categories (productCount 0) are excluded unless include_empty is true. Each item carries product and child counts. productCount = DISTINCT products a shopper sees in the category's subtree — the same set GET /products?category=<id> lists (published, actively listed, not a hidden group offer, not hidden by « Masquer les produits en rupture »); a product filed on several levels counts once.

Auth: Public (no authentication).

Same route as GET /categories under the explicit /public namespace: same handler, parameters, cache headers and X-Channel handling. Prefer this path.

Parameters​

Query Parameters

parent

Parent category id; omit for root-level categories

Type
string
include_empty

Include categories with no products

Type
boolean
Default
false
includeHidden

Opt-in. Also return the categories hidden in the back office (switch « Active » off), flagged visible: false, so a storefront can show them as « Bientôt ». A hidden category always reports productCount: 0. Parsed strictly: true/1 = on, false/0/absent = off. Part of the URL, so Cache-Control and Vary: X-Channel are unchanged.

Type
boolean
Default
false

Responses​

Category list

application/json
JSON
{
  
"ok": true,
  
"data": [
  
  
{
  
  
  
"id": "string",
  
  
  
"slug": "string",
  
  
  
"name": "string",
  
  
  
"description": "string",
  
  
  
"seoTitle": "string",
  
  
  
"metaDescription": "string",
  
  
  
"imageUrl": "https://example.com",
  
  
  
"parentId": "string",
  
  
  
"sortOrder": 0,
  
  
  
"productCount": 0,
  
  
  
"childCount": 0,
  
  
  
"visible": true,
  
  
  
"updatedAt": "2024-01-01T00:00:00Z"
  
  
}
  
]
}

Playground​

Variables
Key
Value

Samples​

Powered by VitePress OpenAPI

Tarifs : contactez-nous — contact@marketkit.ai