Skip to main content

Create Business Category (v1)

Create a new business category.

Method & Path

POST /v1/admin/business-categories

Description

Creates a new business category with localized names and descriptions.

Authentication

Required: Admin authentication with businesses.manage permission.

Request Body

{
"slug": "beauty-salon",
"isActive": true,
"sortOrder": 0,
"translations": [
{
"locale": "en",
"name": "Beauty Salon",
"description": "Beauty and wellness services"
},
{
"locale": "ar",
"name": "صالون تجميل",
"description": "خدمات التجميل والعافية"
}
],
"allowedMenuSections": [
"overview",
"sessions",
"clients",
"referrals"
]
}

Request Body Schema

FieldTypeRequiredDescription
slugstringYesUnique category slug
isActivebooleanNoWhether the category is active (default: true)
sortOrdernumberNoSort order for display (default: 0)
translationsarrayYesArray of translations (min: 1)
allowedMenuSectionsarrayNoArray of allowed dashboard sections for this category

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 201 Created

{
"category": {
"id": "507f1f77bcf86cd799439011",
"slug": "beauty-salon",
"isActive": true,
"sortOrder": 0,
"translations": [
{
"locale": "en",
"name": "Beauty Salon",
"description": "Beauty and wellness services",
"image": null
},
{
"locale": "ar",
"name": "صالون تجميل",
"description": "خدمات التجميل والعافية",
"image": null
}
],
"allowedMenuSections": [
"overview",
"sessions",
"clients",
"referrals"
],
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z"
}
}

Common Errors

  • 401 Unauthorized: Missing or invalid admin authentication token
  • 403 Forbidden: Insufficient permissions
  • 400 Bad Request: Invalid request body
  • 409 Conflict: Category with same slug already exists
  • 500 Internal Server Error: Server error