API reference · Customers

Get Customer by Document

GEThttps://api.sandbox.cws.digital/v1/customer/document/{document}

Description

Finds a customer of your store by document and returns the complete registration, with addresses and price links.

Parameters

Path parameters

FieldTypeRequiredDescriptionValue
documentstringYes

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

Business rules

The document goes without punctuation

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

A punctuated CNPJ carries a slash (57.578.030/0001-05), which splits the path into two segments — the request does not reach this endpoint and you get 404 {"status":"NOT_FOUND","message":"Serviço não encontrado"}, which is the response for a nonexistent route, not for a nonexistent customer.

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 GET \
  --url 'https://api.sandbox.cws.digital/v1/customer/document/46693537308' \
  --header 'Authorization: Bearer <access_token>'

Response

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