Skip to content

Get attribute

GET
/merchants/{merchantCode}/attributes/{attributeCode}
curl --request GET \
--url https://customer.shopgate.io/v1/merchants/example/attributes/example

Get attribute

merchantCode
required
string
attributeCode
required
string
localeCode
string

Locale code to change the language of the attributes

Attribute information

Media typeapplication/json
object
attribute
object
code
string
visibility

Controls the visibility of attributes on a customer

string
Allowed values: internal public
displayGroup

Controls display grouping of attributes

string | null
type

Describes which type of validation to apply to an attribute’s value. “collectionOfValues” will check for an existing attribute value, the others will check for customer inputs to meet validation criteria of the suggested type (e.g. for type “boolean”, passing “123” will fail validation). The type cannot be changed once an attribute has been created.

string
Allowed values: text number boolean date collectionOfValues callingNumber
name

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

string
isRequired
boolean
values
Array
object
code
required

Unique identifier for the attribute value

string
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
Example
{
"attribute": {
"type": "text",
"isRequired": true,
"name": "Favorite Pet",
"code": "favoritePet",
"visibility": "public",
"displayGroup": "default",
"values": [
{
"name": "Dog",
"code": "dog",
"sequenceId": 0
},
{
"name": "Fish",
"code": "fish",
"sequenceId": 1
},
{
"name": "Cat",
"code": "cat",
"sequenceId": 2
},
{
"name": "Rabbit",
"code": "rabbit",
"sequenceId": 3
}
]
}
}

Merchant or attribute not found

Media typeapplication/json

Unexpected error

Media typeapplication/json
object
code

Machine readable error code

string
message
required

Human readable error code

string
Examplegenerated
{
"code": "example",
"message": "example"
}