Skip to content

Get a category by slug​

GET
/public/categories/{slug}

Returns a single active category (with child count) by slug for the resolved tenant. Cached publicly.

Auth: Public (no authentication).

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

Parameters​

Path Parameters

slug*
Type
string
Required

Query Parameters

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 detail

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