Skip to content

Customers

POST /customers

Creates a new customer.

Required scopes: customers

param type/format required sample value description
address1 string false "Voltastrasse 5"
address2 string false "Siedlung"
zipcode string false "11-200"
city string false "Berlin"
company string true "Inventorum" Required if first and lastname are empty.
country string, LL or country full name false "DE", "Deutschland"
state string false "Brandenburg"
title string false "Mr." Available options: "Mr.", "Mrs.", "Ms."
first_name string true "John" Required if company empty.
last_name string true "Schmidt" Required if company empty.
birthday string, YYYY-MM-DDTHH:mm:ss.sssZ false "1985-04-30T10:49:52Z" Simplified extended ISO format (ISO 8601). The timezone is zero UTC offset, as denoted by the suffix "Z".
email string false "paul@inventorum.com" Doesn't have to be unique.
email_marketing_agreed bolean false false Default value: false. Denotes if a customer accepted receiving marketing offers.
is_b2b boolean false false Default value: false. Denotes if a customer is a business or a private person.
is_favourite boolean false false Default value: false. Denotes if a customer is a favourite customer.
is_vip boolean false false Default value: false. Denotes if a customer is a VIP.
note string false "Customer from christmas sale" Additional details about the customer.
country_code string false ""
tax_number string false "DE288362273" VAT ID
channel integer false 1 ID of a channel. Default value: 1 (ipad). Cannot be changed.
is_confirmed boolean false false Default: false.
phone_number string false "978437427278"

Required headers: Content-Type: application/json

VERSIONING

V9 and earlier accepts a phone_numbersattribute (instead of phone_number for later versions) which accepts a list of phone numbers. Additional child attributes: national_number, type, county_code.

Request

curl -X POST \
  https://app.inventorum.com/api/customers/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {{oauth_token}}' \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Version: 10' \
  -d '{
    "billing_address": {
        "address1": "Voltastrasse",
        "address2": "5",
        "city": "Berlin",
        "company": "Inventorum",
        "country": "DE",
        "first_name": "Ana",
        "last_name": "Schmidt",
        "state": "Berlin",
        "title": "Mrs.",
        "zipcode": "61-222"
    },
    "birthday": "1985-04-30T10:49:52Z",
    "company": "Inventorum",
    "email": "ana.schmidt@inventorum.com",
    "email_marketing_agreed": true,
    "first_name": "Ana",
    "is_b2b": true,
    "is_favourite": true,
    "is_vip": true,
    "last_name": "Schmidt",
    "note": "Some additional data",
    "shipping_address": [
        {
            "address1": "Berlinerstrasse",
            "address2": "10",
            "city": "Bremen",
            "company": "",
            "country": "DE",
            "first_name": "John",
            "last_name": "Schmidt",
            "state": "Bremen",
            "title": "Mr.",
            "zipcode": "44-444"
        }
    ],
    "title": "Mrs.",
    "tax_number": "DE288362273",
    "channel": 1
}'

Response

{
    "id": 553910,
    "account_scoped_id": 398,
    "billing_address": {
        "country": "DE",
        "id": 648909,
        "address1": "Voltastrasse",
        "address2": "5",
        "zipcode": "61-222",
        "city": "Berlin",
        "state": "Berlin",
        "first_name": "Ana",
        "last_name": "Schmidt",
        "company": "Inventorum",
        "title": "Mrs."
    },
    "shipping_address": [
        {
            "country": "DE",
            "id": 648908,
            "address1": "Berlinerstrasse",
            "address2": "10",
            "zipcode": "44-444",
            "city": "Bremen",
            "state": "Bremen",
            "first_name": "John",
            "last_name": "Schmidt",
            "company": "",
            "title": "Mr."
        }
    ],
    "is_vip": true,
    "is_favourite": true,
    "first_name": "Ana",
    "phone_number": "978437427278",
    "last_name": "Schmidt",
    "middle_name": null,
    "company": "Inventorum",
    "email_marketing_agreed": true,
    "note": "Some additional data",
    "group": null,
    "email": "ana.schmidt@inventorum.com",
    "is_b2b": true,
    "tax_number": "DE288362273",
    "title": "Mrs.",
    "customer_note": null,
    "is_confirmed": false,
    "channel": 1,
    "birthday": "1985-04-30T12:49:52+02:00",
    "total_sales": "0"
}

Error

Status 400 Bad Request
{
    "error": {
        "fields": {
            "first_name": [
                "Name or company must be set"
            ],
            "last_name": [
                "Name or company must be set"
            ],
            "company": [
                "Name or company must be set"
            ]
        },
        "description": "Serialization error",
        "key": "common.serializer_error"
    }
}

GET /customers

Returns a list of customers.

Required scopes: customers

param type/format required sample value description
limit integer false 10 default and maximum value: 30
page integer false 1 page number

Required headers: Accept: application/json

VERSIONING

V9 And earlier return a list of of phone numbers inside phone_numbers. V10 and later return the phone number as a sting inside phone_number.

Request

curl -X GET \
  'https://app.inventorum.com/api/customers/?limit=10&page=1' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {{oauth_token}}' \
  -H 'X-Api-Version: 10'

Response

Status 200 OK
{
    "total": 39,
    "data": [
        {
            "id": 196906,
            "account_scoped_id": 103,
            "billing_address": {
                "country": "DE",
                "id": 237180,
                "address1": "",
                "address2": "",
                "zipcode": "",
                "city": "",
                "state": "",
                "first_name": "",
                "last_name": "",
                "company": "",
                "title": "Mr."
            },
            "shipping_address": [
                {
                    "country": "DE",
                    "id": 274236,
                    "address1": "",
                    "address2": "",
                    "zipcode": "",
                    "city": "",
                    "state": "",
                    "first_name": "",
                    "last_name": "",
                    "company": "",
                    "title": "Mr."
                }
            ],
            "is_vip": false,
            "is_favourite": false,
            "first_name": "J",
            "phone_number": "8277236",
            "last_name": "K",
            "middle_name": null,
            "company": "",
            "email_marketing_agreed": false,
            "note": "abi",
            "group": null,
            "email": "",
            "tax_number": "",
            "title": "Mr.",
            "customer_note": null,
            "is_confirmed": false,
            "channel": 1,
            "birthday": null,
            "is_b2b": false
        }
    ]
}

GET /customers/favourites/

Returns favourite customers.

Required scopes: customers

param type/format required sample value description
limit integer false 30 default and max value
page integer false 10 page number

Required headers: 'Accept: application/json'

VERSIONING

V9 And earlier return a list of of phone numbers inside phone_numbers. V10 and later return the phone number as a sting inside phone_number.

Request

curl -X GET \
  'https://app.inventorum.com/api/customers/favourites?limit=10&page=1' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {{oauth_token}}' \
  -H 'X-Api-Version: 10'

Response

{
    "total": 39,
    "data": [
        {
            "id": 196906,
            "account_scoped_id": 103,
            "billing_address": {
                "country": "DE",
                "id": 237180,
                "address1": "",
                "address2": "",
                "zipcode": "",
                "city": "",
                "state": "",
                "first_name": "",
                "last_name": "",
                "company": "",
                "title": "Mr."
            },
            "shipping_address": [
                {
                    "country": "DE",
                    "id": 274236,
                    "address1": "",
                    "address2": "",
                    "zipcode": "",
                    "city": "",
                    "state": "",
                    "first_name": "",
                    "last_name": "",
                    "company": "",
                    "title": "Mr."
                }
            ],
            "is_vip": false,
            "is_favourite": false,
            "first_name": "J",
            "phone_number": "82376672367",
            "last_name": "K",
            "middle_name": null,
            "company": "",
            "email_marketing_agreed": false,
            "note": "abi",
            "group": null,
            "email": "",
            "tax_number": "",
            "title": "Mr.",
            "customer_note": null,
            "is_confirmed": false,
            "channel": 1,
            "birthday": null,
            "is_b2b": false
        }
    ]
}

GET /customers/customer_id/

Returns details of a customer.

Required scopes: customers

VERSIONING

V9 And earlier return a list of of phone numbers inside phone_numbers. V10 and later return the phone number as a sting inside phone_number.

Request

curl -X GET \
  https://app.inventorum.com/api/customers/152664/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {{oauth_token}}' \
  -H 'X-Api-Version: 10'

Response

{
    "total": 39,
    "data": [
        {
            "id": 196906,
            "account_scoped_id": 103,
            "billing_address": {
                "country": "DE",
                "id": 237180,
                "address1": "",
                "address2": "",
                "zipcode": "",
                "city": "",
                "state": "",
                "first_name": "",
                "last_name": "",
                "company": "",
                "title": "Mr."
            },
            "shipping_address": [
                {
                    "country": "DE",
                    "id": 274236,
                    "address1": "",
                    "address2": "",
                    "zipcode": "",
                    "city": "",
                    "state": "",
                    "first_name": "",
                    "last_name": "",
                    "company": "",
                    "title": "Mr."
                }
            ],
            "is_vip": false,
            "is_favourite": false,
            "first_name": "J",
            "phone_number": "672672366732",
            "last_name": "K",
            "middle_name": null,
            "company": "",
            "email_marketing_agreed": false,
            "note": "abi",
            "group": null,
            "email": "",
            "tax_number": "",
            "title": "Mr.",
            "customer_note": null,
            "is_confirmed": false,
            "channel": 1,
            "birthday": null,
            "is_b2b": false
        }
    ]
}

Error

Status 404 Not found
{
    "error": {
        "fields": {},
        "description": null,
        "key": "common.unknown"
    }
}

PUT /customers/customer_id

Updates an existing customer.

Note: You can provide only those fields you would like to update.

Required scopes: customers

Supported Payload paramas

VERSIONING

V9 and earlier accepts a phone_numbersattribute (instead of phone_number for later versions) which accepts a list of phone numbers. Additional child attributes: national_number, type, county_code.

Required headers: 'Content-Type: application/json'

Request

curl -X POST \
  https://app.inventorum.com/api/customers/ \
  -H 'Authorization: Bearer {{oauth_token}}' \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Version: 10' \
  -d '{
    "billing_address": {
        "address1": "Voltastrasse",
        "address2": "5",
        "city": "Berlin",
        "company": "Inventorum",
        "country": "DE",
        "first_name": "Ana",
        "last_name": "Schmidt",
        "state": "Berlin",
        "title": "Mrs.",
        "zipcode": "61-222"
    },
    "birthday": "1985-04-30T10:49:52Z",
    "company": "Inventorum",
    "email": "ana.schmidt@inventorum.com",
    "email_marketing_agreed": true,
    "first_name": "Ana",
    "is_b2b": true,
    "is_favourite": true,
    "is_vip": true,
    "last_name": "Schmidt",
    "note": "Some additional data",
    "phone_number": "7873676",
    "shipping_address": [
        {
            "address1": "Berlinerstrasse",
            "address2": "10",
            "city": "Bremen",
            "company": "",
            "country": "DE",
            "first_name": "John",
            "last_name": "Schmidt",
            "state": "Bremen",
            "title": "Mr.",
            "zipcode": "44-444"
        }
    ],
    "title": "Mrs.",
    "tax_number": "DE288362273",
    "channel": 1
}'

Response

{
    "id": 553910,
    "account_scoped_id": 398,
    "billing_address": {
        "country": "DE",
        "id": 648909,
        "address1": "Voltastrasse",
        "address2": "5",
        "zipcode": "61-222",
        "city": "Berlin",
        "state": "Berlin",
        "first_name": "Ana",
        "last_name": "Schmidt",
        "company": "Inventorum",
        "title": "Mrs."
    },
    "shipping_address": [
        {
            "country": "DE",
            "id": 648908,
            "address1": "Berlinerstrasse",
            "address2": "10",
            "zipcode": "44-444",
            "city": "Bremen",
            "state": "Bremen",
            "first_name": "John",
            "last_name": "Schmidt",
            "company": "",
            "title": "Mr."
        }
    ],
    "is_vip": true,
    "is_favourite": true,
    "first_name": "Ana",
    "phone_number": "7873676",
    "last_name": "Schmidt",
    "middle_name": null,
    "company": "Inventorum",
    "email_marketing_agreed": true,
    "note": "Some additional data",
    "group": null,
    "email": "ana.schmidt@inventorum.com",
    "is_b2b": true,
    "tax_number": "DE288362273",
    "title": "Mrs.",
    "customer_note": null,
    "is_confirmed": false,
    "channel": 1,
    "birthday": "1985-04-30T12:49:52+02:00",
    "total_sales": "0"
}

Error

Status 400 Bad Request
{
    "error": {
        "fields": {
            "first_name": [
                "Name or company must be set"
            ],
            "last_name": [
                "Name or company must be set"
            ],
            "company": [
                "Name or company must be set"
            ]
        },
        "description": "Serialization error",
        "key": "common.serializer_error"
    }
}

DELETE /customers/customer_id

Deletes a specified customer.

Required scopes: customers

Required headers: 'Accept: application/json'

Request

curl -X DELETE \
  https://app.inventorum.com/api/customers/152664/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {{oauth_token}}' \
  -H 'X-Api-Version: 10'

Response

Status 200 OK
{}

error

Status 404 Not Found
{
    "error": {
        "fields": {},
        "description": null,
        "key": "common.unknown"
    }
}