Skip to main content

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

NameTypeRequiredDescription
business_idintegerYes—

Request body fields

NameTypeRequired
business_idintegerYes
enabledbooleanNo
external_idanyNo
headeranyNo
imageanyNo
nameanyYes
parent_category_idinteger | nullNo
preparation_day_of_weekinteger | nullNo
ribbonstringNo
seo_descriptionanyNo
seo_imageanyNo
seo_titleanyNo
slugstring | nullNo
snooze_untilstring | nullNo

Responses

CodeDescription
200OK (Envelope)
400Bad Request (ErrorResponse)
401Unauthorized
404Not Found
429Too Many Requests (ErrorResponse)
500Internal Server Error (ErrorResponse)
503Service Unavailable (ErrorResponse)
Open this operation in the API reference