System - Get company hierarchy

API Url

Use it to load company hierarchy.

GET
http://localhost:16010/ProMarkREST/web/System/hierarchy

Permissions: user

Request headers

FieldTypeDescription
Accept-LanguageoptionalString

=en-GB Language use for localization.

X-ClientoptionalString

=Client type.

Allowed values:"Portal""Mobile""Admin"
X-RoleoptionalNumber

ProMark role (1: Employee, 2: User).

Allowed values:{12}
X-WebPart-IdoptionalNumber

Unique web-part identifier.

Success 200

FieldTypeDescription
    hierarchyObject[]
      entityIdString

Entity id.

      entityTyeNumber

Hierarchy element type: 1 : Department 2 : Group 3 : Approval Group

      idNumber

Hierarchy element id.

      parentIdNumber

Parent id.

Success example:

{
"response": {
"data": {
"hierarchy": [
{
"id": 2164678308,
"entityType": 1,
"entityId": "D1"
},
{
"id": 2164684111,
"entityType": 3,
"entityId": "A2",
"parentId": 2164678309
},
{
"id": 2164684115,
"entityType": 3,
"entityId": "A5",
"parentId": 2164684112
}
]
}
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.