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:

ParameterTypeRequiredDescription
instanceIntegrationIdPublic IDYesThe unique identifier of the instance integration
clientIdPublic IDYesThe unique identifier of the client

Headers:

x-api-key: your-64-character-api-key-here

Example 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:

FieldTypeDescription
unitTypesObject[] (len >= 0)Unique identifier for dynamic organization structure unit types used by the client
unitTypes.idPublic IDThe public ID of the dynamic organization structure unit type
unitTypes.nameStringThe name of the organization structure unit type
unitsObject[] (len >=0)The organization units for the client
units.idPublic IDUnique identifier for the organization unit
units.nameStringName of the organization unit
units.descriptionString | nullDescription of the organization unit
units.unitTypeIdPublic IDThe organization unit type public ID (found in unitTypes)
units.parentUnitIdPublic ID | nullThe parent of the organization unit (self-referencing foreign key)

Errors:

Status CodeErrorSolution
400Bad RequestEnsure the instance integration ID and client ID are valid public ID
401UnauthorizedVerify your API key is correct
404Not FoundThe instance integration or client don't exist
500Internal Server ErrorContact Listo support