Search categories by path

Search categories in a store catalog by their path. The response provides basic details of all 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.

Request and response example

Request:

curl --location 'https://app.ecwid.com/api/v3/1003/categories' \
--header 'Authorization: Bearer secret_ab***cd'

Response:

{
    "total": 1,
    "count": 1,
    "offset": 0,
    "limit": 100,
    "items": [
        {
            "id": 172786255,
            "orderBy": 10,
            "hdThumbnailUrl": "https://d2j6dbq0eux0bg.cloudfront.net/images/1003/4519581925.jpg",
            "thumbnailUrl": "https://d2j6dbq0eux0bg.cloudfront.net/images/1003/4519581924.jpg",
            "originalImageUrl": "https://d2j6dbq0eux0bg.cloudfront.net/images/1003/4519581923.jpg",
            "imageUrl": "https://d2j6dbq0eux0bg.cloudfront.net/images/1003/4519581926.jpg",
            "originalImage": {
                "url": "https://d2j6dbq0eux0bg.cloudfront.net/images/1003/4519581923.jpg",
                "width": 225,
                "height": 225
            },
            "thumbnail": {
                "url": "https://d2j6dbq0eux0bg.cloudfront.net/images/1003/4519581924.jpg",
                "width": 225,
                "height": 225
            },
            "borderInfo": {
                "dominatingColor": {
                    "red": 255,
                    "green": 255,
                    "blue": 255,
                    "alpha": 255
                },
                "homogeneity": true
            },
            "name": "Best Toys",
            "nameTranslated": {
                "cs": "",
                "en": "Best Toys"
            },
            "url": "https://store1003.company.site/products/toys",
            "autogeneratedSlug": "best-toys",
            "customSlug": "toys",
            "productCount": 0,
            "description": "",
            "descriptionTranslated": {
                "cs": "",
                "en": ""
            },
            "enabled": true,
            "isSampleCategory": false,
            "seoTitle": "Best Toys",
            "seoTitleTranslated": {
                "cs": "",
                "en": "Best Toys"
            },
            "seoDescription": "",
            "seoDescriptionTranslated": {
                "cs": "",
                "en": ""
            },
            "alt": {}
        }
    ]
}

Access scopes

Requires the following access scope: read_catalog

Path params

ParamTypeDescription
storeIdnumberEcwid store ID.

Query params

ParamTypeDescription
pathstringFull path separated by a delimiter. Spaces around the delimiter and empty path elements are ignored. Required param
delimiterstringA string of 1 or more characters used as a path delimiter. Required param
keywordstringSearch term for category name and description.
parentCategoryIdnumberParent category ID. Supports multiple values. For example, 0,12345,23456.
hidden_categoriesbooleanSet to true to include disabled categories.
returnProductIdsbooleanSet to true to include product IDs.
baseUrlstringSet base URL for URLs in response. If not specified, Ecwid will use main URL from store settings.
cleanUrlsbooleanSet true to force receiving clean URLs – catalog links without hashbang (/#!/). By default Ecwid checks if this setting is enabled for the store and responds with matching URLs.
slugsWithoutIdsbooleanSet true to receive product page slugs without IDs. By default Ecwid checks if this setting is enabled for the store and responds with matching URLs.
offsetnumberSet offset from the beginning of the returned items list by a margin of 100 (for paging).
limitnumberMaximum number of returned items. Default value: 100. Maximum allowed value: 1000.
langstringLanguage ISO code for translations in JSON response, e.g. en, fr. Translates fields like: title, description, pickupInstruction, text, etc.
responseFieldsstringLimit JSON response by specific fields. If specified, all missing fields will be removed from the response body.
Example: ?responseFields=total,items(id,name,enabled)

Example of using responseFields param:

curl --location 'https://app.ecwid.com/api/v3/1003/categories?responseFields=total,items(id,name,enabled)' \
--header 'Authorization: Bearer secret_ab***cd'
{
    "total": 1,
    "items": [
        {
            "id": 172786255,
            "name": "Best Toys",
            "enabled": true
        }
    ]
}

Headers

The Authorization header with a secret access token is required.

HeaderFormatDescription
AuthorizationBearer secret_ab***cdAccess token of the application.

Response

A JSON object with the following fields:

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: 1000. Default value: 100
itemsArray itemsDetails about found categories.

items

FieldTypeDescription
idnumberInternal unique category ID.
parentIdnumberID of the parent category, if any.
orderBynumberSorting order of the category. Starts from 10. increments by 10.
hdThumbnailUrlstringURL for category thumbnail resized to fit 800x800px.
thumbnailUrlstringURL for category thumbnail. Resized to fit 400x400px by default.
imageUrlstringURL for category image. A resized original image to fit 1500x1500px.
originalImageUrlstringURL for the original category image. Not resized.
imageExternalIdstringImage ID for Lightspeed R-Series/X-Series image sync. Read-only
namestringCategory name.
nameTranslatedObject translationsAvailable translations for category name
originalImageObject originalImageDetails of the category image.
thumbnailObject thumbnailDetails of the category thumbnail.
originstringCategory origin. Exists only for categories synced outside of Ecwid, e.g. "origin": "LIGHTSPEED" Read-only
urlstringURL of the category page in the store.
autogeneratedSlugstringAutogenerated slug for the category page URL.
customSlugstringCustom slug for the category page URL.
productCountnumberNumber of products in the category and its subcategories. When the product count in the category changes, productCount value will update in several minutes.
enabledProductCountnumberNumber of enabled products in the category (excluding any subcategories). Requires the productIds=true query param.
descriptionstringThe category description in HTML.
descriptionTranslatedObject translationsAvailable translations for category description.
enabledbooleantrue if the category is enabled, false otherwise. Use hidden_categories in request to get disabled categories
productIdsArray of numbersIDs of products assigned to the category as they appear in Ecwid admin > Catalog > Categories. Requires productIds=true query param.
seoTitlestringSEO page title for web search results. Recommended length is under 55 characters.
seoTitleTranslatedstringSEO page title translations.
seoDescriptionstringSEO page description for web search results. Recommended length is under 160 characters.
seoDecriptionTranslatedstringSEO page description translations.
altObject altsAlt texts of a category image.

originalImage

FieldTypeDescription
urlstringImage URL
widthintegerImage width
heightintegerImage height

thumbnail

FieldTypeDescription
urlstringImage URL
widthintegerImage width
heightintegerImage height

alts

FieldTypeDescription
mainstringThe original alt text attached to a category image
<ISO_LANG_CODE>stringTranslations for each available language.

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
Language
Click Try It! to start a request and see the response here!