API reference · Customers · Customer Management
Update Customer Registration Data
- Method
- PUT
- Route
-
/v1/customer/:document - Base URL
https://ws.autorei.net- Path parameters
:document- Token
- Requires Bearer token
Opens this request in the public API documentation, the official source of the reference.
Description
Updates the record of a customer of your store. It is a partial update: send only the fields you want to change.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
document |
string | Yes | Customer CPF or CNPJ. |
Request body (JSON)
All fields are optional — an omitted field is not changed.
| Field | Type | Description |
|---|---|---|
name · tradingName · contactName |
string | Name, trade name and contact. |
phone |
string | Customer phone. |
stateRegistration |
string | State registration. |
cnae |
string | Customer CNAE. |
paysIcms |
boolean | Whether the customer is an ICMS taxpayer. |
politicallyExposedPerson · federalEmployee |
boolean | Profile flags. |
optinTracking · trackingPhone |
— | Tracking opt-in and phone. |
active |
boolean | Activates or deactivates the customer. |
passwordExpired |
boolean | Marks the password as expired. |
sendEmailForgotPassword |
boolean | true triggers the password reset email to the customer. |
ssoConfigId |
integer | SSO configuration. |
customerRegistrationAddress |
object | Registration address, in the same format as creation. |
priceRuleTags |
array | Price tags, by name. Replaces the current links. |
customerTypeList |
array | Customer types. Replaces the current links. |
customerGroupList |
array | Customer groups. Replaces the current links. |
Business rules
active here does the same as the status endpoint
Sending active on this route has the same effect as PUT /customer/updateStatus/:document/:active. Both paths exist and change the same thing.
An empty body is accepted
{} responds 200 with the current record, changing nothing. It is not an error.
Response · 200
The updated customer, at the root (without the customer envelope).
| Field | Type | Description |
|---|---|---|
id |
integer | Customer id at CWS. |
document |
string | Customer CPF or CNPJ. |
documentType |
string | pf or pj. |
name |
string | Name or company name. |
tradingName |
string | Trade name. |
contactName |
string | Contact name. |
email |
string | Customer login email. |
phone |
string | Phone, already formatted ((31) 99999-9999). |
dateCreated |
string | Registration date and time. |
active |
boolean | Whether the customer is active. |
passwordExpired |
boolean | Whether the password is marked as expired. |
stateRegistration |
string | State registration. Comes as "isento" when not provided. |
cnae |
string | Customer CNAE. |
paysIcms |
boolean | Whether the customer is an ICMS taxpayer. |
genre |
string | Gender. |
birthdate |
string | Date of birth. |
politicallyExposedPerson |
boolean | Whether the customer is a politically exposed person. |
federalEmployee |
boolean | Whether the customer is a federal public employee. |
optinTracking |
boolean | Whether the customer accepts message tracking. |
trackingPhone |
string | Tracking phone. |
optinPath |
string | Origin of the consent. |
address |
array | Customer addresses, in the same format as GET /customer/addresses/:document. |
customerRegistrationAddress |
object | Registration address. |
priceRuleTag |
array | Customer price tags. Comes as null when there is no link. |
customerTypeList |
array | Linked customer types. null when there is no link. |
customerGroupList |
array | Linked customer groups. null when there is no link. |
Errors
| Code | When |
|---|---|
| 422 | Validation failure, in the format Property [campo] with value [x] does not pass validation. |
| 404 | Document has no record in your store. |
| 401 | Token missing, malformed or expired. |
Example request
curl --request PUT 'https://ws.autorei.net/v1/customer/:document' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"contactName": "Ana Paula Ribeiro",
"phone": "11912345678",
"optinTracking": false
}' Example responses
200Success — phone and opt-in updated
{
"id": 4470601,
"document": "700.413.648-56",
"documentType": "pf",
"name": "Ana Paula Ribeiro",
"tradingName": null,
"contactName": "Ana Paula Ribeiro",
"email": "ana.ribeiro@exemplo.com.br",
"phone": "(11) 91234-5678",
"dateCreated": "2026-09-01T13:42:07Z",
"active": true,
"passwordExpired": false,
"stateRegistration": "isento",
"cnae": null,
"paysIcms": false,
"genre": "F",
"birthdate": "1988-04-12",
"politicallyExposedPerson": false,
"federalEmployee": false,
"optinTracking": false,
"trackingPhone": "(11) 98765-4321",
"optinPath": "API",
"address": [
{
"id": 4470701,
"name": "Endereço de cadastro",
"zipcode": "01310-100",
"street": "Avenida Paulista",
"number": "1578",
"complement": "Conjunto 42",
"quarter": "Bela Vista",
"city": "São Paulo",
"state": "SP",
"principal": true,
"addressType": "RESIDENTIAL",
"farmerStateRegistration": null,
"howToReachLocationDescription": null,
"responsibleContact": null,
"attributes": {},
"dateCreated": "2026-09-01T13:42:07Z",
"lastUpdated": "2026-09-01T13:42:07Z"
}
],
"customerRegistrationAddress": {
"id": 4470701,
"name": "Endereço de cadastro",
"zipcode": "01310-100",
"street": "Avenida Paulista",
"number": "1578",
"complement": "Conjunto 42",
"quarter": "Bela Vista",
"city": "São Paulo",
"state": "SP",
"principal": true,
"addressType": "RESIDENTIAL",
"farmerStateRegistration": null,
"howToReachLocationDescription": null,
"responsibleContact": null,
"attributes": {},
"dateCreated": "2026-09-01T13:42:07Z",
"lastUpdated": "2026-09-01T13:42:07Z"
},
"priceRuleTag": null,
"customerTypeList": null,
"customerGroupList": null
} Used in
- Use casesEcommerce ERP integration: the typical path through the API
- Use casesB2B customer portal: the typical path through the API
- Webhooks and eventsCustomers webhook
Related endpoints
Generated from the public API collection, published on 2026-09-04: api-docs.cws.digital.