General - Get contact list

API Url

Used for loading contacts when inserting an absence. The values depend on the portal setup and it can be employees from same department, group, approval group, division or all.

GET
http://localhost:16010/ProMarkREST/rest/General/employees/{id}/contacts

Permissions: user

Path parameters

FieldTypeDescription
idString

Unique employee identifier.

Query parameters

FieldTypeDescription
includeAvatarBoolean

True = The employee avatar URI will be included.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    contactsObject[]

Collection of contact persons.

      avatarURIoptionalString

URI to lookup the employee avatar.

      idString

Employee iD.

      initialsString

Employee initials.

      nameString

Employee full name.

      noString

Employee number.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"contacts": [
{
"id": "100",
"no": "210",
"name": "Andreea Toma",
"initials": "AMT"
},
{
"id": "110",
"no": "220",
"name": "Sebastian Podaru",
"initials": "SEP"
}
]
},
"errorCode": 0,
"errorMessage": ""
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.