API reference · Customers · Customer Management
Find Customer by Document
- Method
- GET
- Route
-
/v1/customer/document/: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
Finds a customer in your store by document and returns the complete record, with addresses and price links.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
document |
string | Yes | Customer's CPF or CNPJ, without punctuation. See the rule below. |
Business rules
The document goes without punctuation
Send only the digits: 70041364856, not 700.413.648-56. A punctuated CNPJ carries a slash (29.893.264/0001-01), which splits the path into two segments — the request never reaches this endpoint and you receive 404 {"status":"NOT_FOUND","message":"Serviço não encontrado"}, which is the response for a nonexistent route, not for a nonexistent customer.
Response · 200
The response comes wrapped in customer — {"customer": { ... }}.
| Field | Type | Description |
|---|---|---|
id |
integer | Customer id on CWS. |
document |
string | Customer's CPF or CNPJ. |
documentType |
string | pf or pj. |
name |
string | Name or legal name. |
tradingName |
string | Trade name. |
contactName |
string | Contact name. |
email |
string | Customer's login email. |
phone |
string | Phone, already formatted ((31) 99999-9999). |
dateCreated |
string | Date and time of registration. |
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's CNAE. |
paysIcms |
boolean | Whether it is an ICMS taxpayer. |
genre |
string | Gender. |
birthdate |
string | Date of birth. |
politicallyExposedPerson |
boolean | Whether it is a politically exposed person. |
federalEmployee |
boolean | Whether it is a federal public servant. |
optinTracking |
boolean | Whether it accepts tracking by message. |
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's 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 |
|---|---|
| 404 | Document not registered in your store. |
| 401 | Token missing, malformed or expired. |
Example request
curl --request GET 'https://ws.autorei.net/v1/customer/document/:document' \
--header 'Authorization: Bearer {{access_token}}' Example responses
200Success — individual (pessoa física)
{
"customer": {
"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) 98765-4321",
"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": true,
"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 casesB2B marketplace: the typical path through the API
- Use casesGuided selling and counter sales: 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.