get https://app.ecwid.com/api/v3//brands
Search or filter product brands. The response provides the list of brands used in a store. Also operates with a public token.
Access scopes
Requires the following access scope: read_brands
Query params
Name | Type | Description |
---|---|---|
limit | number | Maximum number of returned items. Maximum allowed value: 100 . Default value: 100 |
offset | number | Offset from the beginning of the returned items list (for paging) |
lang | string | Preferred language for the brand name fields 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. |
hidden_brands | boolean | By default, Ecwid returns only brands of enabled (not hidden) products. Set this parameter to true if you want hidden (disabled) product brands to be returned. false is default. Works with a secret token only |
baseUrl | string | Storefront URL for Ecwid to use when returning product URLs in the url field. If not specified, Ecwid will use the storefront URL specified in the store settings |
cleanUrls | boolean | If true , Ecwid will return the SEO-friendly clean URL (without hash '#' ) in the url field. If false , Ecwid will return URL in the old format (with hash '#' ). We recommend using true value if merchant's website supports clean SEO-friendly URL feature |
sortBy | string | Sort order. Supported values:
|
Q: How to get all products from a store?
Use the offset
parameter to get all products in a store. For example, if a store has 452 products, you would need to call the /products
endpoint 5 times with different offset
parameter values:
offset=0
// 0-100 productsoffset=100
// 100-200 productsoffset=200
// 200-300 productsoffset=300
// 300-400 productsoffset=400
// 400-452 products
As a result, you will get all 452 products after these 5 consecutive requests.
Response
A JSON object of type 'SearchResult' with the following fields:
SearchResult
Field | Type | Description |
---|---|---|
total | number | The total number of found brands |
count | number | The total number of the brands returned in this batch |
offset | number | Offset from the beginning of the returned items list (for paging) |
limit | number | Maximum possible number of returned items in this request. |
items | Array | The items list |
Items
Field | Type | Description |
---|---|---|
name | string | Brand name |
productsFilteredByBrandUrl | string | The URL that leads to the search page of your website with all the products related to a certain brand |
nameTranslated | <TranslatedNames> | Translations of the "brand" value into other languages |
TranslatedNames
Field | Type | Description |
---|---|---|
'{countrycode}' | string | Returns the value that matches with a corresponding language. Example:"nameTranslated": { 'en': "Adidas", 'fr': "Adidas", 'pt': "Adidas" } |
Errors
In case of error, Ecwid responds with an error HTTP status code and, optionally, JSON-formatted body containing error description
HTTP codes
HTTP Status | Meaning | Code (optional) |
---|---|---|
403 | Access token doesn't have read_brands scope |
Error response body (optional)
Field | Type | Description |
---|---|---|
errorMessage | string | Error message |