Create customer
POST/openapi/2026-07/customers
Create a new customer with the provided details.
Request
- application/json
- Body
- Example
Bodyrequired
- Array [
- ]
customer objectrequired
Customer
Should be phone or email. If phone, the phone parameter is required; otherwise, email is required
Customer's first name
Customer's last name
Customer's password
Confirmation of the password
Tags assigned to the customer
The registered_at field records the creation time in UTC (0 timezone), formatted as ISO-8601
addresses object[]
A list of address objects under the customer object
Country name of the address, required at least 1 character. e.g "China"
ISO country code, required at least 1 character, e.g "CN" for China
The first name of the person receiving the shipment or package
The last name of the person receiving the shipment or package
This field represents the main address line, such as the house number and street name. It is used to specify the primary location of the address
This field represents an additional address line, such as an apartment number or suite number. It is used to provide more specific information about the location of the address
Area or region of the address
City of the address. This field specifies the name of the city or town where the address is located
Province or state of the address. This field specifies the administrative division or region within a country
Province code of the address. This field specifies the abbreviated or standardized code representing the province or state
Company name associated with the address
Phone number associated with the consignee
Area code for the phone number. This field specifies the code used to identify a specific geographic area for telephone calls
Postal or ZIP code of the address. This field specifies the code used to identify a specific geographic area for mail delivery
Gender of the person, optional field. Acceptable values are "male" and "female"
Email address for the consignee. This field is used to specify the email address of the person receiving the shipment or package
Indicates if this is the default address. "true" if this is the first address created for the user, otherwise "false"
Email address, required when contact_type is email
Phone number with area code, required when contact_type is phone
Whether to subscribe to marketing email campaigns. Defaults to true
trueWhether to subscribe to SMS marketing campaigns. Defaults to true
true{
"customer": {
"contact_type": "string",
"first_name": "string",
"last_name": "string",
"password": "string",
"password_confirmation": "string",
"tags": [
"string"
],
"registered_at": "string",
"addresses": [
{
"country": "string",
"country_code": "string",
"first_name": "string",
"last_name": "string",
"address1": "string",
"address2": "string",
"area": "string",
"city": "string",
"province": "string",
"province_code": "string",
"company": "string",
"phone": "string",
"phone_area_code": "string",
"zip": "string",
"gender": "string",
"email": "string",
"default": true
}
],
"email": "string",
"phone": "string",
"accepts_marketing": true,
"accepts_sms_marketing": true
}
}
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
- Array [
- ]
error code
error message
data object
customer object
Customer object containing customer details
Customer ID
Customer's email address
Timestamp when the customer was created, in ISO8601 format
Timestamp when the customer was last updated, in ISO8601 format
Customer's first name
Customer's last name
Customer's phone number
Tags associated with the customer
Full name of the customer
Area code of the phone number
Contact type, either email or phone
Customer's SMS subscription status flag
addresses object[]
List of all customer addresses
Address ID
ID of the customer this address belongs to
First name of the consignee
Last name of the consignee
Company name
City of the address
Province or state of the address
Country name of the address
Postal or ZIP code
Province code
ISO country code
Gender of the consignee
Phone number associated with the address
Area code of the phone number
Area or region of the address
Email associated with the address
Full name of the consignee
Primary street address
Secondary street address
Full name of the country
Indicates if this is the default address
Indicates if the customer is subscribed to marketing emails
Source of the customer data
Indicates if the customer is exempt from taxes
Indicates if the customer is registered
Number of orders placed by the customer
First order timestamp
Timestamp of the customer's last order
Total amount spent by the customer
Customer's marketing subscription status flag
Indicates if the customer is subscribed to SMS marketing campaigns
{
"code": "string",
"message": "string",
"data": {
"customer": {
"id": "string",
"email": "string",
"created_at": "string",
"updated_at": "string",
"first_name": "string",
"last_name": "string",
"phone": "string",
"tags": [
"string"
],
"name": "string",
"phone_area_code": "string",
"contact_type": "string",
"sms_subscribed_flag": 0,
"addresses": [
{
"id": "string",
"customer_id": "string",
"first_name": "string",
"last_name": "string",
"company": "string",
"city": "string",
"province": "string",
"country": "string",
"zip": "string",
"province_code": "string",
"country_code": "string",
"gender": "string",
"phone": "string",
"phone_area_code": "string",
"area": "string",
"email": "string",
"name": "string",
"address1": "string",
"address2": "string",
"country_name": "string",
"default": true
}
],
"accepts_marketing": true,
"source": "string",
"free_tax": true,
"registered": true,
"orders_count": 0,
"first_order_at": "string",
"last_order_at": "string",
"total_spent": "string",
"subscribed_flag": 0,
"accepts_sms_marketing": true
}
}
}