post https://app.ecwid.com/api/v3//categories
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:
Field | Type | Description |
---|---|---|
name | string | Category name |
nameTranslated | <Translations> | Available translations for category name |
customSlug | string | A custom slug set for the category URL. |
parentId | number | ID of the parent category. Omit this field to add root category |
orderBy | number | Sort order of the category in the parent category subcategories list |
description | string | The category description in HTML |
descriptionTranslated | <Translations> | Available translations for category name |
enabled | boolean | true to make category enabled, false otherwise. true is default |
productIds | Array<number> | IDs of the products to assign to the category |
Translations
Field | Type | Description |
---|---|---|
<ISO_LANG_CODE> | string | Translations 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
Field | Type | Description |
---|---|---|
id | number | ID 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 Status | Meaning |
---|---|
400 | Malformed request parameters |
402 | The merchant plan category limit is reached |
404 | The parent category or one of the assigned products is not found |
409 | Data validation error: the category name or description exceed the max allowed length of characters |
415 | Unsupported content-type: expected application/json or text/json |
449 | Store catalog cannot be modified at the moment because import is in progress. Retry later |
500 | Server error |