Update Business Category (v1)
Update a business category.
Method & Path
PATCH /v1/admin/business-categories/:categoryId
Description
Updates an existing business category. At least one field must be provided.
Authentication
Required: Admin authentication with businesses.manage permission.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
categoryId | string | Yes | The category ID |
Request Body
{
"isActive": false,
"sortOrder": 10,
"allowedMenuSections": [
"overview",
"sessions",
"clients",
"referrals",
"storefront"
]
}
Request Body Schema
All fields are optional:
| Field | Type | Required | Description |
|---|---|---|---|
slug | string | No | Unique category slug |
isActive | boolean | No | Whether the category is active |
sortOrder | number | No | Sort order for display |
translations | array | No | Array of translations (min: 1 if provided) |
allowedMenuSections | array | No | Array of allowed dashboard sections |
Allowed Menu Sections
The allowedMenuSections field specifies which dashboard sections are available for workspaces in this business category. Valid values:
overviewteam-boardstaff-directoryclientssessionsstorefrontvcardlabspayments-expensessms-trackingai-trackingstorage-trackingsettingsreferrals
Response 200 OK
{
"category": {
"id": "507f1f77bcf86cd799439011",
"slug": "beauty-salon",
"isActive": false,
"sortOrder": 10,
"translations": [
{
"locale": "en",
"name": "Beauty Salon",
"description": "Beauty and wellness services",
"image": null
}
],
"allowedMenuSections": [
"overview",
"sessions",
"clients",
"referrals",
"storefront"
],
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-16T10:00:00Z"
}
}
Common Errors
- 401 Unauthorized: Missing or invalid admin authentication token
- 403 Forbidden: Insufficient permissions
- 404 Not Found: Category not found
- 400 Bad Request: Invalid request body
- 500 Internal Server Error: Server error