Skip to main content

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

ParameterTypeRequiredDescription
categoryIdstringYesThe category ID

Request Body

{
"isActive": false,
"sortOrder": 10,
"allowedMenuSections": [
"overview",
"sessions",
"clients",
"referrals",
"storefront"
]
}

Request Body Schema

All fields are optional:

FieldTypeRequiredDescription
slugstringNoUnique category slug
isActivebooleanNoWhether the category is active
sortOrdernumberNoSort order for display
translationsarrayNoArray of translations (min: 1 if provided)
allowedMenuSectionsarrayNoArray of allowed dashboard sections

Allowed Menu Sections

The allowedMenuSections field specifies which dashboard sections are available for workspaces in this business category. Valid values:

  • overview
  • team-board
  • staff-directory
  • clients
  • sessions
  • storefront
  • vcard
  • labs
  • payments-expenses
  • sms-tracking
  • ai-tracking
  • storage-tracking
  • settings
  • referrals

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