ProRoster - Get plan employees

API Url

This api is used to load employees of a plan and can be expanded to load the assigned demands and absences to those employees.

GET
http://localhost:16010/ProMarkREST/rest/ProRoster/plans/{id}/employees

Permissions: user

Path parameters

FieldTypeDescription
idString

The Plan unique identifier or the Plan ID.

Query parameters

FieldTypeDescription
empIdsoptionalNumber

List of employee ids separated by comma. Used to return the data only for certain employees. If list contains employees that are not in the plan, they are ignored. If list is empty, then all employees are returned

empNooptionalString

List of employee numbers separated by comma. Used to return the data only for certain employees. If list contains employees that are not in the plan, they are ignored. If list is empty, then all employees are returned This cannot be used together with empIds. It must be either one or the other. If both are sent, then only the empIds will be taken into consideration.

expandoptionalString

Comma separated list of items to exapnd (assignedDemands = load demands , absences = load absences, notes = load notes).

fieldsoptionalString

List of fields with comma delimiter to include in the response. Example to get only 2 attributes fields=dayProfile,normalTime.

filterIdoptionalNumber

Employee filter id.

fromoptionalString

The start date of the period inside a plan ( If not provided default is start of the current week).

tooptionalString

The end date of the period inside a plan ( If not provided default is end of the current week).

usePlanIdoptionalBoolean

If TRUE, then the path parameter id is the Plan Id, otherwise is plan's unique identifier. Default is FALSE.

Parameter

FieldTypeDescription
        ignoreDayProfileoptionalObject[]
          isLockedBoolean

Is the attribute locked.

          valueBoolean

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    employeesObject[]
      absencesoptionalObject[]

Collection of absence intervals.

        backColoroptionalString

The reason background color in HEX without #.

        codeString

The reason code.

        dateDate

Absence date.

        descriptionString

The reason description.

        empIdString

The employee ID.

        foreColoroptionalString

The reason foreground color in HEX without #.

        fromoptionalNumber

Absence start time in seconds from midnight.

        idString

Unique identifier for the absence.

        isCompanyAbsBoolean

TRUE = Absence from Company Calendar.

        isPublishedBoolean

TRUE if the absence has been published to absence calendar.

        tooptionalNumber

Absence end time in seconds from midnight.

      apprGroupDescoptionalString

Employee's approval group description.

      apprGroupIdoptionalString

Employee's approval group id.

      assignedDemandsoptionalObject[]

Collection of demands (only when expand=demands).

        acceptBeforeoptionalObject[]
          daysoptionalNumber

Accept days before shift takes place.

          isLockedBoolean

Is the attribute locked.

          isRequiredBoolean

Is the attribute required.

        approvalGroupoptionalObject[]
          descriptionoptionalString

Description of the approvalGroup.

          idoptionalString

Id of the approvalGroup.

          isLockedBoolean

Is the attribute locked.

          isRequiredBoolean

Is the attribute required.

        assignmentMethodoptionalObject[]
          isLockedBoolean

Is the attribute locked.

          isRequiredBoolean

Is the attribute required.

          methodoptionalString

Assignment methode Automatic = "A" or Manual "M".

        backColorString

BackGround color in HEX without #.

        baseDemandIdNumber

The Id of the base demand from which the demand was created.

        categoryoptionalObject[]
          descriptionoptionalString

Description of the category.

          idoptionalString

Id of the category.

          isLockedBoolean

Is the attribute locked.

          isRequiredBoolean

Is the attribute required.

        dateDate

The date of the demand .

        dayProfileoptionalObject[]

The day profile object.

          backColoroptionalString

BackGround color.

          descriptionString

Description of the day profile.

          endTimeoptionalNumber

Normal time end of day profile.

          foreColoroptionalString

ForeGround color.

          idoptionalString

Day profile ID.

          isLockedBoolean

Is the attribute locked.

          isRequiredBoolean

Is the attribute required.

          isVariableBoolean

True if day profile is variable.

          startTimeoptionalNumber

Normal time start of day profile.

        departmentoptionalObject[]
          descriptionoptionalString

Description of the department.

          idoptionalString

Id of the department.

          isLockedBoolean

Is the attribute locked.

          isRequiredBoolean

Is the attribute required.

        descriptionString

Description of the demand.

        empIdString

The Id of the employee assigned to a demand.

        foreColorString

ForeGround color in HEX without #.

        groupoptionalObject[]
          descriptionoptionalString

Description of the group.

          idoptionalString

Id of the group.

          isLockedBoolean

Is the attribute locked.

          isRequiredBoolean

Is the attribute required.

        idNumber

The Id of the demand.

        isPublishedBoolean

False = the assigned demand is not published. True = the assigned demand is published.

        isTaskBoolean

True if demand is task, false if not.

        maximumBidsoptionalObject[]
          amountoptionalNumber

Number of employees to bid in.

          isLockedBoolean

Is the attribute locked.

          isRequiredBoolean

Is the attribute required.

        nameString

The name of the demand .

        normalTimeoptionalObject[]

Normal time interval for variable day profiles.

          endTimeoptionalNumber

End time of the interval in seconds.

          isLockedBoolean

Is the attribute locked.

          isRequiredBoolean

Is the attribute required.

          startTimeoptionalNumber

Start time of the interval in seconds.

        planIdNumber

The Id of the plan.

        qualificationSetupoptionalObject[]
          isLockedBoolean

Is the attribute locked.

          isRequiredBoolean

Is the attribute required.

          qualificationoptionalObject[]
            descriptionoptionalString

Description of the qualification.

            empQualIdoptionalString

Id of the employee qualification.

            idoptionalNumber

Id of the demand qualification.

            orderoptionalNumber

Order of qualifications.

            primaryoptionalBoolean

true = This is a primary qualification.

        requiredEmployeesObject[]
          amountNumber

Number of employees

          isLockedBoolean

Is the attribute locked.

          isRequiredBoolean

Is the attribute required.

        versionNumber

Version number of the demand.

      cardNooptionalString

Employee's card number.

      categoryDescoptionalString

Employee's category description.

      categoryIdoptionalString

Employee's category id.

      deptDescoptionalString

Employee's department description.

      deptIdoptionalString

Employee's department.

      divisionDescoptionalString

Employee's division description.

      divisionIdoptionalString

Employee's division id.

      empIdoptionalString

The Id of the employee.

      empNameoptionalString

First name + Last name.

      empNooptionalString

The number of the employee.

      firstWorkingDayoptionalDate

Employee's first working day.

      genderoptionalString

Employee's gender.

      groupDescoptionalString

Employee's group description.

      groupIdoptionalString

Employee's group id.

      initialsoptionalString

Employee's initials.

      lastWorkingDayoptionalDate

Employee's last working day.

      locksoptionalObject[]
        avatarURIString

URI for loading employee avatar. If no picture exists, this will be skipped.

        dateDate

The date which is locked.

        nameString

The fullname of the user.

        sinceDate

The starting day of the locked date.

        userString

The user id who locked the date.

      managerIdoptionalString

Employee's manager id.

      managerNameoptionalString

Employee's manager description.

      shiftsoptionalObject[]

Collection of shifts (only when expand=shifts).

        attendanceTimeoptionalObject[]

Attendancetime interval of the shift.

          endTimeoptionalNumber

End time of the interval in seconds.

          startTimeoptionalNumber

Start time of the interval in seconds.

        clockInoptionalNumber

Clock in time

        clockInTypeoptionalString

Clock in type: CIL = Clock in late, CIE = Clock in early

        clockOutoptionalNumber

Clock out time

        clockOutTypeoptionalString

Clock out type: COL = Clock out late, COE = Clock out early

        dateDate

The date of the shift.

        dayProfileoptionalObject[]

The day profile object.

          backColoroptionalString

BackGround color.

          descriptionString

Description of the day profile.

          endTimeoptionalNumber

Normal time end of day profile.

          foreColoroptionalString

ForeGround color.

          idString

Day profile ID.

          isVariableBoolean

True if day profile is variable.

          startTimeoptionalNumber

Normal time start of day profile.

        departmentoptionalObject[]

The department object.

          descriptionoptionalString

Description of the department.

          idString

Id of the department.

        empIdString

The Id of the employee.

        groupoptionalObject[]

The group object.

          descriptionoptionalString

Description of the group.

          idString

Id of the group.

        hasClockInoptionalBoolean

True if shift has CI/CO registrations. False if not. Returned only if shift is in the past.

        idNumber

The Id of the shift.

        isNewBoolean

True if shift is just created False if not.

        isPublishedBoolean

True if shift is published False if not.

        normalTimeoptionalObject[]

Normal time interval for variable day profiles.

          endTimeoptionalNumber

End time of the interval in seconds.

          startTimeoptionalNumber

Start time of the interval in seconds.

        planIdNumber

The Id of the plan.

      weekNormoptionalNumber

Employee's week norm in hours, with two decimals.

      workPlaceoptionalString

Employee's working place code.

      workPlaceDescoptionalString

Employee's working place description.

  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": {
"employees": [
{
"cardNo: "CMD1",
"categoryId: "MFA",
"deptDesc: "Warehouse Transport & Spedition",
"deptId: "MFA_AND",
"empId: "833",
"empNo: "CMD1",
"firstWorkingDay: "2017-10-12"
"fullName: "Ciprian Dinu 1",
"gender: "Male",
"initials: "CMD1",
"managerDesc: "Mircea Alexandru",
"managerId: "MFA",
"workingPlace": "3",
"workingPlaceDesc": "Site 3",
"absences": [
{
"id": "2153930522\u00011\u00010",
"empId": "833",
"date": "2018-01-01",
"code": "A",
"description": "Bank Holidays",
"backColor": "B7FFB7",
"foreColor": "008000",
"isCompanyAbs": false,
"isPublished": true
},
{
"id": "2153930524\u00011\u00010",
"empId": "833",
"date": "2018-01-03",
"code": "S",
"description": "Sick",
"backColor": "FF0000",
"foreColor": "FFFFFF",
"from": "2018-09-10T08:30:00.000",
"to": "2018-09-10T11:00:00.000",
"isCompanyAbs": false,
"isPublished": true
}
],
"assignedDemands": [
{
"id": 2153908066,
"planId": 2153557517,
"name": "Weld",
"empId": "893",
"description": "Welder",
"foreColor": "000040",
"backColor": "000050",
"version": 1,
"dayProfile": [
{
"id": "DAY",
"startTime": 46800,
"endTime": 61200,
"description": "Day Shift 13:00 - 17:00",
"isVariable": false,
"foreColor": "000080",
"backColor": "00FF40",
"isRequired": false,
"isLocked": true
}
],
"requiredEmployees": [
{
"amount": 5,
"isRequired": true,
"isLocked": true
}
],
"department": [
{
"id": "0000007215",
"description": "SAP-HR-department 15",
"isRequired": false,
"isLocked": true
}
],
"assignmentMethod": [
{
"isRequired": false,
"isLocked": false
}
],
"group": [
{
"id": "1",
"description": "BH1",
"isRequired": false,
"isLocked": true
}
],
"approvalGroup": [
{
"id": "01",
"description": "Kem Default",
"isRequired": true,
"isLocked": true
}
],
"maximumBids": [
{
"amount": 10,
"isRequired": true,
"isLocked": true
}
],
"category": [
{
"id": "02",
"description": "Part-day absence",
"isRequired": false,
"isLocked": true
}
],
"acceptBefore": [
{
"days": 2,
"isRequired": false,
"isLocked": true
}
],
"qualificationSetup": [
{
"isRequired": true,
"isLocked": true,
"qualifications": [
{
"id": "1",
"description": "Welding certificate f",
"primary": true,
"order": 1
},
{
"id": "2",
"description": "Truck certificate",
"primary": true,
"order": 2
}
]
}
]
}
],
"locks": [
{
"date": "2019-01-31",
"since": "2019-01-28",
"user": "CMD",
"name": "Ciprian Dinu",
"avatarURI": "/rest/Resources/employees/833/avatar?eTag=745325195000"
}
]
"shifts": [
{
"id": 802925200,
"empId": "933",
"date": "2019-06-12",
"planId": 2163133252,
"isPublished": false,
"isNew": false,
"dayProfile": [
{
"id": "FLEX",
"startTime": 28800,
"endTime": 57600,
"description": "Fixed/flex",
"isVariable": false,
"foreColor": "FFFFFF",
"backColor": "5032F5"
}
],
"attendanceTime": [
{
"startTime": 39600,
"endTime": 50400
}
],
"department": [
{
"id": "SUMMERDP",
"description": "Hotel Summer department"
}
],
"group": [
{
"id": "1",
"description": "BH1"
}
]
}
]
}
]
},
"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.