API reference · Customers

Link Customer to a Group

PUThttps://api.sandbox.cws.digital/customer/{document}/priceType/{customerGroupId}

Description

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

Parameters

Path parameters

FieldTypeRequiredDescriptionValue
documentstringYes

Customer's CPF or CNPJ, without punctuation. See the rule below.

customerGroupIdintegerYes

Id of the customer group or of the price type. It is the internalId that the group query returns.

Business rules

The document goes without punctuation

Send only the digits: 46693537308, not 466.935.373-08.

A punctuated CNPJ carries a slash, which splits the path into two segments — the request does not reach this endpoint.

Linking again responds 200

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

Responses

  • 401

    Missing, malformed or expired token.

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/customer/57578030000105/priceType/4470901' \
  --header 'Authorization: Bearer <access_token>'

Response

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