Create customer

Create a new customer in an Ecwid store.

Access scopes

Requires the following access scope: create_customers

Path params

ParamTypeDescription
storeIdnumberEcwid store ID.

Headers

The Authorization header with a secret access token is required.

HeaderFormatDescription
AuthorizationBearer secret_ab***cdAccess token of the application.

Request

A JSON object with the following fields:

FieldTypeDescription
emailstringCustomer email. Required
passwordstringCustomer password (for stores with the legacy customer sign-in)
customerGroupIdnumberCustomer group ID
billingPersonObject billingPersonCustomer's billing name/address
shippingAddressesArray shippingAddressCustomer address book items (deprecated for new instant site customer accounts)
contactsArray contactsCustomer's contact information: email, phone, social media links.
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).

billingPerson

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

shippingAddress

Array of objects, where each object contains the following fields:

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

contacts

Array of objects, where each object contains the following fields:

FieldTypeDescription
idnumberUnique contact Id
contactstringCustomer's contact data (email, phone, etc)
typestringType of contact data. Values: EMAIL, PHONE, WHATSAPP, TELEGRAM, VIBER, FACEBOOK, INSTAGRAM, TWITTER, TIKTOK, URL, OTHER
defaultbooleantrue if the contact is primary (default). Only one contact of each type (EMAIL, PHONE) can be default.
notestringMerchant's comments about a contact
orderBynumberSort position
timestampstringDate of creating/updating the contact

Response

A JSON object with the following fields:

FieldTypeDescription
idnumberID of the created customer
Language
Click Try It! to start a request and see the response here!