Order API - Get Customer

Get customer

Endpoint: GET *base*/customers/*customerId*
Authentication: API Key

Return customer by specified ID.

Parameters

customerId
int
required

The customerID from :ref:List customers <order-api-list-customers>.

xml
boolean
optional

Response in xml format instead of json.

Request example

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
optional

ID of the customer.

email
string
optional

Email for the customer.

address1 address2 zipCode city state
string
optional

The address of the customer

country
string
optional

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

consents
array
optional

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
optional

The key for this specific consent.

name
string
optional

Name of consent.

consented
boolean
optional

If the customer has consented to this or not.

text
string
optional

The description of this consent.

language
string
optional

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

created
datetime
optional

Date when the customer was created.

newsletter
boolean
optional

If the customer has opt-ed in for newsletters.

modified
datetime
optional

Date when the customer was modified.

registered
boolean
optional

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