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
Request
A JSON object with the following fields:
Parameters in bold are mandatory
Field | Type | Description |
---|---|---|
string | Customer email | |
password | string | Customer password (for stores with the legacy customer sign-in) |
customerGroupId | number | Customer group ID |
billingPerson | <Person> | Customer's billing name/address |
shippingAddresses | Array<ShippingAddress> | Customer address book items (deprecated for new instant site customer accounts) |
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). |
Person
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
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 |
Response
A JSON object of type 'CreateStatus' with the following fields:
CreateStatus
Field | Type | Description |
---|---|---|
id | number | ID of the created customer |
Errors
In case of error, Ecwid responds with an error HTTP status code and JSON-formatted body containing error description.
HTTP codes
HTTP Status | Response JSON | Description |
---|---|---|
400 | Request parameters are malformed | |
409 | The customer with the given email already exists | |
415 | Unsupported content-type: expected application/json or text/json | |
500 | The creation request failed because of an error on the server |
Error response body (optional)
Field | Type | Description |
---|---|---|
errorMessage | string | Error message |