Get categories
const url = 'https://catalog.shopgate.io/v1/merchants/example/categories?limit=1000&offset=0&getOriginalImageUrls=false';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://catalog.shopgate.io/v1/merchants/example/categories?limit=1000&offset=0&getOriginalImageUrls=false'Get categories
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Filter string. Supported filters: name, code, parentCategoryCode, status
Fields which should be included in the response. This field is optional. If the field is not set the default fields will be shown
Locale code to change the language of the name, descriptions, properties and media
The limit of entries of one page
The offset where to start the page
Additional data to pass to the sync webhook
Responses
Section titled “Responses”Returns categories.
object
object
object
Human readable code of the entity
Human readable code of the entity
Url of the category in the desktop shop
Description which is shown to the customer
Category path based on the category code of the parents
By default this creates an ascending order of categories meaning 0 is the first.
object
Human readable code of the entity
Example
{ "meta": { "limit": 10, "offset": 0, "totalItemCount": 3 }, "categories": [ { "catalogCode": "defaultCatalog", "code": "clothes", "description": "This category contains clothing for clothes", "externalUpdateDate": "2019-01-12T00:00:00.114Z", "image": null, "name": "Clothes", "parentCategoryCode": null, "path": [], "sequenceId": 0, "status": "active", "url": "https://awesomeShop.com/c/clothes" }, { "catalogCode": "defaultCatalog", "code": "men", "description": "This category contains clothing for men", "externalUpdateDate": "2019-01-12T00:00:00.114Z", "image": null, "name": "Men", "parentCategoryCode": "clothes", "path": [ "clothes" ], "sequenceId": 0, "status": "active", "url": "https://awesomeShop.com/c/men" }, { "catalogCode": "defaultCatalog", "code": "jeans", "description": "This category contains jeans", "externalUpdateDate": "2019-01-12T00:00:00.114Z", "image": "https://awesomeShop.com/img/jeans1.jpg", "name": "Jeans", "parentCategoryCode": "men", "path": [ "clothes", "men" ], "sequenceId": 0, "status": "active", "url": "https://awesomeShop.com/c/jeans" } ]}Validation error
object
object
object
object
The parameter-field, that failed to validate, like “userId”
The value, that was sent, like “xxx”
Machine readable error code
Human readable error code
object
object
Machine readable error code
Human readable error code
Example
{ "error": { "code": "SCHEMA_VALIDATION_FAILED", "results": { "errors": [ { "code": "MAX_LENGTH", "message": "Name too long", "description": "Property Name is too long", "path": [ "name" ] } ] } }}Merchant not found
object
Example
{ "code": "NotFound", "message": "Merchant not found"}
