API reference · Customers
Update Customer Registration Data
https://api.sandbox.cws.digital/v1/customer/{document}Description
Updates the registration of a customer of your store. It is a partial update: send only the fields you want to change.
All fields are optional — an omitted field is not changed.
Parameters
Path parameters
| Field | Type | Required | Description | Value |
|---|---|---|---|---|
| document | string | Yes | Customer's CPF or CNPJ. |
Request body
application/json| Field | Type | Required | Description | Value |
|---|---|---|---|---|
| name | string | No | Name, trade name and contact. | |
| tradingName | string | No | Name, trade name and contact. | |
| contactName | string | No | Name, trade name and contact. | |
| phone | string | No | Customer's phone. | |
| stateRegistration | string | No | State registration. | |
| cnae | string | No | Customer's CNAE. | |
| paysIcms | boolean | No | Whether the customer is an ICMS taxpayer. | |
| politicallyExposedPerson | boolean | No | Profile flags. | |
| federalEmployee | string | No | Civil servant: Allowed values: NSVSPFSPESPM | |
| optinTracking | boolean | No | Tracking acceptance and phone. | |
| trackingPhone | string | No | Tracking acceptance and phone. | |
| active | boolean | No | Activates or deactivates the customer. | |
| passwordExpired | boolean | No | Marks the password as expired. | |
| sendEmailForgotPassword | boolean | No |
| |
| ssoConfigId | integer | No | SSO configuration. | |
| customerRegistrationAddress | object | No | Registration address, in the same format as in the creation. | |
| priceRuleTags | array of object | No | Price tags, by name. The links sent are added to the current ones — none is removed. | |
| customerTypeList | array of object | No | Customer types. The links sent are added to the current ones — none is removed. | |
| customerGroupList | array of object | No | Customer groups. The links sent are added to the current ones — none is removed. |
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 registration, without changing anything.
Responses
- 401
Missing, malformed or expired token.
- 404
Document not registered in your store.