Get customer

Order API v1
GET*base*/customers/*customerId*
Authentication:API key

Return customer by specified Id.

Parameters

customerId

int
required
The customerID from List customers.

xml

boolean
optional
Response in xml format instead of json.

Request example

1
GET <base>/customers/4234 HTTP/1.1

Response

200 Content-type: application/json

status

string
required
ok if success, else no.

customer

object
required

The customer object.

customerId

string
ID of the customer.

email

string
Email for the customer.

address1 address2 zipCode city state

string
The address of the customer

country

string
The country of the customer. ISO-Alpha-2 (SE, US, GB etc).

consents

array

List of consents the customer has accepted. These consents are mostly created from external systems that can select their own data in these fields.

key

string
The key for this specific consent.

name

string
Name of consent.

consented

boolean
If the customer has consented to this or not.

text

string
The description of this consent.

language

string
The language for this consent. No restrictions on the format of the language code.

created

datetime
Date when the customer was created.

newsletter

boolean
If the customer has opt-ed in for newsletters.

modified

datetime
Date when the customer was modified.

registered

boolean
If the customer was registered, which means it is allowed to sign in.

Response example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
    "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"
    }
}