Order API - Get Customer
Get customer
Endpoint: GET *base*/customers/*customerId*
Authentication: API Key
Return customer by specified ID.
Parameters
The customerID
from :ref:List customers <order-api-list-customers>
.
Response in xml format instead of json.
Request example
GET <base>/customers/4234 HTTP/1.1
Response
200
Content-type: application/json
ok
if success, else no
.
The customer object.
ID of the customer.
Email for the customer.
The address of the customer
The country of the customer. ISO-Alpha-2 (SE
, US
, GB
etc).
List of consents the customer has accepted. These consents are mostly created from external systems that can select their own data in these fields.
The key for this specific consent.
Name of consent.
If the customer has consented to this or not.
The description of this consent.
The language for this consent. No restrictions on the format of the language code.
Date when the customer was created.
If the customer has opt-ed in for newsletters.
Date when the customer was modified.
If the customer was registered, which means it is allowed to sign in.
Response example
{
"status": "ok",
"customer": {
"customerId": "4",
"email": "jon.snow@example.com",
"firstName": "Jon",
"lastName": "Snow",
"address1": "Time Square 55",
"address2": "",
"zipCode": "2456",
"city": "Tampa",
"state": "LA",
"country": "US",
"phoneNumber": "096456192",
"newsletter": true,
"gender": "",
"registered": false,
"consents": [
{
"key": "test_key1",
"name": "Consent1",
"consented": true,
"text": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley ",
"language": "",
"version": "1",
"created": "2018-03-15 20:40:36",
"modified": "2018-03-15 20:40:36"
},
{
"key": "test_key2",
"name": "Consent2",
"consented": false,
"text": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley ",
"language": "EN",
"version": "",
"created": "2018-03-15 20:41:14",
"modified": "2018-03-15 20:41:14"
}
],
"created": "2018-03-15 20:42:59",
"modified": "2018-03-15 20:42:59"
}
}