Skip to content

Get attributes

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

Get all attributes

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

Filter string. Supported filters: code, name

sort
string

Sorting of the products (sequenceId only works with filter catalogCode)

localeCode
string
<= 5 characters

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

limit
integer
default: 1000 >= 1 <= 1000

The limit of entries of one page

offset
integer
0

The offset where to start the page

Attribute information

Media typeapplication/json
object
meta
object
limit
number
offset
number
totalItemCount
number
attributes
Array<object>
object
code
string
<= 255 characters
type

Type of the attribute. It specifies which type the attribute value will have.

string
Allowed values: text productList input number
use

The usage of this attribute

string
Allowed values: option extra property
name

Name of the attribute which will be shown to the customer. It’s saved in the language of the passed locale.

string
<= 255 characters
externalUpdateDate
null | string format: date-time
values
Array<object>
object
code
required

Unique identifier for the attribute value

string
<= 255 characters
sequenceId
required

Sequence id of the order of the values. The lowest number is at the top and the highest number is at the bottom.

number
name
required

Name of the attribute value which will be shown to the customer. It’s saved in the language of the passed locale.

string
<= 255 characters
swatch
object
type
string
Allowed values: image color
value
string
Example
{
"meta": {
"limit": 10,
"offset": 0,
"totalItemCount": 1
},
"attributes": [
{
"code": "color",
"type": "text",
"use": "option",
"name": "Color",
"externalUpdateDate": "2018-12-15T00:00:23.114Z",
"values": [
{
"code": "black",
"sequenceId": 1,
"name": "Black",
"swatch": {
"type": "color",
"value": "#000000"
}
},
{
"code": "white",
"sequenceId": 1,
"name": "White",
"swatch": {
"type": "color",
"value": "#ffffff"
}
}
]
},
{
"code": "engraving",
"name": "Engraving",
"type": "input",
"use": "extra"
},
{
"code": "related",
"name": "Related Products",
"type": "productList",
"use": "property",
"values": [
{
"sequenceId": 1,
"name": "The Jeans Pack.",
"code": "pack1",
"value": [
"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"
}