Get unit holder accounts by document
Returns every unit holder account in which a person is a holder, found by DNI number — whoever created the account.
GET
/v1/aperturas/unit-holder/by-document/{document_number}Reader permission required
This lookup crosses accounts from different creators, so it needs a reader permission that Allaria grants separately. Without it the call fails with 403.
Request
Headers
| Field | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Access token in Bearer ACCESS_TOKEN format |
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
document_number | string | Yes | DNI number of the holder. |
Not applicable: Query Parameters, Body.
Response
2XX Success
Status: 200 OK
| Field | Type | Description |
|---|---|---|
document_number | string | The number you queried. |
accounts | array | Accounts ordered by creation. Each item has the same shape as account in Get unit holder account (shortened here). |
Error Codes
| Status | Description |
|---|---|
401 | Unauthorized — invalid or missing access token |
403 | Forbidden — no reader permission |
404 | Not Found — the person is not a holder of any account |
Code Example
- cURL
- JavaScript
- Python
- Node.js
curl -X GET "https://b2b.allaria.cloud/v1/aperturas/unit-holder/by-document/30123474" \
-H "Authorization: Bearer ACCESS_TOKEN"
const response = await fetch('https://b2b.allaria.cloud/v1/aperturas/unit-holder/by-document/30123474', {
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/unit-holder/by-document/30123474',
headers={'Authorization': 'Bearer ACCESS_TOKEN'}
)
print(response.json())
const axios = require('axios');
const response = await axios.get(
'https://b2b.allaria.cloud/v1/aperturas/unit-holder/by-document/30123474',
{ headers: { Authorization: 'Bearer ACCESS_TOKEN' } }
);
console.log(response.data);
2XX Success
{
"document_number": "30123474",
"accounts": [
{
"tax_id": "30712345833",
"legal_entity_name": "EMPRESA PRUEBA SA",
"state": "Operativo",
"creation_state": "CREATED",
"unit_holder_number": 123456,
"persons": []
}
]
}