Reporting entities
Reporting entities owned by a client, and the portfolios associated with a reporting entity.
Data model
Reporting entity
JSON:API resource type: reporting-entity.
namestringDisplay name of the reporting entity.
Relationships
clientclientClient that owns the reporting entity.
portfoliosarray of portfolioPortfolios associated with a reporting entity.
Portfolio
JSON:API resource type: portfolio.
namestringDisplay name of the portfolio. Required.
Relationships
accountsarray of accountAccounts in the portfolio.
depositoriesarray of depositoryDepositories in the portfolio.
reportingEntityreporting-entityReporting entity that the portfolio is associated with.
Membership rule
All accounts and the depository of a legal entity's portfolio must be either fully included in or fully excluded from a portfolio. A missing one is a 400, for example Depository '{depositoryId}' must be included in the portfolio since it is related to account '{accountId}'. Otherwise, exclude the account. or Account '{accountId}' must be included in the portfolio since it is related to depository '{depositoryId}'. Otherwise, exclude the depository.
List reporting entities
Find all reporting entities owned by the client given by id. Returns 200.
Path parameters
idstringClient identifier, see
GET /clients. Required.
curl https://api.aleta.ai/api/v2/clients/6698d912deb64c8b2fec2c08/reporting-entities \
-H "Authorization: Bearer {access_token}"
{
"data": [
{
"type": "reporting-entity",
"id": "cb4b00eef0af406faddc82ae",
"attributes": { "name": "Reporting Entity 1" },
"relationships": {
"client": {
"data": { "id": "6698d912deb64c8b2fec2c08", "type": "client" }
},
"portfolios": { "data": [] }
}
},
{
"type": "reporting-entity",
"id": "51c10fb37fcada1fbda0eccf",
"attributes": { "name": "Reporting Entity 2" },
"relationships": {
"client": {
"data": { "id": "6698d912deb64c8b2fec2c08", "type": "client" }
},
"portfolios": { "data": [] }
}
},
{
"type": "reporting-entity",
"id": "eda70f1de75270ec9009dfde",
"attributes": { "name": "Reporting Entity 3" },
"relationships": {
"client": {
"data": { "id": "6698d912deb64c8b2fec2c08", "type": "client" }
},
"portfolios": { "data": [] }
}
}
]
}
Retrieve a reporting entity
Find the reporting entity given by id. Returns 200.
Path parameters
idstringReporting entity identifier, see
GET /clients/{id}/reporting-entities. Required.
curl https://api.aleta.ai/api/v2/reporting-entities/666bec24167e19c23eb786d6 \
-H "Authorization: Bearer {access_token}"
{
"data": {
"type": "reporting-entity",
"id": "666bec24167e19c23eb786d6",
"attributes": { "name": "Reporting entity 1" },
"relationships": {
"client": {
"data": { "id": "9d328abedbe8c8afabeffc69", "type": "client" }
},
"portfolios": {
"data": [
{ "id": "6699ee6d6bce2a04b34a8868", "type": "portfolio" },
{ "id": "6699ee7a8840a05de41743de", "type": "portfolio" }
]
}
}
}
}
Create a reporting entity
Create a reporting entity owned by the client given by id. Returns 201 with the created reporting entity.
Path parameters
idstringClient identifier, see
GET /clients. Required.
curl -X POST https://api.aleta.ai/api/v2/clients/6698d912deb64c8b2fec2c08/reporting-entities \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/vnd.api+json" \
-d '{
"data": {
"type": "reporting-entity",
"attributes": { "name": "New reporting entity" }
}
}'
{
"data": {
"attributes": { "name": "New reporting entity" },
"relationships": {
"client": {
"data": { "id": "6698d912deb64c8b2fec2c08", "type": "client" }
},
"portfolios": { "data": [] }
},
"id": "66991be2f9bcbf6057b65qa8",
"type": "reporting-entity"
}
}
Update a reporting entity
Update the reporting entity given by id. Returns 204 with no body.
Path parameters
idstringReporting entity identifier, see
GET /clients/{id}/reporting-entities. Required.
curl -X PATCH https://api.aleta.ai/api/v2/reporting-entities/666bec24167e19c23eb786d6 \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/vnd.api+json" \
-d '{
"data": {
"id": "666bec24167e19c23eb786d6",
"type": "reporting-entity",
"attributes": { "name": "Reporting entity 1" }
}
}'
Delete a reporting entity
Delete the reporting entity given by id. Returns 204 with no body.
Path parameters
idstringReporting entity identifier, see
GET /clients/{id}/reporting-entities. Required.
curl -X DELETE https://api.aleta.ai/api/v2/reporting-entities/dcdcbb6e5cfdca7dd597ac3a \
-H "Authorization: Bearer {access_token}"
List portfolios
Get portfolio information for all portfolios associated with the reporting entity given by id. Returns 200.
Path parameters
idstringReporting entity identifier, see
GET /clients/{id}/reporting-entities. Required.
curl https://api.aleta.ai/api/v2/reporting-entities/666bec24167e19c23eb786d6/portfolios \
-H "Authorization: Bearer {access_token}"
{
"data": [
{
"type": "portfolio",
"id": "6699ee6d6bce2a04b34a8868",
"attributes": { "name": "Portfolio 1" },
"relationships": {
"reportingEntity": {
"data": { "id": "666bec24167e19c23eb786d6", "type": "reporting-entity" }
},
"accounts": {
"data": [
{ "id": "6699ec9eed2e23e9f214ba6f", "type": "account" },
{ "id": "6698de390fb223343ef3b648", "type": "account" },
{ "id": "6698de390fb223343ef3b649", "type": "account" }
]
},
"depositories": {
"data": [{ "id": "6698debff36caf2dcef8d217", "type": "depository" }]
}
}
},
{
"type": "portfolio",
"id": "6699ee7a8840a05de41743de",
"attributes": { "name": "Portfolio 2" },
"relationships": {
"reportingEntity": {
"data": { "id": "666bec24167e19c23eb786d6", "type": "reporting-entity" }
},
"accounts": {
"data": [
{ "id": "6699ec9eed2e23e9f214bp1o", "type": "account" },
{ "id": "6698de390fb223343ef3b917", "type": "account" }
]
},
"depositories": {
"data": [{ "id": "6698debff36caf2dcef9g192", "type": "depository" }]
}
}
}
]
}
Retrieve a portfolio
Get portfolio information for the portfolio given by id. Returns 200.
Path parameters
idstringPortfolio identifier, see
GET /reporting-entities/{id}/portfolios. Required.
curl https://api.aleta.ai/api/v2/portfolios/6699ee6d6bce2a04b34a8868 \
-H "Authorization: Bearer {access_token}"
{
"data": {
"type": "portfolio",
"id": "6699ee6d6bce2a04b34a8868",
"attributes": { "name": "Portfolio 1" },
"relationships": {
"reportingEntity": {
"data": { "id": "666be3f97fc417debcea6a5e", "type": "reporting-entity" }
},
"accounts": {
"data": [
{ "id": "6699ec9eed2e23e9f214ba6f", "type": "account" },
{ "id": "6698de390fb223343ef3b648", "type": "account" },
{ "id": "6698de390fb223343ef3b649", "type": "account" }
]
},
"depositories": {
"data": [{ "id": "6698debff36caf2dcef8d217", "type": "depository" }]
}
}
}
}
Create a portfolio
Create a portfolio associated with the reporting entity given by id. Returns 201 with the created portfolio. The accounts and depositories follow the membership rule.
Path parameters
idstringReporting entity identifier, see
GET /clients/{id}/reporting-entities. Required.
curl -X POST https://api.aleta.ai/api/v2/reporting-entities/666be3f97fc417debcea6a5e/portfolios \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/vnd.api+json" \
-d '{
"data": {
"type": "portfolio",
"attributes": { "name": "Portfolio 1" },
"relationships": {
"accounts": {
"data": [
{ "type": "account", "id": "6699ec9eed2e23e9f214ba6f" },
{ "type": "account", "id": "6698de390fb223343ef3b648" },
{ "type": "account", "id": "6698de390fb223343ef3b649" }
]
},
"depositories": {
"data": [{ "type": "depository", "id": "6698debff36caf2dcef8d217" }]
}
}
}
}'
{
"data": {
"attributes": { "name": "Portfolio 1" },
"relationships": {
"reportingEntity": {
"data": { "id": "666be3f97fc417debcea6a5e", "type": "reporting-entity" }
},
"accounts": {
"data": [
{ "id": "6699ec9eed2e23e9f214ba6f", "type": "account" },
{ "id": "6698de390fb223343ef3b648", "type": "account" },
{ "id": "6698de390fb223343ef3b649", "type": "account" }
]
},
"depositories": {
"data": [{ "id": "6698debff36caf2dcef8d217", "type": "depository" }]
}
},
"id": "6699ed355c077cba345a8a2c",
"type": "portfolio"
}
}
Update a portfolio
Update the portfolio given by id. Returns 204 with no body.
Path parameters
idstringPortfolio identifier, see
GET /reporting-entities/{id}/portfolios. Required.
curl -X PATCH https://api.aleta.ai/api/v2/portfolios/6699ee6d6bce2a04b34a8868 \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/vnd.api+json" \
-d '{
"data": {
"id": "6699ee6d6bce2a04b34a8868",
"type": "portfolio",
"attributes": { "name": "Portfolio 1" },
"relationships": {
"accounts": {
"data": [
{ "type": "account", "id": "6699ec9eed2e23e9f214ba6f" },
{ "type": "account", "id": "6698de390fb223343ef3b648" },
{ "type": "account", "id": "6698de390fb223343ef3b649" }
]
},
"depositories": {
"data": [{ "type": "depository", "id": "6698debff36caf2dcef8d217" }]
},
"reportingEntity": {
"data": { "type": "reporting-entity", "id": "666be3f97fc417debcea6a5e" }
}
}
}
}'
Delete a portfolio
Delete the portfolio given by id. Returns 204 with no body.
Path parameters
idstringPortfolio identifier, see
GET /reporting-entities/{id}/portfolios. Required.
curl -X DELETE https://api.aleta.ai/api/v2/portfolios/54e45acada7e9feebae2c5fd \
-H "Authorization: Bearer {access_token}"