Get categories by path

Search categories in a store catalog by their path. The response provides basic details of found categories.

The method returns a list of categories with the specified path, sorted in ascending order of the category's internal ID. The search is case insensitive.

Headers

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

All query params

Query fieldTypeDescription
pathstringA category path where elements are separated by a delimiter. Spaces around the delimiter and empty path elements are ignored
delimiterstringA string of 1 or more characters used as path element separator
offsetnumberOffset from the beginning of the returned items list (for paging)
limitnumberMaximum number of returned items. Maximum allowed value: 100. Default value: 100
slugsWithoutIdsbooleanSet trueto receive custom page slug

Response

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

SearchResult

FieldTypeDescription
totalnumberThe total number of found items (might be more than the number of returned items)
countnumberThe total number of the items returned in this batch
offsetnumberOffset from the beginning of the returned items list (for paging)
limitnumberMaximum number of returned items. Maximum allowed value: 100. Default value: 100
itemsArrayThe categories list

Category

FieldTypeDescription
idnumberInternal unique category ID
parentIdnumberID of the parent category, if any
orderBynumberSort order of the category in the parent category subcategories list
hdThumbnailUrlstringCategory HD thumbnail URL resized to fit 800x800px
thumbnailUrlstringCategory thumbnail URL. The thumbnail size is specified in the store settings. Resized to fit 400x400px by default
imageUrlstringCategory image URL. A resized original image to fit 1500x1500px
originalImageUrlstringLink to the original (not resized) category image
originalImage<ImageDetails>Details of the category image
namestringCategory name
thumbnail<ImageDetails>Thumbnail image data. The thumbnail size is specified in the store settings. Resized to fit 400x400px by default
nameTranslated<Translations>Available translations for category name
originstringRead-only field returns if a category originated outside of Ecwid, e.g. "origin": "LIGHTSPEED"
urlstringURL of the category page in the store
productCountnumberNumber of products in the category and its subcategories. Important: if new products are assigned or unassigned for this category, the changes to productCount value will apply after several minutes.
enabledProductCountnumberNumber of enabled products in the category (excluding its subcategories)
descriptionstringThe category description in HTML
descriptionTranslated<Translations>Available translations for category description
enabledbooleantrue if the category is enabled, false otherwise. Use hidden_categories in request to get disabled categories
productIdsArray<number>IDs of products assigned to the category as they appear in Ecwid Control Panel > Catalog > Categories. To make this field appear in a response, send productIds=true in a request.

ImageDetails

FieldTypeDescription
urlstringImage URL
widthintegerImage width
heightintegerImage height

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

Errors

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

HTTP codes

HTTP StatusMeaningCode (optional)
400Request parameters are malformed
415Unsupported content-type: expected application/json or text/json
500Cannot retrieve the categories info because of an error on the server

Error response body (optional)

FieldTypeDescription
errorMessagestringError message
Language
Authorization
Query