API reference · Sales Rep Module
Link Customer to Sales Rep
- Method
- POST
- Route
-
/sellerModule/addCustomer/:attendantIdOrDocument - Base URL
https://ws.autorei.net- Path parameters
:attendantIdOrDocument- Query parameters in the example
uniqueAttendant=false- Token
- Requires Bearer token
Test in Postman
Opens this request in the public API documentation, the official source of the reference.
Description
Links a customer to a sales rep's customer portfolio. From the link onwards, the customer is served by that sales rep.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
attendantIdOrDocument |
string | Yes | Identifies the sales rep: accepts the sales rep UUID or the CPF/CNPJ of their account holder. The route recognizes which of the two you sent. |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
uniqueAttendant |
boolean | No | true makes this link the customer's only one, replacing the previous sales rep. Default false, which accumulates sales reps for the same customer. |
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| Customer identification | — | Yes | Not a field — a group. Send username or document. |
username |
string | Conditional | Customer login e-mail. Required if document is not sent. |
document |
string | Conditional | Customer CPF or CNPJ. Required if username is not sent. |
Business rules
The customer must belong to your store
The link is only created for a customer already registered in the authenticated store. A customer from another store, or a document with no registration, is rejected.
Response · 200
The link created. The identification fields reflect what you sent: only username, only document, or both.
| Field | Type | Description |
|---|---|---|
id |
uuid | Link id. It is the value the unlink route asks for. |
username |
string | Customer e-mail. Only when you sent it. |
document |
string | Customer document. Only when you sent it. |
createdAt · updatedAt |
string | Creation and last change of the link, in UTC. |
Errors
| Code | When |
|---|---|
| 400 | Body missing or empty (Body não informado), body without username and without document, document with no customer in your store (Nenhum cliente localizado com esse documento), sales rep not found (Nenhum vendedor localizado com esse documento / Nenhum vendedor localizado com esse ID), or account not found in the service desk (Conta não localizada). |
| 401 | Token missing, malformed or expired. |
Example request
curl --request POST 'https://ws.autorei.net/sellerModule/addCustomer/:attendantIdOrDocument?uniqueAttendant=false' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"document": "29.893.264/0001-01"
}' Example responses
200Success — customer linked by document
{
"id": "2f9d4c17-8a53-41be-b06d-9c1e7f28a5d3",
"document": "29.893.264/0001-01",
"createdAt": "2026-09-02T10:15:33.204118Z",
"updatedAt": "2026-09-02T10:15:33.204118Z"
} Used in
- Use casesComplex retail and B2B2C: the typical path through the API
- Use casesGuided selling and counter sales: the typical path through the API
Related endpoints
Generated from the public API collection, published on 2026-09-04: api-docs.cws.digital.