ProRoster - Update multiple shifts

API Url

Use it for editing multiple shifts in ProRoster.

PUT
http://localhost:16010/ProMarkREST/rest/ProRoster/shifts

Permissions: user

Query parameters

FieldTypeDescription
forceAssignLogical

True = Will ignore the warning. False = Return warnings for partial absence overlap and availability.

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

      shiftsObject[]

Collection of shifts.

        dateDate

The date of the shift.

        dayProfileoptionalObject[]

The day profile object.

          idString

Day profile ID.

        departmentoptionalObject[]

The department object.

          idString

Id of the department.

        empIdString

The Id of the employee.

        groupoptionalObject[]

The group object.

          idString

Id of the group.

        idString

The Id of the shift.

        normalTimeoptionalObject[]

Normal time interval for variable day profiles.

          endTimeNumber

End time of the interval in seconds.

          startTimeNumber

Start time of the interval in seconds.

        planIdNumber

The Id of the plan.

Request example:

{
"request":{
"data":{
"shifts": [
{
"id": "216313325283324587160",
"empId": "1000",
"date": "2019-06-12",
"planId": 2163133252,
"dayProfile": [
{
"id": "FLEX"
}
],
"attendanceTime": [
{
"startTime": 39600,
"endTime": 50400
}
],
"department": [
{
"id": "SUMMERDP"
}
],
"group": [
{
"id": "1
}
]
}
]
}
}
}

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

      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.

        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.

        idString

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.

  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": {
"shifts": [
{
"id": "216313325283324587160",
"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.