Create a customer
  • 22 Nov 2024
  • 3 Minutes to read
  • Contributors
  • Dark
    Light

Create a customer

  • Dark
    Light

Article summary

Post
/customer/v1/customers

Create a new customer

Security
HTTP
Type bearer
Header parameters
Idempotency-Key
string
Body parameters
Expand All
object
email
string (email) Required

The email address of the customer

firstName
string Required

The first name of the customer

lastName
string Required

The last name of the customer

phone
string

The phone number of the customer

addresses
Array of object Required
Min items1
object
line1
string Required

The first line of the address

line2
string

The second line of the address

line3
string

The third line of the address

city
string Required

The city of the address

province
string Required

The province of the address

postalCode
string Required

The postal code of the address

country
string Required

The country of the address

meta
object

The meta data of the customer

Responses
201

Customer created successfully

Expand All
object
data
object
type
string

The type of the object

Valid values[ "CUSTOMER" ]
id
string

The unique identifier of the customer

email
string (email)

The email address of the customer

firstName
string

The first name of the customer

lastName
string

The last name of the customer

createdAt
string (date-time)

The date and time the customer was created

updatedAt
string (date-time)

The date and time the customer was last updated

phone
string

The phone number of the customer

addresses
Array of object

The addresses of the customer

Min items1
object
id
string

The unique identifier of the address

type
string

The type of the object

Valid values[ "ADDRESS" ]
createdAt
string (date-time)

The date and time the address was created

updatedAt
string (date-time)

The date and time the address was last updated

line1
string

The first line of the address

line2
string

The second line of the address

line3
string

The third line of the address

city
string

The city of the address

province
string

The province of the address

postalCode
string

The postal code of the address

country
string

The country of the address

meta
object

The meta data of the customer

meta
object
400

Invalid Request

Expand All
object
meta
object

Additional information about the error.

errors
Array of object

A list of causes for the error.

object
status
string

The HTTP status code of the error.

title
string

A short, human-readable summary of the problem.

detail
string

A human-readable explanation specific to this occurrence of the problem.

source
object

The source of the error.

pointer
string

A JSON Pointer to the location in the request that caused the error.

parameter
string

The parameter in the request that caused the error.

header
string

The header in the request that caused the error.

meta
object

Additional information about the error.

401

Invalid Authentication Credentials

Expand All
object
meta
object

Additional information about the error.

errors
Array of object

A list of causes for the error.

object
status
string

The HTTP status code of the error.

title
string

A short, human-readable summary of the problem.

detail
string

A human-readable explanation specific to this occurrence of the problem.

source
object

The source of the error.

pointer
string

A JSON Pointer to the location in the request that caused the error.

parameter
string

The parameter in the request that caused the error.

header
string

The header in the request that caused the error.

meta
object

Additional information about the error.

403

Invalid Authorization Credentials

Expand All
object
meta
object

Additional information about the error.

errors
Array of object

A list of causes for the error.

object
status
string

The HTTP status code of the error.

title
string

A short, human-readable summary of the problem.

detail
string

A human-readable explanation specific to this occurrence of the problem.

source
object

The source of the error.

pointer
string

A JSON Pointer to the location in the request that caused the error.

parameter
string

The parameter in the request that caused the error.

header
string

The header in the request that caused the error.

meta
object

Additional information about the error.

500

Internal Server Error

Expand All
object
meta
object

Additional information about the error.

errors
Array of object

A list of causes for the error.

object
status
string

The HTTP status code of the error.

title
string

A short, human-readable summary of the problem.

detail
string

A human-readable explanation specific to this occurrence of the problem.

source
object

The source of the error.

pointer
string

A JSON Pointer to the location in the request that caused the error.

parameter
string

The parameter in the request that caused the error.

header
string

The header in the request that caused the error.

meta
object

Additional information about the error.


Was this article helpful?