List Categories (v1)
Method + Path
GET /v1/workspace/:workspaceId/storefront/categories
Actual backend path: /v1/workspace/:workspaceId/storefront/categories
Description
Get all storefront categories, organized in a tree structure.
Authentication
Required - JWT token in Authorization header
Required Permissions:
store.manage
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token: Bearer <token> |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
Response (200)
{
"categories": [
{
"id": "507f1f77bcf86cd799439011",
"parentId": null,
"name": "Electronics",
"slug": "electronics",
"description": "Electronic products",
"imageUrl": "https://example.com/category.jpg",
"sortOrder": 1,
"status": "active",
"children": []
}
]
}
Common Errors
- 401 Unauthorized: Missing or invalid authentication token
- 403 Forbidden: Insufficient permissions (requires
store.manage) - 404 Not Found: Workspace not found
- 500 Internal Server Error: Server error