Create a business category
API operation: Open the endpoint in the API reference
Use POST /business/{business_id}/categories to create a category. The current public operation is Category.register.
If available, the operation requires administrator or business-manager authentication and currently requires business_id and name. The path business and any parent_category_id must belong to a valid hierarchy; see the operation guide for all fields and validations.
const response = await ordering.businesses(businessId).categories().save()
This SDK syntax may vary by package version. Confirm the package and version before using it.
OpenAPI reference
Operation: POST /business/{business_id}/categories
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
business_id | integer | Yes | — |
Request body fields
| Name | Type | Required |
|---|---|---|
business_id | integer | Yes |
enabled | boolean | No |
external_id | any | No |
header | any | No |
image | any | No |
name | any | Yes |
parent_category_id | integer | null | No |
preparation_day_of_week | integer | null | No |
ribbon | string | No |
seo_description | any | No |
seo_image | any | No |
seo_title | any | No |
slug | string | null | No |
snooze_until | string | null | No |
Responses
| Code | Description |
|---|---|
| 200 | OK (Envelope) |
| 400 | Bad Request (ErrorResponse) |
| 401 | Unauthorized |
| 404 | Not Found |
| 429 | Too Many Requests (ErrorResponse) |
| 500 | Internal Server Error (ErrorResponse) |
| 503 | Service Unavailable (ErrorResponse) |