v1

latestOpenAPI 3.1.02026-07-241080412.6 KB

Register customer

Use this endpoint to register customers.

post/customers

Headers

Content-Typestring

Request body

emailstring required

Customer's email

localestring required

Defines language and text formatting for the user. E.g. "en_US", "fr_FR"

countrystring required

2-letter country code

currencystring required

Customer's currency. E.g. "USD", "EUR"

passwordstring

Customer's password

facebookIdstring

Customer's FacebookId

registrationDateinteger

Unix timestamp - Customer's registration date

externalIdstring

Customer's external ID

firstNamestring

Customer first name

lastNamestring

Customer last name

externalDataobject

Custom data in JSON format. You can store custom attributes of your choice here (for example, information about watched videos, percentage of completion). Note: it is not possible to report on this field.

ipAddressstring

Customer IP address. Stored as the last customer IP address and customer IP address at registration. If not provided, it is taken from the request header. Both IPv4 and IPv6 addresses are accepted.

taxIdentifierstring

The customer's tax identification number, e.g. a Brazilian CPF. Length 2–20. Example: 39053344705

phoneNumberstring

The customer's contact phone number. Length 2–20. Allowed characters only: digits and + - space ( ) . Example: +55 11 91234-5678

addressstring

First line of the customer's street address. Non-empty when supplied. Example: Avenida Paulista 1578

address2string

Second line of the customer's address (apartment, suite, unit, etc.). Non-empty when supplied. Example: Conjunto 42

dependentLocalitystring

District within the city. Length 2–100. Example: Bela Vista

citystring

City or town of the address. Example: São Paulo

statestring

State, province, or region. Length 2–50. Example: BR-SP

postalCodestring

Postal / ZIP code of the address. Length 2–20, upper-cased, validated against the country sent in the same request. Example: 01310-100

Response

200

successboolean
messagestring

Example response

{
  "success": true,
  "data": {
    "token": "uVcj2L08kz_WAUr9RJrNZ0AQNI6fqtxxldUtyyrJF_SlyW6i",
    "id": 123434443534,
    "email": "test@cleeng.com",
    "firstName": "Name",
    "lastName": "Lastname",
    "country": "UD",
    "regDate": "2019-05-07 02:00:00",
    "lastLoginDate": "2020-02-17 11:43:52",
    "transactions": "0",
    "termsAccepted": "no",
    "marketingOptIn": "no",
    "externalId": "12345",
    "externalData": {
      "active": 1
    }
  },
  "message": "Customer created successfully"
}