Impersonation - Update substitute
API Url
Create and update a substitute.
PUT
http://localhost:16010/ProMarkREST/rest/General/substitute
Permissions: user
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| substitute | Object | Substitutes. |
| endDate | Date | Ending day of the substitution. |
| startDate | Date | Starting day of the substitution. |
| userId | String | List of substitute user IDs (comma separated). |
Request example:
{"request":{"data": {"substitute" : {"userId" : "RST","startDate" : "2017-10-19","endDate" : "2017-10-25"}}}}
Error 4xx
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |
A user can not be a substitute for oneself:
{"response": {"errorCode": 105,"errorMessage": "A user can not be a substitute for oneself"}}