ProRoster - Approve/reject bids

API Url

Use it for approving/rejecting one or more bids in ProSchedule

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

Permissions: user

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    bidsObject[]

Array of bids to approve/reject.

      actionString

Action to do ("approve", "reject").

Allowed values:"approve""reject"
      commentoptionalString

Comment for rejection.

      idNumber

Unique identifier of the bid.

Request example:

{
"request": {
"data": {
"bids": [
{
"id": 123456789,
"action": "approve"
},
{
"id": 987654321,
"action": "reject",
"comment": "Too many shifts this week"
}
]
}
}
}

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 Unprocessable entity
{
"response": {
"data": {
"bidApprovalErrors": [
{
"id": 2163193580,
"empId": "834",
"empNo": "RST1",
"empName": "John Thompson Doe",
"date": "2018-11-16",
"description": "The demand is overlapping another existing demand"
},
{
"id": 2163193600,
"empId": "834",
"empNo": "RST1",
"empName": "John Thompson Doe",
"date": "2018-11-18",
"description": "Department -1 cannot be used with category BH"
}
]
},
"errorCode": 42,
"errorMessage": "There were errors when approving some of the bids."
}
}