Impersonation - Update substitute

API Url

Create and update a substitute.

PUT
http://localhost:16010/ProMarkREST/rest/General/substitute

Permissions: user

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    substituteObject

Substitutes.

      endDateDate

Ending day of the substitution.

      startDateDate

Starting day of the substitution.

      userIdString

List of substitute user IDs (comma separated).

Request example:

{
"request":{
"data": {
"substitute" : {
"userId" : "RST",
"startDate" : "2017-10-19",
"endDate" : "2017-10-25"
}
}
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  errorCodeNumber

Error code.

  errorMessageString

Error description.

A user can not be a substitute for oneself:

{
"response": {
"errorCode": 105,
"errorMessage": "A user can not be a substitute for oneself"
}
}