ProRoster - Get matching swops

API Url

Use it for returning a list of days

GET
http://localhost:16010/ProMarkREST/rest/ProRoster/employees/{id}/swop-shifts

Permissions: user

Path parameters

FieldTypeDescription
idNumber

The id of the source employee

Query parameters

FieldTypeDescription
dateoptionalDate

The date of the source

empIdsoptionalString

List of target empIds separated with comma delimiter.

fromoptionalDate

The start date of the period you want to match

planIdoptionalDate

The id of the plan

shiftIdoptionalDate

The id of the source shift. If not sent, swapping of days is matched.

tooptionalDate

The date of the source

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    employeesObject[]

Array of employees

      canSwopBoolean

True if day can be swapped.

      dateDate

The date in which the swop matches.

      empIdString

Employee id

      empNameString

Employee full name

      empNoString

Employee number

      shiftsoptionalObject[]

Collection of shifts.

        attendanceTimeoptionalObject[]

Attendancetime interval of the shift.

          endTimeoptionalNumber

End time of the interval in seconds.

          startTimeoptionalNumber

Start time of the interval in seconds.

        canSwopDate

True if shift can be swapped.

        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.

        idNumber

The Id of the shift.

        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.

        codeString

The code of the message.

        messageString

The text of the message.

  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": [
{
"empId": "1191",
"empNo": "DST",
"empName": "Dwight Schrute",
"date": "2019-09-30",
"canSwop": true,
"shifts": [
{
"id": "2163650668\u00011191\u00012458758\u00010",
"empId": "1191",
"date": "2019-09-30",
"canSwop": true,
"planId": 2163650668,
"isPublished": true,
"dayProfile": [
{
"id": "FLEX",
"startTime": 28800,
"endTime": 57600,
"description": "Fixed/flex",
"isVariable": false,
"foreColor": "FFFFFF",
"backColor": "5032F5"
}
],
"department": [
{
"id": "WAREHOUSE",
"description": "FGN warehouse department"
}
],
"group": [
{
"id": "WHGRP",
"description": "FGN's Warehouse group"
}
]
}
]
}
]
},
"errorCode": 0,
"errorMessage": ""
}
}