API reference · Customers

Update Customer Registration Data

PUThttps://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

FieldTypeRequiredDescriptionValue
documentstringYes

Customer's CPF or CNPJ.

Request body

Content-Typeapplication/json
Edit the body with
FieldTypeRequiredDescriptionValue
namestringNo

Name, trade name and contact.

tradingNamestringNo

Name, trade name and contact.

contactNamestringNo

Name, trade name and contact.

phonestringNo

Customer's phone.

stateRegistrationstringNo

State registration.

cnaestringNo

Customer's CNAE.

paysIcmsbooleanNo

Whether the customer is an ICMS taxpayer.

politicallyExposedPersonbooleanNo

Profile flags.

federalEmployeestringNo

Civil servant: N not a civil servant, SV civil servant, SPF federal civil servant, SPE state civil servant, SPM municipal civil servant.

Allowed values:NSVSPFSPESPM
optinTrackingbooleanNo

Tracking acceptance and phone.

trackingPhonestringNo

Tracking acceptance and phone.

activebooleanNo

Activates or deactivates the customer.

passwordExpiredbooleanNo

Marks the password as expired.

sendEmailForgotPasswordbooleanNo

true sends the password reset e-mail to the customer.

ssoConfigIdintegerNo

SSO configuration.

customerRegistrationAddressobjectNo

Registration address, in the same format as in the creation.

priceRuleTagsarray of objectNo

Price tags, by name. The links sent are added to the current ones — none is removed.

customerTypeListarray of objectNo

Customer types. The links sent are added to the current ones — none is removed.

customerGroupListarray of objectNo

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.

Try it

Sandbox

Language

Credentials

Access token: saved in this tab and used on every endpoint.

Each token only reaches the partner's own data and that of the branches with an authorized link.

Don't have sandbox credentials yet? See how to request them

Request

cURL
curl --request PUT \
  --url 'https://api.sandbox.cws.digital/v1/customer/46693537308' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "contactName": "Ana Paula Ribeiro",
  "phone": "11912345678",
  "optinTracking": false
}'

Response

Click Try it to see the real response here, or pick a documented example: