post https://app.ecwid.com/api/v3//customers
Create a new customer in an Ecwid store.
Access scopes
Requires the following access scope: create_customers
Path params
Param | Type | Description |
---|---|---|
storeId | number | Ecwid store ID. |
Headers
The Authorization header with a secret access token is required.
Header | Format | Description |
---|---|---|
Authorization | Bearer secret_ab***cd | Access token of the application. |
Request
A JSON object with the following fields:
Field | Type | Description |
---|---|---|
string | Customer email. Required | |
password | string | Customer password (for stores with the legacy customer sign-in) |
customerGroupId | number | Customer group ID |
billingPerson | Object billingPerson | Customer's billing name/address |
shippingAddresses | Array shippingAddress | Customer address book items (deprecated for new instant site customer accounts) |
contacts | Array contacts | Customer's contact information: email, phone, social media links. |
taxId | string | Customer tax ID |
taxIdValid | boolean | true if customer tax ID is valid, false otherwise |
b2b_b2c | string | Order type: business-to-business (b2b ) or business-to-consumer (b2c ) |
fiscalCode | string | Fiscal code of a customer |
taxExempt | boolean | true if customer is tax exempt, false otherwise. Learn more |
acceptMarketing | boolean | true if customer has accepted email marketing and you can use their email for promotions. If value is false , you can't use this email for promotions |
lang | string | Customer's language code (based on the language of the storefront). |
billingPerson
Field | Type | Description |
---|---|---|
name | string | Customer full name |
companyName | string | Customer company name |
street | string | Street |
city | string | City |
countryCode | string | Country (2-digits code) |
postalCode | string | Postal code (zip code) |
stateOrProvinceCode | string | State/province code |
phone | string | Phone number |
shippingAddress
Array of objects, where each object contains the following fields:
Field | Type | Description |
---|---|---|
id | number | Internal address ID |
name | string | Customer full name |
companyName | string | Customer company name |
street | string | Street |
city | string | City |
countryCode | string | Country (2-digits code) |
postalCode | string | Postal code (zip code) |
stateOrProvinceCode | string | State/province code |
phone | string | Phone number |
contacts
Array of objects, where each object contains the following fields:
Field | Type | Description |
---|---|---|
id | number | Unique contact Id |
contact | string | Customer's contact data (email, phone, etc) |
type | string | Type of contact data. Values: EMAIL , PHONE , WHATSAPP , TELEGRAM , VIBER , FACEBOOK , INSTAGRAM , TWITTER , TIKTOK , URL , OTHER |
default | boolean | true if the contact is primary (default). Only one contact of each type (EMAIL , PHONE ) can be default. |
note | string | Merchant's comments about a contact |
orderBy | number | Sort position |
timestamp | string | Date of creating/updating the contact |
Response
A JSON object with the following fields:
Field | Type | Description |
---|---|---|
id | number | ID of the created customer |