Skip to main content
Version: 2025-11-12.1

Clients

Data Model

Client

  • name (string, required): Display name of the client.

Relationships

  • children: Clients owned by the client itself.
  • legalEntities: Legal entities owned by the client.
  • parent: The parent client that owns the client displayed.
  • reportingEntities: Reporting entities owned by the client.

Endpoints

GET /clients

Fetch all clients.

Examples

200 OK
# Request
GET /api/v2/clients 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": "66fd6003218be3af85e088f7",
"type": "client",
"attributes": {
"name": "Top-level client"
},
"relationships": {
"children": {
"data": [
{
"type": "client",
"id": "666be3f97fc417debcea6a5e"
},
{
"type": "client",
"id": "666be3f97fc417debcea6a5e"
}
]
},
"legalEntities": {
"data": []
},
"parent": {
"data": null
},
"reportingEntities": {
"data": []
}
}
},
{
"id": "666be3f97fc417debcea6a5e",
"type": "client",
"attributes": {
"name": "Child client 1"
},
"relationships": {
"children": {
"data": []
},
"legalEntities": {
"data": [
{
"type": "legal-entity",
"id": "13a05f02a8adba3eac99cc34"
}
]
},
"parent": {
"data": {
"type": "client",
"id": "66fd6003218be3af85e088f7"
}
},
"reportingEntities": {
"data": [
{
"type": "reporting-entity",
"id": "cbdebdf8d547d3fbb8aac6fb"
}
]
}
}
},
{
"id": "666be3f97fc417debcea6a5e",
"type": "client",
"attributes": {
"name": "Client name 1"
},
"relationships": {
"children": {
"data": []
},
"legalEntities": {
"data": [
{
"type": "legal-entity",
"id": "13a05f02a8adba3eac99cc34"
}
]
},
"parent": {
"data": {
"type": "client",
"id": "66fd6003218be3af85e088f7"
}
},
"reportingEntities": {
"data": [
{
"type": "reporting-entity",
"id": "cbdebdf8d547d3fbb8aac6fb"
}
]
}
}
},
{
"id": "eead576c7faa2fef6ed8031b",
"type": "client",
"attributes": {
"name": "Client name 2"
},
"relationships": {
"children": {
"data": []
},
"legalEntities": {
"data": [
{
"type": "legal-entity",
"id": "f050f9bea3ffcffbc9ee3fbb"
}
]
},
"parent": {
"data": {
"type": "client",
"id": "786be3f97fc417debcea3214"
}
},
"reportingEntities": {
"data": [
{
"type": "reporting-entity",
"id": "faa96fb2fdb65396cfc69f93"
}
]
}
}
}
]
}

POST /clients

Create a new client.

Examples

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

{
"data": {
"type": "client",
"attributes": {
"name": "New client name"
},
"relationships": {
"parent": {
"data": {
"type": "client",
"id": "666be3f97fc417debcea6a5e"
}
}
}
}
}


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

{
"data": {
"id": "669919f890e4517165d07eb8",
"type": "client",
"attributes": {
"name": "New client name"
},
"relationships": {
"children": {
"data": []
},
"parent": {
"data": {
"type": "client",
"id": "666be3f97fc417debcea6a5e"
}
},
"legalEntities": {
"data": []
},
"reportingEntities": {
"data": []
}
}
}
}

GET /clients/:id

Find a client with a specific id.

Parameters

  • id (path, required): ID of the client to look up.

Examples

200 OK
# Request
GET /api/v2/clients/66fd6003218be3af85e088f7 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": "66fd6003218be3af85e088f7",
"type": "client",
"attributes": {
"name": "Top-level client"
},
"relationships": {
"children": {
"data": [
{
"type": "client",
"id": "666be3f97fc417debcea6a5e"
},
{
"type": "client",
"id": "666be3f97fc417debcea6a5f"
}
]
},
"legalEntities": {
"data": []
},
"parent": {
"data": null
},
"reportingEntities": {
"data": []
}
}
}
}

DELETE /clients/:id

Delete the client given by id.

Parameters

Examples

204 No Content
# Request
DELETE /api/v2/clients/4dbeb1d24abafb4fa8fca7e8 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 /clients/:id

Update the client given by id.

Parameters

Examples

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

{
"data": {
"id": "12ce0ffdacda14f9fcd0afd8",
"type": "client",
"attributes": {
"name": "Updated client name"
}
}
}


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