Look up an account by the client's CUIT
When the ERP needs to issue a receivable and only knows the end client's CUIT, it must first resolve the corresponding receivableAccountId.
The goal of this flow is, given a CUIT, to find the candidate receivable account(s) to collect into.
Endpoint
It is the general listing filtered by clientTaxId (and optionally branchExternalCode):
GET /v1/receivable-accounts?clientTaxId=30998888887&branchExternalCode=01
| Parameter | Type | Description |
|---|---|---|
clientTaxId | string | Client's CUIT/CUIL, 11 digits without dashes |
branchExternalCode | string | Optional, if the client has branches |
status | enum | Default ACTIVE |
expand | string | owner to include displayName |
Response cases
Single match
The ideal case. X-Total-Count: 1 and a single item:
200 OK
X-Total-Count: 1
Content-Type: application/json
[
{
"id": 4242,
"cvu": "0000000099887766554433",
"alias": "distribuidora.demo.kiosco.central",
"currencyCode": "ARS",
"status": "ACTIVE",
"owner": { "type": "CLIENT", "id": 1042 },
"stats": { ... }
}
]
Multiple matches
The client has multiple branches or multiple operating patterns. X-Total-Count > 1. The ERP must choose:
200 OK
X-Total-Count: 3
[
{ "id": 4242, "owner": { "type": "CLIENT", "id": 1042 }, ... },
{ "id": 4250, "owner": { "type": "CLIENT_AND_ASSOCIATE", "clientId": 1043, "associateId": 88 }, ... },
{ "id": 4251, "owner": { "type": "CLIENT_AND_ASSOCIATE", "clientId": 1043, "associateId": 89 }, ... }
]
Passing expand=owner returns the displayName and taxId of the owner on each candidate, so the ERP can show a selector to the user if it has UI:
GET /v1/receivable-accounts?clientTaxId=30998888887&expand=owner
[
{
"id": 4250,
"owner": {
"type": "CLIENT_AND_ASSOCIATE",
"clientId": 1043,
"associateId": 88,
"client": { "displayName": "Kiosco Central - Downtown Branch", "taxId": "30998888887", "branchExternalCode": "01" },
"associate": { "displayName": "Operario 042", "taxId": "20999999999" }
},
...
},
...
]
No matches
X-Total-Count: 0, status 204 No Content (no body).
To distinguish "the client does not exist" from "the client exists but has no receivable account", make an additional GET /v1/clients?taxId=....