Add new category

Create a new category in an Ecwid store catalog.

Headers

NameTypeDescription
AuthorizationstringoAuth token with mandatory Bearer before it. Example: Bearer e***s0, where e***s0 should be replaced with your oAuth token.

Request

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

Category

FieldTypeDescription
namestringCategory name
nameTranslated<Translations>Available translations for category name
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