ProRoster - Update an assigned demand

API Url

Use it for reassigning a demand or for editing its attributes. For the remanning only the id of the assigned demand and the EmpId are required. If you send any of the attributes, the existing ones wiil be overwritten.

PUT
http://localhost:16010/ProMarkREST/rest/ProRoster/assigned-demands/{id}

Permissions: user

Query parameters

FieldTypeDescription
forceAssignLogical

True = Will ignore the warning. False = In case the employee's department/group/approval group/category doesn't match the demand's department/group/approval group/category, the routine ends with an error that those demand atrributes will replace the employee's ones.

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

      approvalGroupoptionalObject[]

Approval group object when wanting to overwrite the demand defaults.

        idString

Id of the approvalGroup.

      categoryoptionalObject[]

Category object when wanting to overwrite the demand defaults.

        idString

Id of the category.

      dayProfileoptionalObject[]

The day profile object when wanting to overwrite the demand defaults.

        idString

Day profile ID.

      departmentoptionalObject[]

Department object when wanting to overwrite the demand defaults.

        idString

Id of the department.

      empIdString

Employee's id to receive the demand.

      groupoptionalObject[]

Group object when wanting to overwrite the demand defaults.

        idString

Id of the group.

      idNumber

The unique id of the assigned demand.

      normalTimeoptionalObject[]

Normal time interval for variable day profiles. Use when wanting to overwrite the demand defaults.

        endTimeNumber

End time of the interval in seconds.

        startTimeoptionalNumber

Start time of the interval in seconds.

Request example:

{
"request":{
"data":{
"assignedDemands": [
{
"id": 123456789,
"empId": "893"
"normalTime": [
{
"startTime": 0,
"endTime": 0
}
],
"dayProfile": [
{
"id": "Morning"
}
],
"department": [
{
"id": "Welders"
}
],
"group": [
{
"id": "Group1"
}
],
"approvalGroup": [
{
"id": "Special"
}
],
"category": [
{
"id": "Cat1"
}
]
}
]
}
}
}

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.