Update customer

Update details of an existing 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 body

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

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
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).

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 'UpdateStatus' with the following fields:

UpdateStatus

FieldTypeDescription
updateCountnumberThe number of update customers (0 or 1 depending on whether the request was successful)

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
404The customer with given ID is not found
409The customer with the given email already exists
415Unsupported content-type: expected application/json or text/json
500The update request failed because of an error on the server

Error response body (optional)

FieldTypeDescription
errorMessagestringError message
Language