Get savings plan
To retrieve the details of a savings plan, perform the following request:
GET
/v1/savings/investment-plans/{plan_id}Request
Headers
| Field | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Access token in Bearer ACCESS_TOKEN format |
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
plan_id | number | Yes | Plan identifier. |
Not applicable: Query Parameters, Body.
Response
2XX Success
| Field | Type | Description |
|---|---|---|
plan_id | number | Plan identifier. |
code | string | Plan code. |
name | string | Plan name. |
currency | string | Plan currency. |
year_variation | number | Projected annual variation of the plan. |
horizon | string | Investment horizon. Allowed values: SHORT_TERM, MEDIUM_TERM, LONG_TERM. |
risk | string | Plan risk level. Allowed values: LOW, MEDIUM, HIGH. |
minimum_investment | number | Minimum investment amount. |
funds | array | List of funds that make up the plan. |
funds[].code | string | Fund code. |
funds[].name | string | Fund name. |
funds[].percentage | number | Fund participation percentage in the plan. |
Error Codes
Errors return the following body:
{
"code": "invalid_request",
"description": "Error description."
}
| Status | Code | Condition |
|---|---|---|
400 | plan_not_accessible | The specified plan is not accessible for the authenticated merchant. |
403 | — | The token does not have the required role to operate this endpoint. |
Code Example
- cURL
- JavaScript
- Python
- Node.js
curl -X GET https://b2b.allaria.cloud/v1/savings/investment-plans/1 \
-H "Authorization: Bearer ACCESS_TOKEN"
const planId = 1;
const response = await fetch(
`https://b2b.allaria.cloud/v1/savings/investment-plans/${planId}`,
{
method: 'GET',
headers: {
'Authorization': 'Bearer ACCESS_TOKEN'
}
}
);
const data = await response.json();
console.log(data);
import requests
plan_id = 1
response = requests.get(
f'https://b2b.allaria.cloud/v1/savings/investment-plans/{plan_id}',
headers={
'Authorization': 'Bearer ACCESS_TOKEN'
}
)
data = response.json()
print(data)
const axios = require('axios');
const planId = 1;
const response = await axios.get(
`https://b2b.allaria.cloud/v1/savings/investment-plans/${planId}`,
{
headers: {
Authorization: 'Bearer ACCESS_TOKEN'
}
}
);
console.log(response.data);
2XX Success
{
"plan_id": 1,
"code": "MEDIUM_ARS",
"name": "Fondo Común de Inversión ARS",
"currency": "ARS",
"year_variation": 0.45,
"horizon": "MEDIUM_TERM",
"risk": "LOW",
"minimum_investment": 10000.00,
"funds": [
{
"code": "FCI_001",
"name": "Fondo Común de Inversión ARS",
"percentage": 100.00
}
]
}