Get category

Get full category details from an Ecwid store referring to its ID

Request and response example

Request:

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

Response:

{
    "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": 1,
    "productCountWithoutSubcategories": 1,
    "enabledProductCount": 1,
    "description": "",
    "descriptionTranslated": {
        "cs": "",
        "en": ""
    },
    "enabled": true,
    "productIds": [
        692730761
    ],
    "isSampleCategory": false,
    "seoTitle": "Best Toys",
    "seoTitleTranslated": {
        "cs": "",
        "en": "Best Toys"
    },
    "seoDescription": "",
    "seoDescriptionTranslated": {
        "cs": "",
        "en": ""
    },
    "alt": {
        "translated": {}
    }
}

Access scopes

Requires the following access scope: read_catalog

Path params

ParamTypeDescription
storeIdnumberEcwid store ID.
categoryIdnumberCategory ID.

Query parameters

FieldTypeDescription
langstringPreferred language for the category name field in search results. If a certain field does not have the translation available for the set language, the default language text will be used for that field.
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.

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
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!