Skip to content

Get customer

GET
/merchants/{merchantCode}/customers/{customerId}
curl --request GET \
--url 'https://customer.shopgate.io/v1/merchants/example/customers/example?ignoreInternalAttributes=false'

Get customer

merchantCode
required
string
customerId
required
string
localeCode
string

Locale code to change the language of the attributes

ignoreInternalAttributes
boolean

Ignores internal attributes in the result set

Media typeapplication/json
object
customer
object
id
string
internalCustomerNumber

Internal Customer number, set automatically upon creation

number
externalCustomerNumber

External Customer number

string
firstName

First name of the customer

string
middleName

Middle name of the customer

string | null
lastName

Last name of the customer

string
emailAddress
string format: email
status
string
default: active
Allowed values: active inactive deleted
isAnonymous

Indicates anonymous/guest customer.

boolean
externalUpdateDate
string format: date-time
taxExempt
boolean
taxClass

Tax class of the customer.

string
contacts
Array<object>
object
id

API identifier for the contact

string
externalContactCode

External identifier of the contact

string | null
status
string
default: active
Allowed values: active inactive deleted
firstName
string
middleName
string | null
lastName
string
companyName
string | null
address1
string
address2
string | null
address3
string | null
address4
string | null
city
string
postalCode
string
region
string
country
string
additionalFields
object
dhlPostBoxNumber

Number of a postbox

string | null
>= 1 characters <= 5 characters
dhlPostNumber

Number of a post

string | null
>= 1 characters <= 10 characters
phone

Validated according to country code

string | null
fax

Validated according to country code

string | null
mobile

Validated according to country code

string | null
emailAddress
string format: email
isDefaultBilling
boolean
isDefaultShipping
boolean
externalUpdateDate
string format: date-time
attributes
Array

Custom customer attribute

object
code
required

Code of the defined customer attribute

string
value

Value for this attribute. Its a free text field for attributes where no values are set. Attributes which have value set should contains the code in an object. For instance value: { "code": "fish" }

name

Human readable name of the attribute

string
settings

All customer settings which are defined by Shopgate

object
defaultLocale
string
defaultCurrency
string
communicationPreferences

Communication Preferences.

Array<string>
default: sms,push
Allowed values: sms email push
defaultLocationCode
string
marketingOptIn
boolean
Example
{
"customer": {
"id": "d162439c-e2f9-4050-8b94-6bff33e8163b",
"internalCustomerNumber": 2,
"externalCustomerNumber": "10001",
"firstName": "Max",
"middleName": "René",
"lastName": "Muster",
"emailAddress": "max.muster@shopgate.com",
"status": "active",
"isAnonymous": true,
"externalUpdateDate": "2022-01-26T15:56:48.047Z",
"taxExempt": false,
"taxClass": "string",
"contacts": [
{
"id": "55a94ee0-6671-11e9-bb49-13684cb7b248",
"externalContactCode": "357709b0-9378-470b-976e-1b040e29b97b",
"status": "active",
"firstName": "Max",
"middleName": "René",
"lastName": "Muster",
"companyName": "Shopgate GmbH",
"address1": "Schloßstr. 10",
"address2": "Haus B",
"address3": "erste Etage",
"address4": null,
"city": "Butzbach",
"postalCode": "78732",
"region": "HE",
"country": "DE",
"additionalFields": {
"dhlPostBoxNumber": 12345,
"dhlPostNumber": 1234567890
},
"phone": "+49 12345 6789 001",
"fax": "+49 12345 6789 002",
"mobile": "+49 12345 6789 003",
"emailAddress": "max.muster@shopgate.com",
"isDefaultShipping": true,
"isDefaultBilling": true,
"externalUpdateDate": "2022-01-26T15:51:21.125Z"
}
],
"attributes": [
{
"code": "tshirtSize",
"name": "T-Shirt Size",
"value": {
"code": "l",
"name": "L"
}
},
{
"code": "nameOfCat",
"name": "Name of your cat",
"value": "Some Cat Name"
}
],
"settings": {
"defaultLocale": "en-us",
"defaultCurrency": "USD",
"communicationPreferences": [
"email",
"push",
"sms"
],
"defaultLocationCode": "DERetail001",
"marketingOptIn": false
}
}
}

Merchant 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"
}