Skip to main content
Version: 2025-11-12.1

Legal Structure

Data Model

  • name (string): Display name of the legal entity.

Relationships

  • accounts: Accounts owned by the legal entity.
  • client: Client that owns the legal entity.
  • depositories: Depositories owned by the legal entity.
info

The accounts and depositories relationships cannot be changed with PATCH endpoints. Accounts and depositories are fixed to their legal entities.

It is not possible to change the client relationship with PATCH endpoints, i.e. it is not possible to move a legal entity to a different client.

Account

  • name (string, optional): Optional naming of the account.
  • externalIdentifier (string, required): Identifier given to the account by the bank or custodian.
  • ccyCode (string, required): ISO 4217 representation of the account's currency.
  • excludeFromReporting (boolean, optional): Flag to exclude the account from reporting. Default is false, meaning the account is included in reporting.

Relationships

  • depository: The depository associated with the account.
  • depositories: Depositories linked to the account.
  • legalEntity: The legal entity that owns the account.
Deprecation Notice

The to-one relationship depository is being deprecated in favor of the to-many relationship depositories. The new relationship adds expressiveness to the data model, as accounts and depositories will be related many-to-many. In the deprecation period, the depositories relationship will contain the single resource otherwise found in the depository relationship.

info

The depository and depositories relationships establish a closed setup, where the account can be used to perform transactions that impact the associated depositories. This setup may include multiple accounts linked to a single depository.

The excludeFromReporting flag cannot be changed with the PATCH endpoint, i.e. it is not possible to change this after the account has been created.

If excludeFromReporting is set to true the following transactions are not possible to create for that account: Account Interest, Cash Transfer, Fee, FX Spot, and Refund.

Depository

  • name (string, optional): Optional naming of the depository.
  • externalIdentifier (string, required): Identifer given to the depository by the bank or custodian.

Relationships

  • legalEntity: The legal entity that owns the depository.
  • accounts: Accounts linked to the depository.

Endpoints

GET /clients/:id/legal-entities

Find all legal entities owned by the client given by id.

Parameters

Examples

200 OK
# Request
GET /api/v2/clients/6698d912deb64c8b2fec2c08/legal-entities HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Host: platform.aleta.io


# Response
HTTP/1.1 200 OK
Content-Type: application/vnd.json+api

{
"data": [
{
"id": "3c9a3ffa9448a84c1aadc225",
"type": "legal-entity",
"attributes": {
"name": "Company 1"
},
"relationships": {
"client": {
"data": {
"type": "client",
"id": "6698d912deb64c8b2fec2c08"
}
}
}
},
{
"id": "67ebe5e3f9302d07aafbbed5",
"type": "legal-entity",
"attributes": {
"name": "Company 2"
},
"relationships": {
"client": {
"data": {
"type": "client",
"id": "6698d912deb64c8b2fec2c08"
}
}
}
}
]
}

POST /clients/:id/legal-entities

Create a legal entity owned by the client given by id.

Parameters

Examples

201 Created
# Request
POST /api/v2/clients/6698d912deb64c8b2fec2c08/legal-entities HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Content-Type: application/vnd.json+api
Host: platform.aleta.io

{
"data": {
"type": "legal-entity",
"attributes": {
"name": "New legal entity"
}
}
}


# Response
HTTP/1.1 201 Created
Content-Type: application/vnd.json+api

{
"data": {
"id": "66991be2f9bcbf6057b61a53",
"type": "legal-entity",
"attributes": {
"name": "New legal entity"
},
"relationships": {
"client": {
"data": {
"type": "client",
"id": "6698d912deb64c8b2fec2c08"
}
}
}
}
}

Find the legal entity given by id.

Parameters

Examples

200 OK
# Request
GET /api/v2/legal-entities/6698d912deb64c8b2fec2c08 HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Host: platform.aleta.io


# Response
HTTP/1.1 200 OK
Content-Type: application/vnd.json+api

{
"data": {
"id": "6698d912deb64c8b2fec2c08",
"type": "legal-entity",
"attributes": {
"name": "Company 1"
},
"relationships": {
"accounts": {
"data": [
{
"type": "account",
"id": "6698de390fb223343ef3b648"
},
{
"type": "account",
"id": "6698de390fb223343ef3b649"
},
{
"type": "account",
"id": "6698de437583af24db430e51"
},
{
"type": "account",
"id": "6699ec9eed2e23e9f214ba6f"
}
]
},
"client": {
"data": {
"type": "client",
"id": "9d328abedbe8c8afabeffc69"
}
}
"depositories": {
"data": [
{
"type": "depository",
"id": "6698debff36caf2dcef8d217"
},
{
"type": "depository",
"id": "6698dec1f0dc7dd7e2fdedc1"
}
]
}
}
}
}

Delete the legal entity given by id.

Parameters

Examples

204 No Content
# Request
DELETE /api/v2/legal-entities/d09dff6403a7a771cace9a9f HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Host: platform.aleta.io


# Response
HTTP/1.1 204 No Content
Content-Type: application/vnd.api+json

Update the legal entity given by id.

Parameters

Examples

204 No Content
# Request
PATCH /api/v2/legal-entities/6698d912deb64c8b2fec2c08 HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Host: platform.aleta.io

{
"data": {
"id": "6698d912deb64c8b2fec2c08",
"type": "legal-entity",
"attributes": {
"name": "Company 1"
}
}
}


# Response
HTTP/1.1 204 No Content
Content-Type: application/vnd.json+api

Get accounts owned by the legal entity given by id.

Parameters

Examples

200 OK
# Request
GET /api/v2/legal-entities/6698d912deb64c8b2fec2c08/accounts HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Host: platform.aleta.io


# Response
HTTP/1.1 200 OK
Content-Type: application/vnd.json+api

{
"data": [
{
"id": "6698de390fb223343ef3b648",
"type": "account",
"attributes": {
"name": "Trading account (DKK)",
"externalIdentifier": "49469412",
"ccyCode": "DKK",
"excludeFromReporting": false
},
"relationships": {
"depository": {
"data": {
"type": "depository",
"id": "6698debff36caf2dcef8d217"
}
},
"depositories": {
"data": [
{
"type": "depository",
"id": "6698debff36caf2dcef8d217"
}
]
},
"legalEntity": {
"data": {
"type": "legal-entity",
"id": "6698d912deb64c8b2fec2c08"
}
}
}
},
{
"id": "6698de390fb223343ef3b649",
"type": "account",
"attributes": {
"name": "Trading account (USD)",
"externalIdentifier": "49464598",
"ccyCode": "USD",
"excludeFromReporting": false
},
"relationships": {
"depository": {
"data": {
"type": "depository",
"id": "6698debff36caf2dcef8d217"
}
},
"depositories": {
"data": [
{
"type": "depository",
"id": "6698debff36caf2dcef8d217"
}
]
},
"legalEntity": {
"data": {
"type": "legal-entity",
"id": "6698d912deb64c8b2fec2c08"
}
}
}
},
{
"id": "6698de437583af24db430e51",
"type": "account",
"attributes": {
"name": "Mutual Funds account (EUR)",
"externalIdentifier": "52056091",
"ccyCode": "EUR",
"excludeFromReporting": false
},
"relationships": {
"depository": {
"data": {
"type": "depository",
"id": "6698debff36caf2dcef8d217"
}
},
"depositories": {
"data": [
{
"type": "depository",
"id": "6698debff36caf2dcef8d217"
}
]
},
"legalEntity": {
"data": {
"type": "legal-entity",
"id": "6698d912deb64c8b2fec2c08"
}
}
}
},
{
"id": "6699ec9eed2e23e9f214ba6f",
"type": "account",
"attributes": {
"name": "Money Market account (DKK)",
"externalIdentifier": "23074547",
"ccyCode": "DKK",
"excludeFromReporting": false
},
"relationships": {
"legalEntity": {
"data": {
"type": "legal-entity",
"id": "6698d912deb64c8b2fec2c08"
}
}
}
}
]
}

POST /legal-entities/:id/accounts

Create a new account owned by the legal entity given by id.

Parameters

Examples

Create Account
201 Created
# Request
POST /api/v2/legal-entities/66991be2f9bcbf6057b61a53/accounts HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Content-Type: application/vnd.json+api
Host: platform.aleta.io

{
"data": {
"type": "account",
"attributes": {
"name": "USD Account",
"externalIdentifier": "23073214",
"ccyCode": "USD"
}
}
}


# Response
HTTP/1.1 201 Created
Content-Type: application/vnd.json+api

{
"data": {
"id": "6699ec9eed2e23e9f231ad8t",
"type": "account",
"attributes": {
"name": "USD Account",
"externalIdentifier": "23073214",
"ccyCode": "USD",
"excludeFromReporting": false
},
"relationships": {
"legalEntity": {
"data": {
"type": "legal-entity",
"id": "66991be2f9bcbf6057b61a53"
}
}
}
}
}
Create Account Linked To A Depository
201 Created
# Request
POST /api/v2/legal-entities/66991be2f9bcbf6057b61a53/accounts HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Content-Type: application/vnd.json+api
Host: platform.aleta.io

{
"data": {
"type": "account",
"attributes": {
"name": "Trading Account (DKK)",
"externalIdentifier": "23074547",
"ccyCode": "DKK"
},
"relationships": {
"depository": {
"data": {
"type": "depository",
"id": "6698debff36caf2dcef8d217"
}
}
}
}
}


# Response
HTTP/1.1 201 Created
Content-Type: application/vnd.json+api

{
"data": {
"id": "6699ec9eed2e23e9f214ba6f",
"type": "account",
"attributes": {
"name": "Trading Account (DKK)",
"externalIdentifier": "23074547",
"ccyCode": "DKK",
"excludeFromReporting": false
},
"relationships": {
"depository": {
"data": {
"type": "depository",
"id": "6698debff36caf2dcef8d217"
}
},
"depositories": {
"data": [
{
"type": "depository",
"id": "6698debff36caf2dcef8d217"
}
]
},
"legalEntity": {
"data": {
"type": "legal-entity",
"id": "66991be2f9bcbf6057b61a53"
}
}
}
}
}

Get depositories owned by the legal entity given by id.

Parameters

Examples

200 OK
# Request
GET /api/v2/legal-entities/6698d912deb64c8b2fec2c08/depositories HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Host: platform.aleta.io


# Response
HTTP/1.1 200 OK
Content-Type: application/vnd.json+api

{
"data": [
{
"id": "6698debff36caf2dcef8d217",
"type": "depository",
"attributes": {
"name": "Open depository",
"externalIdentifier": "85939780"
},
"relationships": {
"legalEntity": {
"data": {
"type": "legal-entity",
"id": "6698d912deb64c8b2fec2c08"
}
},
"accounts": {
"data": [
{
"type": "account",
"id": "66f400e7d6b1fe5d6cddc4a4"
}
]
}
}
},
{
"id": "6698dec1f0dc7dd7e2fdedc1",
"type": "depository",
"attributes": {
"name": "Mutual funds depository",
"externalIdentifier": "00873894"
},
"relationships": {
"legalEntity": {
"data": {
"type": "legal-entity",
"id": "6698d912deb64c8b2fec2c08"
}
},
"accounts": {
"data": [
{
"type": "account",
"id": "66f4010eba1092a499deb84c"
}
]
}
}
}
]
}

POST /legal-entities/:id/depositories

Create a new depository owned by the legal entity given by id.

info

When creating a depository, it must be linked to exactly one account. Additional accounts can be linked to the depository upon creation (see POST /legal-entities/:id/accounts).

Parameters

Examples

201 Created
# Request
POST /api/v2/legal-entities/66991be2f9bcbf6057b61a53/depositories HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Content-Type: application/vnd.json+api
Host: platform.aleta.io

{
"data": {
"type": "depository",
"attributes": {
"name": "Open depository",
"externalIdentifier": "85939780"
},
"relationships": {
"accounts": {
"data": [
{
"type": "account",
"id": "66f4010eba1092a499deb84c"
}
]
}
}
}
}


# Response
HTTP/1.1 201 Created
Content-Type: application/vnd.json+api

{
"data": {
"id": "6699ed355c077cba345a8a2c",
"type": "depository",
"attributes": {
"name": "Open depository",
"externalIdentifier": "85939780"
},
"relationships": {
"legalEntity": {
"data": {
"type": "legal-entity",
"id": "66991be2f9bcbf6057b61a53"
}
},
"accounts": {
"data": [
{
"type": "account",
"id": "66f4010eba1092a499deb84c"
}
]
}
}
}
}

GET /accounts/:id

Get account given by id.

Parameters

Examples

200 OK
# Request
GET /api/v2/accounts/6698de390fb223343ef3b648 HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Host: platform.aleta.io


# Response
HTTP/1.1 200 OK
Content-Type: application/vnd.json+api

{
"data": {
"id": "6698de390fb223343ef3b648",
"type": "account",
"attributes": {
"name": "Trading account (DKK)",
"externalIdentifier": "49469412",
"ccyCode": "DKK",
"excludeFromReporting": false
},
"relationships": {
"depository": {
"data": {
"type": "depository",
"id": "6698debff36caf2dcef8d217"
}
},
"depositories": {
"data": [
{
"type": "depository",
"id": "6698debff36caf2dcef8d217"
}
]
},
"legalEntity": {
"data": {
"type": "legal-entity",
"id": "6698d912deb64c8b2fec2c08"
}
}
}
}
}

DELETE /accounts/:id

Delete the account given by id.

Parameters

Examples

204 No Content
# Request
DELETE /api/v2/accounts/8ecedfc7edbc0e6f1caa8d0d HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Host: platform.aleta.io


# Response
HTTP/1.1 204 No Content
Content-Type: application/vnd.api+json

PATCH /accounts/:id

Update the account given by id.

Parameters

Examples

204 No Content
# Request
PATCH /api/v2/accounts/6698de390fb223343ef3b648 HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Host: platform.aleta.io

{
"data": {
"id": "6698de390fb223343ef3b648",
"type": "account",
"attributes": {
"name": "Trading account (DKK)",
"externalIdentifier": "49469412",
"ccyCode": "DKK"
}
}
}


# Response
HTTP/1.1 204 No Content
Content-Type: application/vnd.api+json

GET /depositories/:id

Get depository given by id.

Parameters

Examples

200 OK
# Request
GET /api/v2/depositories/6698debff36caf2dcef8d217 HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Host: platform.aleta.io


# Response
HTTP/1.1 200 OK
Content-Type: application/vnd.json+api

{
"data": {
"id": "6698debff36caf2dcef8d217",
"type": "depository",
"attributes": {
"name": "Open depository",
"externalIdentifier": "85939780"
},
"relationships": {
"legalEntity": {
"data": {
"type": "legal-entity",
"id": "ffb5888c92a060b1f4dc5763"
}
},
"accounts": {
"data": [
{
"type": "account",
"id": "66f4018d188042cfeb09706b"
}
]
}
}
}
}

DELETE /depositories/:id

Delete the depository given by id.

Parameters

Examples

204 No Content
# Request
DELETE /api/v2/depositories/affb314b2daebab0aef5b05f HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Host: platform.aleta.io


# Response
HTTP/1.1 204 No Content
Content-Type: application/vnd.api+json

PATCH /depositories/:id

Update the depository given by id.

Parameters

Examples

204 No Content
# Request
PATCH /api/v2/depositories/6698debff36caf2dcef8d217 HTTP/1.1
Accept: application/vnd.json+api
Authorization: Bearer <access token>
Host: platform.aleta.io

{
"data": {
"id": "6698debff36caf2dcef8d217",
"type": "depository",
"attributes": {
"name": "Open depository",
"externalIdentifier": "85939780"
}
}
}


# Response
HTTP/1.1 204 No Content
Content-Type: application/vnd.api+json