System - Add element to hierarchy

API Url

Use it to insert a element into the company hierarchy.

POST
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.

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    hierarchyObject[]
      entityIdString

Entity id.

      entityTyeNumber

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

      parentIdNumber

Parent id.

Request example:

{
"request": {
"data": {
"hierarchy": [
{
"entityId": "A7",
"entityType": 2 ,
"parentId": 2164684119
}
]
}
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.