Update customer

Update details of an existing customer in an Ecwid store.

Access scopes

Requires the following access scope: update_customers

Path params

ParamTypeDescription
storeIdnumberEcwid store ID.
customerIdnumberCustomer ID.

Headers

The Authorization header with a secret access token is required.

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

Request body

A JSON object with the following fields:

FieldTypeDescription
emailstringCustomer email
passwordstringCustomer password
customerGroupIdnumberCustomer group ID
billingPersonObject billingPersonCustomer's billing name/address
shippingAddressesArray shippingAddressesCustomer 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
electronicInvoicePecEmailstringPEC email for invoices
electronicInvoiceSdiCodestringSDI code for invoices
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
updateCountnumberThe number of update customers (0 or 1 depending on whether the request was successful)
Language
Click Try It! to start a request and see the response here!