ProRoster - Create demand

API Url

Use it for creating a demand and copying a demand to a different date. If a base demand id is provided the demand is created based on a basedemand . If the plan demand id is provided the it is a copy to a different date.

POST
http://localhost:16010/ProMarkREST/rest/ProRoster/demands

Permissions: user

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    demandsObject[]

List of plan Demands.

      approvalGroupoptionalObject[]
        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".

      attendanceTimeoptionalObject[]

Attendance time interval.

        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.

      backColoroptionalString

BackGround color in HEX without #.

      baseDemandIdoptionalNumber

Id of the base demand incase the demand is based on a basedemand to link it.

      categoryoptionalObject[]
        idString

Id of the category.

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      dateDate

The date of the plan demand.

      dayProfileoptionalObject[]
        idoptionalString
        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      daysBeforeoptionalObject[]
        daysoptionalNumber

Accept days before shift takes place.

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      departmentoptionalObject[]
        idoptionalString

Id of the department.

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      descriptionoptionalString

Description of the base demand.

      foreColoroptionalString

ForeGround color in HEX without #.

      groupoptionalObject[]
        idoptionalString

Id of the group.

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      idoptionalNumber

The Id of the plan demand to copy from.

      ignoreDayProfileoptionalObject[]
        isLockedBoolean

Is the attribute locked.

        valueBoolean
      maximumBidsoptionalObject[]
        amountNumber

Number of employees to bid in.

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      nameoptionalString

The name of the plan demand.

      normalTimeoptionalObject[]

Normal time interval for variable day profiles.

        endTimeoptionalNumber

End time of the interval in seconds.

        startTimeoptionalNumber

Start time of the interval in seconds.

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      planIdNumber

Id of the plan currently working on.

      qualificationSetupoptionalObject[]
        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

        qualificationsoptionalObject[]
          idNumber

Id of the employee qualification.

          orderNumber
          primaryBoolean
      requiredEmployeesObject[]
        amountNumber

Number of employees

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      versionoptionalNumber

Version of the plan demand.

Request example:

HTTP/1.1 200 OK
{
"request": {
"data": {
"demands": [
{
"id": 2153900338,
"planId": 2153900339,
"baseDemandId": 2153905338,
"date": "18-02-2018",
"name": "Bla",
"description": "blah, blah, blah, blah, blah",
"foreColor": "123400",
"backColor": "567800",
"version": 1,
"attendanceTime": [
{
"startTime": 0,
"endTime": 3600,
"isRequired": false,
"isLocked": true
}
],
"normalTimeInterval": [
{
"startTime": 0,
"endTime": 3600,
"isRequired": false,
"isLocked": true
}
],
"dayProfile": [
{
"id": "DAY",
"isRequired": false,
"isLocked": true
}
],
"requiredEmployees": [
{
"amount": 3,
"isRequired": false,
"isLocked": true
}
],
"department": [
{
"id": "0000007215",
"isRequired": false,
"isLocked": true
}
],
"assignmentMethod": [
{
"method": "A",
"isRequired": false,
"isLocked": true
}
],
"group": [
{
"id": "1",
"isRequired": false,
"isLocked": true
}
],
"approvalGroup": [
{
"id": "01",
"isRequired": true,
"isLocked": true
}
],
"maximumBids": [
{
"amount": 9,
"isRequired": false,
"isLocked": true
}
],
"category": [
{
"id": "02",
"isRequired": false,
"isLocked": true
}
],
"ignoreDayProfile": [
{
"value": true,
"isLocked": true
}
],
"daysBefore": [
{
"days": 2,
"isRequired": false,
"isLocked": true
}
],
"qualifications": [
{
"id": 2153900339,
"empQualId": "3",
"primary": true,
"order": 1,
"isRequired": true,
"isLocked": true
}
],
"notes": [
{
"id": 2163396278,
"text": "bring coffee in the morning",
"isEmpNote": true
},
{
"id": 2163396279,
"text": "no breaks during this shift"
}
]
}
]
}
}
}

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

      notesObject[]
        idNumber

Id of the note.

        isEmpNoteBoolean

TRUE if the note is an employee note.

        textString

Note's text.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.