Find channels by document
Looks up channels and their bank account details using a CPF and/or CNPJ.
| Method | GET |
| Path | /api/channel/by-document |
| Authentication | JWT in the Authorization header, using the Bearer scheme |
| Body | None |
Authentication and authorization
Use a valid JWT obtained from the login endpoint.
This route does not require Channel-ID.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
cpf | string | Conditional | CPF to look up. Required if cnpj is not supplied. |
cnpj | string | Conditional | CNPJ to look up. Required if cpf is not supplied. |
Supply at least one parameter with a non-empty value. Both can be sent in the same request.
cURL examples
Replace CASH_IN_BASE_URL with the Cash-In host for your environment,
TOKEN_JWT with your token, and the document placeholders with the values
to look up. The examples use --oauth2-bearer to send the JWT in the
Authorization header using the Bearer scheme.
Look up by CPF
curl --get "${CASH_IN_BASE_URL}/api/channel/by-document" \
--oauth2-bearer "${TOKEN_JWT}" \
--header 'Accept: application/json' \
--data-urlencode 'cpf=HOLDER_CPF'
Look up by CNPJ
curl --get "${CASH_IN_BASE_URL}/api/channel/by-document" \
--oauth2-bearer "${TOKEN_JWT}" \
--header 'Accept: application/json' \
--data-urlencode 'cnpj=COMPANY_CNPJ'
To send both, include both parameters using --data-urlencode.
Do not send a JSON body.
Success response
200 OK — list of returned channels.
[
{
"channel_id": "5b3ac5c0-0caf-4c1d-a2b9-5e2ddac1f5dc",
"name": "Example channel",
"account": {
"bank": "000",
"bank_branch": "0001",
"bank_account": "123456",
"bank_account_digit": "0"
}
}
]
| Field | Type | Description |
|---|---|---|
channel_id | UUID | Channel identifier. |
name | string or null | Channel name. |
account | object | Channel bank account details. |
account.bank | string or null | Bank. |
account.bank_branch | string or null | Branch. |
account.bank_account | string or null | Account number. |
account.bank_account_digit | string or null | Account check digit. |
The response is a list, not a single object. Bank details remain strings, preserving any leading zeros.
Errors
API error messages remain in Portuguese.
400 Bad Request — neither document supplied, or both empty:
{ "message": "pelo menos um dos campos cpf ou cnpj deve ser preenchido" }
401 Unauthorized — missing or malformed token:
{ "error": "Token ausente ou inválido" }
Invalid or expired token:
{ "error": "Token inválido" }
Other query errors use the following format, with the corresponding HTTP status:
{ "message": "<error description>" }