ProRoster - Copy part of the plan

API Url

Use it for copying part of the plan in the future

POST
http://localhost:16010/ProMarkREST/rest/ProRoster/plan/{id}/copy

Permissions: user

Path parameters

FieldTypeDescription
idNumber

The plan unique identifier.

Query parameters

FieldTypeDescription
contextNumber

What to copy: If ProSchedule: 0=All (default if not sent). 1=Just the plan demands. If ProRoster: 0=All (default if not sent). 1=Only published changes.

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    copyToDate

The start date of the target period.

    fromDate

The start date of the period to be copied.

    repeatoptionalNumber

How many times the copy should be repeated. Default is 1.

    toDate

The end date of the period to be copied.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  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.

Error example:

HTTP/1.1 422
{
"response": {
"data": {
"copyErrors": [
{
"demandId": 2154023310,
"demandName": "Waiter",
"empId": "165",
"empName": "Galba Emperor",
"date": "2018-07-22",
"copyDate": "2018-08-22",
"description": "The demand is overlapping another existing demand"
}
]
},
"errorCode": 100,
"errorMessage": "There are errors when copying some of the demands"
}
}
}