Accounts by CUIT
Checks whether a person or entity already has open accounts in Allaria, regardless of the channel the accounts were opened through. Queries Esco live.
GET
/v1/aperturas/cuentas-por-cuitRequest
Headers
| Field | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Access token in Bearer ACCESS_TOKEN format |
Not applicable: Path Parameters, Body.
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
cuit | string | Yes | CUIT or CUIL of the person or entity. Numeric, 10 to 12 digits. |
Response
2XX Success
Status: 200 OK
If the CUIT/CUIL has no open accounts, tiene_cuenta is false and comitentes is an empty array.
| Field | Type | Description |
|---|---|---|
error | boolean | Always false on a successful response. |
errorMsg | string | null | Always null on a successful response. |
cuit | string | The CUIT/CUIL that was queried. |
tiene_cuenta | boolean | true if the CUIT/CUIL has at least one open account in Allaria. |
comitentes | array | Accounts (comitentes) associated with the CUIT/CUIL. Empty when tiene_cuenta is false. |
comitentes[].comitente | string | Comitente number. |
comitentes[].cod_comitente | number | null | Internal comitente code. |
comitentes[].descripcion | string | null | Account holder name as registered in Esco. |
Upstream (Esco) unavailable:
{
"error": true,
"errorMsg": "El servicio no está disponible, por favor reintente más tarde.",
"cuit": "20370872946",
"tiene_cuenta": null,
"comitentes": null
}
This shape is returned with HTTP status 503 — see Error Codes.
Error Codes
| Status | Description |
|---|---|
401 | Unauthorized — invalid or missing access token |
422 | Unprocessable Entity — cuit is missing or not a 10 to 12 digit number |
503 | Esco is unavailable. Same response shape as 200, with error set to true and tiene_cuenta/comitentes set to null. |
Code Example
- cURL
- JavaScript
- Python
- Node.js
curl -X GET "https://b2b.allaria.cloud/v1/aperturas/cuentas-por-cuit?cuit=20370872946" \
-H "Authorization: Bearer ACCESS_TOKEN"
const response = await fetch('https://b2b.allaria.cloud/v1/aperturas/cuentas-por-cuit?cuit=20370872946', {
method: 'GET',
headers: { 'Authorization': 'Bearer ACCESS_TOKEN' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get(
'https://b2b.allaria.cloud/v1/aperturas/cuentas-por-cuit',
params={ 'cuit': '20370872946' },
headers={ 'Authorization': 'Bearer ACCESS_TOKEN' }
)
data = response.json()
print(data)
const axios = require('axios');
const response = await axios.get('https://b2b.allaria.cloud/v1/aperturas/cuentas-por-cuit', {
params: { cuit: '20370872946' },
headers: { Authorization: 'Bearer ACCESS_TOKEN' }
});
console.log(response.data);
2XX Success
{
"error": false,
"errorMsg": null,
"cuit": "20370872946",
"tiene_cuenta": true,
"comitentes": [
{
"comitente": "400000123",
"cod_comitente": 123,
"descripcion": "Perez, Juan"
}
]
}