Create customer

Create a new customer in an Ecwid store.

Headers

NameTypeDescription
AuthorizationstringoAuth token with mandatory Bearer before it. Example: Bearer e***s0, where e***s0 should be replaced with your oAuth token.

Request

A JSON object of type 'Customer' with the following fields:

📘

Parameters in bold are mandatory

Customer

FieldTypeDescription
emailstringCustomer email
passwordstringCustomer password
customerGroupIdnumberCustomer group ID
billingPerson<Person>Customer's billing name/address
shippingAddressesArray<ShippingAddress>Customer address book items (deprecated for new instant site customer accounts)
taxIdstringCustomer tax ID
taxIdValidbooleantrue if customer tax ID is valid, false otherwise
b2b_b2cstringOrder type: business-to-business (b2b) or business-to-consumer (b2c)
fiscalCodestringFiscal code of a customer
taxExemptbooleantrue if customer is tax exempt, false otherwise. Learn more
acceptMarketingbooleantrue 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
langstringCustomer's language code (based on the language of the storefront).

Person

FieldTypeDescription
namestringCustomer full name
companyNamestringCustomer company name
streetstringStreet
citystringCity
countryCodestringCountry (2-digits code)
postalCodestringPostal code (zip code)
stateOrProvinceCodestringState/province code
phonestringPhone number

ShippingAddress

FieldTypeDescription
idnumberInternal address ID
namestringCustomer full name
companyNamestringCustomer company name
streetstringStreet
citystringCity
countryCodestringCountry (2-digits code)
postalCodestringPostal code (zip code)
stateOrProvinceCodestringState/province code
phonestringPhone number

Response

A JSON object of type 'CreateStatus' with the following fields:

CreateStatus

FieldTypeDescription
idnumberID 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 StatusResponse JSONDescription
400Request parameters are malformed
409The customer with the given email already exists
415Unsupported content-type: expected application/json or text/json
500The creation request failed because of an error on the server

Error response body (optional)

FieldTypeDescription
errorMessagestringError message
Language