Create category

POST https://app.ecwid.com/api/v3/{storeId}/categories

Request and response example

Request:

POST /api/v3/1003/categories/9691094 HTTP/1.1
Authorization: Bearer secret_token
Host: app.ecwid.com
Content-Type: application/json
Cache-Control: no-cache

{
  "name": "Lemons",
  "enabled": true,
  "orderBy": 10,
  "parentId": 9691094
}

Response:

{
  "id": 10869029
}

Required access scopes

Your app must have the following access scopes to make this request: create_catalog

Path params

All path params are required.

Param
Type
Description

storeId

number

Ecwid store ID.

Headers

The Authorization header is required.

Header
Format
Description

Authorization

Bearer secret_ab***cd

Access token of the application.

Request JSON

A JSON object with the following fields:

Field
Type
Description

parentId

number

ID of the parent category, if any.

productIds

array of numbers

IDs of products assigned to the category as they appear in Ecwid admin > Catalog > Categories. Requires productIds=true query param.

orderBy

number

Sorting order of the category. Starts from 10 and increments by 10.

name

string

Category name visible on the storefront.

nameTranslated

Available translations for the category name.

description

string

Category description in HTML format.

descriptionTranslated

Available translations for the category description.

seoTitle

string

SEO page title for web search results. Recommended length is under 55 characters.

seoTitleTranslated

string

Available translations for the SEO page title.

seoDescription

string

SEO page description for web search results. Recommended length is under 160 characters.

seoDecriptionTranslated

string

Available translations for the SEO page description.

enabled

boolean

true if the category is enabled, false otherwise. Use hidden_categories in request to get disabled categories

customSlug

string

Custom slug for the category page URL.

externalReferenceId

string

Internal field for Lightspeed X-Series connection. This ID is unique for each category in one store.

translations

Object with text field translations in the "lang": "text" format, where the "lang" is an ISO 639-1 language code. For example:

{
    "en": "Sample text",
    "nl": "Voorbeeldtekst"
}

Translations are available for all active store languages. Only the default language translations are returned if no other translations are provided for the field. Find active store languages with GET /profile request > languages > enabledLanguages.

Response JSON

A JSON object with the following fields:

Field
Type
Description

id

number

Internal ID of the created category.

Last updated

Was this helpful?