System - Get company hierarchy
API Url
Use it to load company hierarchy.
GET
http://localhost:16010/ProMarkREST/web/System/hierarchy
Permissions: user
Request headers
| Field | Type | Description |
|---|---|---|
Accept-Languageoptional | String | =en-GB Language use for localization. |
X-Clientoptional | String | =Client type. "Portal""Mobile""Admin" |
X-Roleoptional | Number | ProMark role (1: Employee, 2: User). {12} |
X-WebPart-Idoptional | Number | Unique web-part identifier. |
Success 200
| Field | Type | Description |
|---|---|---|
| hierarchy | Object[] | |
| entityId | String | Entity id. |
| entityTye | Number | Hierarchy element type: |
| id | Number | Hierarchy element id. |
| parentId | Number | 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
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |