POST
/
customers
curl --request POST \
  --url https://api.kohortpay.com/customers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "emailAddress": "[email protected]",
  "firstName": "John",
  "lastName": "Doe",
  "phoneNumber": "+1 555 555 5555",
  "address": {
    "street": "123 Main St",
    "city": "Springfield",
    "state": "IL",
    "postalCode": "62701",
    "country": "US"
  },
  "shippingAddress": {
    "addressLine1": "Avenue des Champs-Élysées",
    "addressLine2": "Appartement 4B",
    "city": "Paris",
    "postalCode": "75014",
    "country": "France",
    "state": "Île-de-France",
    "companyName": "Google LLC",
    "vatNumber": "FR123456789",
    "registrationNumber": "123456789"
  },
  "metadata": {
    "order_id": "ord_1JYLo8KerLxWZaQtys6ZQ1xS"
  },
  "locale": "fr_FR",
  "clientReferenceId": "myclientid-1234"
}'
{
  "id": "cus_1234567890",
  "emailAddress": "[email protected]",
  "firstName": "John",
  "lastName": "Doe",
  "phoneNumber": "+1 555 555 5555",
  "livemode": true,
  "isBlocked": true,
  "organizationId": "org_1234567890",
  "addressId": "adr_1234567890",
  "shippingAddressId": "adr_1234567890",
  "metadata": {
    "my_system_id": "1JYLo8KerLxWZaQtys6ZQ1xS"
  },
  "createdAt": "2021-07-22T00:00:00.000Z",
  "createdBy": "usr_1234567890",
  "updatedAt": "2021-07-22T00:00:00.000Z",
  "blockedAt": "2021-07-22T00:00:00.000Z",
  "blockedBy": "usr_1234567890",
  "updatedBy": "usr_1234567890",
  "deletedAt": "2021-07-22T00:00:00.000Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
emailAddress
string
required

The primary email address of the customer.

firstName
string | null

The first name of the customer.

Example:

"John"

lastName
string | null

The last name of the customer.

Example:

"Doe"

phoneNumber
string | null

The phone number of the customer. Must include the country code.

Example:

"+1 555 555 5555"

address
object

The address of the customer.

Example:
{
  "street": "123 Main St",
  "city": "Springfield",
  "state": "IL",
  "postalCode": "62701",
  "country": "US"
}
shippingAddress
object

The shipping address of the customer.

metadata
object

Additional metadata for the customer.

Example:
{
  "order_id": "ord_1JYLo8KerLxWZaQtys6ZQ1xS"
}
locale
enum<string>

The locale preference of the customer.

Available options:
en_US,
fr_FR
Example:

"fr_FR"

clientReferenceId
string

Unique string of your choice to reconcile with your internal system.

Example:

"myclientid-1234"

Response

201 - application/json
Customer successfully created.
id
string
required

The id of the customer.

Example:

"cus_1234567890"

emailAddress
string
required

The primary email address of the customer.

firstName
string | null
required

The first name of the customer.

Example:

"John"

lastName
string | null
required

The last name of the customer.

Example:

"Doe"

phoneNumber
string | null
required

The phone number of the customer.

Example:

"+1 555 555 5555"

livemode
boolean
required

Wether the customer is in live mode or test mode.

Example:

true

isBlocked
boolean
required

Wether the customer is blocked or not.

Example:

true

organizationId
string
required

The id of the organization.

Example:

"org_1234567890"

addressId
string | null
required

The id of the shippingAddress.

Example:

"adr_1234567890"

shippingAddressId
string | null
required

The id of the shippingAddress.

Example:

"adr_1234567890"

metadata
object | null
required

Additional metadata for the customer.

Example:
{
  "my_system_id": "1JYLo8KerLxWZaQtys6ZQ1xS"
}
createdAt
string
required
Example:

"2021-07-22T00:00:00.000Z"

createdBy
string | null
required

The id of the user who created the customer.

Example:

"usr_1234567890"

updatedAt
string
required
Example:

"2021-07-22T00:00:00.000Z"

blockedAt
string | null
required
Example:

"2021-07-22T00:00:00.000Z"

blockedBy
string | null
required

The id of the user who blocked the customer.

Example:

"usr_1234567890"

updatedBy
string | null
required

The id of the user who last updated the customer.

Example:

"usr_1234567890"

deletedAt
string | null
required
Example:

"2021-07-22T00:00:00.000Z"