Skip to content
platform

API reference · Customers · Customer Groups

Link Customer to a Group

Method
PUT
Route
/customer/:document/priceType/:customerGroupId
Base URL
https://ws.autorei.net
Path parameters
:document :customerGroupId
Token
Requires Bearer token
Test in Postman

Opens this request in the public API documentation, the official source of the reference.

Description

Links a price type to the customer. It is what makes the customer start receiving that type's price table.

Path Parameters

Parameter Type Required Description
document string Yes CPF or CNPJ of the customer, without punctuation. See the rule below.
customerGroupId integer Yes Id of the customer group or price type — both live in the same table, and the group is a price type. It is the internalId that the group query returns.

Business rules

The document goes without punctuation

Send only the digits: 70041364856, not 700.413.648-56. A punctuated CNPJ carries a slash, which splits the path into two segments — the request never reaches this endpoint.

Linking twice is not an error

If the customer was already linked to that price type, the response is 200 with a message that the link already exists. The final state is the same.

Response · 200

Field Type Description
status string OK.
message string Link confirmation, or the notice that it already existed.

Errors

Code When
404 {"status":"NOT_FOUND","message":"Cliente não encontrado!"} — document not registered in your store.
404 {"status":"NOT_FOUND","message":"PriceType não encontrado!"} — the group does not exist or does not belong to your store. It is also the response for a non-numeric id or zero.
401 Token missing, malformed, or expired.

Example request

curl --request PUT 'https://ws.autorei.net/customer/:document/priceType/:customerGroupId' \
  --header 'Authorization: Bearer {{access_token}}'

Example responses

200Success — price type linked

{
  "status": "OK",
  "message": "PriceType associado"
}

Used in

Generated from the public API collection, published on 2026-09-04: api-docs.cws.digital.