General - Get an employee

API Url

Used to get a single employee.

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

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.

Path parameters

FieldTypeDescription
empIdString

Employee Id.

Query parameters

FieldTypeDescription
absenceTypeoptionalString

Absence type (1: All-day, 2: Anytime, 3: Before Clock-in, 4: After Clock-out, 5: All-shift). Only if expand='absences'.

expandString

Expand employee info.

Allowed values:"status""jobStatus""absences"
fieldsString

Comma delimited list of fields to get.

fromoptionalDate

Start date for absences, Default: TODAY.

statusTypeNumber[1-6]

Attendance Type 1: All employees 2: Employees that has clocked in 3: Employees that hasn't clocked in but should have 4: Employees that hasn't clocked in 5: Employees that are absent 6: Registration missing.

tooptionalDate

End date for absences, Default : TODAY.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    employeesObject[]

Collection with employee data.

      absencesoptionalObject[]

Collection of absence intervals.

        attendanceDateDate

Attendance date of absence.

        backColoroptionalString

The reason background color.

        codeString

The reason code (identifier).

        descriptionString

The reason description.

        empIdString

The employee ID.

        endTimeoptionalNumber

End time of interval for category setup.

        foreColoroptionalString

The reason foreground color.

        hoursoptionalNumber

The absence time expressed in seconds. It's not needed if reason code is set-up as being percent of normal time or star-end setup.

        idString

Unique identifier for the absence object.

        startTimeoptionalNumber

Start time of interval for category setup.

        typeNumber

Absence type (1: All-day, 2: Anytime, 3: Before Clock-in, 4: After Clock-out, 5: All-shift).

Size range: 1-5
      address1optionalString

Address1

      address2optionalString

Address2

      address3optionalString

Address3

      approvalDescoptionalString

Approval group description.

      approvalIdoptionalString

Approval group identifier.

      attendanceProfileDescoptionalString

Attendance profile description.

      attendanceProfileIdoptionalString

Attendance profile identifier.

      avatarURIString

Employee avatar.

      cardNooptionalString

Card number.

      categoryDescoptionalString

Category description.

      categoryIdoptionalString

Category identifier.

      cityoptionalString

City

      countryCodeoptionalString

Country Code

      dateOfBirthDate

Employee birthday.

      dateOfEmpDate

Date of employment.

      deptDescoptionalString

Employee actual department description.

      deptIdoptionalString

Employee actual department Id.

      divisionDescoptionalString

Division description.

      divisionIdoptionalString

Division identifier.

      emailoptionalString

Email address.

      email2optionalString

Email address 2

      empIdString

Employee Id.

      empNoString

Employee number.

      firstNameString

Employee first name.

      firstRegoptionaldate

First registration date

      genderoptionalString

Gender

      groupDescoptionalString

Employee actual group description.

      groupIdoptionalString

Employee actual group id.

      homeDeptDescoptionalString

Employee home department description.

      homeDeptIdoptionalString

Employee home department Id.

      homeGroupDescoptionalString

Employee home group description.

      homeGroupIdoptionalString

Employee home group id.

      homePhoneoptionalString

Home Phone.

      info1optionalString

Employee note1

      info2optionalString

Employee note2

      info3optionalString

Employee note3

      info4optionalString

Employee note4

      info5optionalString

Employee note5

      initialsString

Employee initials.

      jobStatusoptionalObject[]

Job related status.

        operationDescString

Operation description.

        operationIdString

Operation Id.

        orderDescString

Order description.

        orderIdString

Order Id.

      linksoptionalObject[]

List of related resources

        referenceString

Reference to the related resource

        relationString

Relation to the current employee

      localPhoneoptionalString

local Phone.

      managerIdoptionalString

Manager id

      managerNameoptionalString

Manager name

      mobilePhoneString

Employee phone number.

      payrollDescoptionalString

Payroll profile description.

      payrollIdoptionalString

Payroll profile identifier.

      periodProfileDescoptionalString

Period profile description.

      periodProfileIdoptionalString

Period profile identifier.

      postalCodeoptionalString

Postal code

      provinceoptionalString

Province

      sortNoString

Sort number.

      statusNumber[0-11]

Employee status (0: Clock-in, 1: Clock-in late, 2: Clock-in early, 3:Clock-out early, 4: Missing clock-in, 5: Absent, 6: Non-scheduled day, 7: Clock-out early with absence, 8: Clock-in late with absence, 9: Not present, 10: Implicit clock-in, 11: Implicit clock-out).

      statusInfoString

Employee status info.

      statusTextString

Employee status description.

      surnameString

Employee last name.

      terminalAreaDescoptionalString

Terminal Area description.

      terminalAreaIdoptionalString

Terminal Area Id.

      workPhoneoptionalString

work Phone.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example without expand:

HTTP/1.1 200 OK
{
"response": {
"data": {
"employees": [
{
"empNo": "1",
"sortNo": "!!!!!!!!!1",
"firstName": "John test",
"surname": "Doex Test",
"initials": "DT",
"deptId": "01",
"deptDesc": "KEM ~\"Default~\"",
"groupId": "BH3",
"groupDesc": "3, Haslund Group 3",
"mobile": "99999",
"dateOfBirth": "1955-02-28",
"dateOfEmployment": "2006-10-01",
"email": "test@mark-info.com",
"avatarURI": "/rest/Resources/employees/414/avatar?eTag=721567206000"
}
]
},
"erorCode": 0,
"errorMessage": ""
}
}

Success example with expand=status,jobStatus:

HTTP/1.1 200 OK
{
"response": {
"data": {
"employees": [
{
"empNo": "1",
"sortNo": "!!!!!!!!!1",
"firstName": "John test",
"surname": "Doex Test",
"initials": "DT",
"deptId": "01",
"deptDesc": "KEM ~\"Default~\"",
"groupId": "BH3",
"groupDesc": "3, Haslund Group 3",
"mobile": "99999",
"dateOfBirth": "1955-02-28",
"dateOfEmployment": "2006-10-01",
"email": "test@mark-info.com",
"avatarURI": "/rest/Resources/employees/414/avatar?eTag=721567206000",
"status": 0,
"statusInfo": "27/02/2012 12:28",
"statusText": "Present",
"jobStatus": [
{
"orderId": "010101",
"orderDesc": "Main order 1",
"operationId": "OOO1",
"operationDesc": "Painting"
}
],
"absences": [
{
"id": "2153931200~\u00011~\u00010",
"attendanceDate": "2018-03-07",
"type": 1,
"code": "02",
"description": "Reason-02",
"backColor": "808000",
"foreColor": "FFFF00",
"hours": 28800,
"startTime": 28800,
"endTime": 57600
},
{
"id": "2153938630~\u00013~\u00010",
"attendanceDate": "2018-03-09",
"type": 3,
"code": "HVBS",
"description": "Sickness",
"backColor": "FF0000",
"foreColor": "FFFF00",
"hours": 7200
}
]
}
]
},
"erorCode": 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.

Error example:

HTTP/1.1 404 Not found
{
"response": {
"errorCode": 5,
"errorMessage": "No employees"
}
}