Get Client Organization Structure
Retrive the organization structure of a Listo instance client.
Endpoint
GET /v1/instance-integrations/:instanceIntegrationId/clients/:clientId/organization-structure
Description
The organization structure of a client is fully dynamic, where a client can define layers through OrganizationUnitType (Department, Division, etc.) and create units with these types.
Request
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
instanceIntegrationId | Public ID | Yes | The unique identifier of the instance integration |
clientId | Public ID | Yes | The unique identifier of the client |
Headers:
x-api-key: your-64-character-api-key-hereExample Request:
curl -X GET https://gateway.listoglobal.com/v1/instance-integrations/lggtwini_uZzrSgaCCW6mCUrtq/clients/lglsocli_uZzu8GpG1f0qGKAyY/organization-sturcture \
-H "x-api-key: your-api-key"Response
Success (200 OK):
{
"unitsTypes": [
{
"id": "lglsoout_uZCrQihxhq4csBovq",
"name": "Department"
},
{
"id": "lglsoout_uZCWLM7OtqpPPQY2l",
"name": "Division"
}
],
"units": [
{
"id": "lglsooui_uZCWYoC4U9Y7Ves8e",
"name": "Executives Board",
"description": "Top executive department",
"unitTypeId": "lglsoout_uZCrQihxhq4csBovq",
"parentUnitId": null,
},
{
"id": "lglsooui_uZCY4zfhY1sGAqNZt",
"name": "HR Division",
"description": "Managing human resources",
"unitTypeId": "lglsoout_uZCWLM7OtqpPPQY2l",
"parentUnitId": "lglsooui_uZCWYoC4U9Y7Ves8e"
}
]
}Response Fields:
| Field | Type | Description |
|---|---|---|
unitTypes | Object[] (len >= 0) | Unique identifier for dynamic organization structure unit types used by the client |
unitTypes.id | Public ID | The public ID of the dynamic organization structure unit type |
unitTypes.name | String | The name of the organization structure unit type |
units | Object[] (len >=0) | The organization units for the client |
units.id | Public ID | Unique identifier for the organization unit |
units.name | String | Name of the organization unit |
units.description | String | null | Description of the organization unit |
units.unitTypeId | Public ID | The organization unit type public ID (found in unitTypes) |
units.parentUnitId | Public ID | null | The parent of the organization unit (self-referencing foreign key) |
Errors:
| Status Code | Error | Solution |
|---|---|---|
400 | Bad Request | Ensure the instance integration ID and client ID are valid public ID |
401 | Unauthorized | Verify your API key is correct |
404 | Not Found | The instance integration or client don't exist |
500 | Internal Server Error | Contact Listo support |
Updated about 1 month ago
