Skip to content

Get categories

GET
/merchants/{merchantCode}/categories
curl --request GET \
--url 'https://catalog.shopgate.io/v1/merchants/example/categories?limit=1000&offset=0&getOriginalImageUrls=false'

Get categories

merchantCode
required
string
<= 255 characters
filters
string format: json

Filter string. Supported filters: name, code, parentCategoryCode, status

fields
string format: csv

Fields which should be included in the response. This field is optional. If the field is not set the default fields will be shown

localeCode
string
<= 5 characters

Locale code to change the language of the name, descriptions, properties and media

catalogCode
string
<= 255 characters
limit
integer
default: 1000 >= 1 <= 1000

The limit of entries of one page

offset
integer
0

The offset where to start the page

getOriginalImageUrls
boolean
additionalWebhookData
string format: json

Additional data to pass to the sync webhook

Returns categories.

Media typeapplication/json
object
meta
object
limit
number
offset
number
totalItemCount
number
categories
Array<object>
object
code

Human readable code of the entity

string
>= 1 characters <= 255 characters
parentCategoryCode

Human readable code of the entity

string
>= 1 characters <= 255 characters
image
null | string
<= 500 characters
name
string
<= 255 characters
url

Url of the category in the desktop shop

null | string
<= 255 characters
description

Description which is shown to the customer

null | string
externalUpdateDate
null | string format: date-time
status
string
Allowed values: active inactive
path

Category path based on the category code of the parents

Array<string>
sequenceId

By default this creates an ascending order of categories meaning 0 is the first.

integer
productCount
integer
categoryCount
integer
parentCategoriesInfo
Array<object>
object
code

Human readable code of the entity

string
>= 1 characters <= 255 characters
name
string
<= 255 characters
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

Media typeapplication/json
object
statusCode
number
message
string
code
string
additionalInfo
object
validationErrors
Array<object>
object
code
number
reason
string
entity
string
entityId
string
subentityPath
Array<string | number>
error
object
paramName

The parameter-field, that failed to validate, like “userId”

string
paramValue

The value, that was sent, like “xxx”

null | string | number | array | object
code

Machine readable error code

string
Allowed values: SCHEMA_VALIDATION_FAILED VALIDATION_FAILED ENUM_MISMATCH MAXIMUM MAXIMUM_EXCLUSIVE MINIMUM MINIMUM_EXCLUSIVE MULTIPLE_OF ARRAY_LENGTH_LONG ARRAY_LENGTH_SHORT ARRAY_ADDITIONAL_ITEMS ARRAY_UNIQUE MAX_LENGTH MIN_LENGTH MAX_PROPERTIES MIN_PROPERTIES OBJECT_MISSING_REQUIRED_PROPERTY OBJECT_PROPERTIES_MAXIMUM OBJECT_PROPERTIES_MINIMUM OBJECT_ADDITIONAL_PROPERTIES OBJECT_DEPENDENCY_KEY ONE_OF_MISSING ONE_OF_MULTIPLE NOT_PASSED INVALID_FORMAT INVALID_TYPE UNKNOWN_FORMAT PATTERN
message
required

Human readable error code

string
results
object
errors
Array<object>
object
code

Machine readable error code

string
Allowed values: ENUM_MISMATCH MAXIMUM MAXIMUM_EXCLUSIVE MINIMUM MINIMUM_EXCLUSIVE MULTIPLE_OF ARRAY_LENGTH_LONG ARRAY_LENGTH_SHORT ARRAY_ADDITIONAL_ITEMS ARRAY_UNIQUE MAX_LENGTH MIN_LENGTH MAX_PROPERTIES MIN_PROPERTIES OBJECT_MISSING_REQUIRED_PROPERTY OBJECT_PROPERTIES_MAXIMUM OBJECT_PROPERTIES_MINIMUM OBJECT_ADDITIONAL_PROPERTIES OBJECT_DEPENDENCY_KEY ONE_OF_MISSING ONE_OF_MULTIPLE NOT_PASSED INVALID_FORMAT INVALID_CREDENTIALS INVALID_TYPE UNKNOWN_FORMAT PATTERN
message

Human readable error code

string
description
string
path
Array<string>
warnings
array
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

Media typeapplication/json
object
statusCode
number
code
required
string
message
required
string
Example
{
"code": "NotFound",
"message": "Merchant not found"
}