Create category
POST
https://app.ecwid.com/api/v3/{storeId}/categories
Required access scopes
Your app must have the following access scopes to make this request: create_catalog
Path params
All path params are required.
storeId
number
Ecwid store ID.
Headers
The Authorization header is required.
Authorization
Bearer secret_ab***cd
Access token of the application.
Request JSON
A JSON object with the following fields:
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.
description
string
Category description in HTML format.
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:
id
number
Internal ID of the created category.
Last updated
Was this helpful?