Create category

Create a new category in an Ecwid store catalog.

Access scopes

Requires the following access scope: create_catalog

Request

A JSON object with the following fields:

FieldTypeDescription
namestringCategory name
nameTranslated<Translations>Available translations for category name
customSlugstringA custom slug set for the category URL.
parentIdnumberID of the parent category. Omit this field to add root category
orderBynumberSort order of the category in the parent category subcategories list
descriptionstringThe category description in HTML
descriptionTranslated<Translations>Available translations for category name
enabledbooleantrue to make category enabled, false otherwise. true is default
productIdsArray<number>IDs of the products to assign to the category

Translations

FieldTypeDescription
<ISO_LANG_CODE>stringTranslations for each available language. If no other translations are provided, the default language translations is returned. See available languages in store language settings

Response

A JSON object of type 'CreateStatus' with the following fields:

CreateStatus

FieldTypeDescription
idnumberID of the created category

Errors

In case of error, Ecwid responds with an error HTTP status code and, optionally, JSON-formatted body containing error description

HTTP codes

HTTP StatusMeaning
400Malformed request parameters
402The merchant plan category limit is reached
404The parent category or one of the assigned products is not found
409Data validation error: the category name or description exceed the max allowed length of characters
415Unsupported content-type: expected application/json or text/json
449Store catalog cannot be modified at the moment because import is in progress. Retry later
500Server error
Language
Click Try It! to start a request and see the response here!