ProSchedule - Swop two days.

API Url

Use it for swapping two days.

POST
http://localhost:16010/ProMarkREST/rest/ProRoster/plans/{id}/swop-demands

Permissions: user

Path parameters

FieldTypeDescription
idNumber

The plan id.

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

      dateDate

The day for which the swapping is performed.

      firstEmpIdString

First employee's id for swop.

      secondEmpIdString

Second employee's id for swop.

Request example:

{
"request":{
"data":{
"swop":{
"date": "2019-10-31",
"firstEmpId": "1327",
"secondEmpId": "1326"
}
}
}
}

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    assignedDemandsObject[]
      approvalGroupoptionalObject[]
        descriptionoptionalString

Description of the approvalGroup.

        idoptionalString

Id of the approvalGroup.

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      backColorString

BackGround color in HEX without #.

      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 assigned 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.

      demandIdNumber

The Id of the plan demand the assigned demand originates from.

      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 unique id of the assigned demand.

      isPublishedBoolean

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

      isTaskBoolean

True if demand is task, false if not.

      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.

      versionNumber

Version number of the assigned demand.

  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": {
"assignedDemands": [
{
"id": 2154019413,
"empId": "893",
"date": "2021-09-29",
"demandId": 1234567890,
"planId": 2153977956,
"name": "BaseDemandDeTestBlah",
"description": "same",
"foreColor": "678DB6",
"backColor": "678DB6",
"version": 1,
"isPublished": false,
"normalTime": [
{
"startTime": 0,
"endTime": 0,
"isRequired": false,
"isLocked": false
}
],
"dayProfile": [
{
"id": "Morning",
"description": "Morning shift",
"isVariable": false,
"foreColor": "",
"backColor": "",
"isRequired": false,
"isLocked": false
}
],
"department": [
{
"id": "Welders",
"description": "Welders specialists",
"isRequired": false,
"isLocked": false
}
],
"group": [
{
"id": "Group1",
"description": "Group 1",
"isRequired": false,
"isLocked": false
}
],
"approvalGroup": [
{
"description": "",
"isRequired": false,
"isLocked": false
}
],
"category": [
{
"description": "",
"isRequired": false,
"isLocked": false
}
]
"ignoreDayProfile": [
{
"value": true,
"isLocked": true
}
]
}
]
},
"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.