Allow creation of signature of the worktimes in a period
The worktime period signature is a write only resource that exists only to add signature
https://timesaver.ch/app/rest/mandators/<mandator id>/worktimePeriods/<worktime period id>/signatures
Name | Description |
---|---|
filter.role | "Supervisor" or "Employee". Optional if the parameter is not provided, creates both signatures. |
onlyCheck | Boolean. Optional. If true, does not creates any signature but only test the data belonging to the period. |
asUser | Id of the user. Optional. Useful when using the mandator APIKey |
filter.user | Id of the user for whom the signatures are created. Optional. If not provided, signature are created for all users. |
The following request will create a Supervisor signature as if the user with id 223 was authorized. A signature will created for all of the employees that the user with 223 supervises.
Signatures may be rejected if entries test errors exists.
POST https://timesaver.ch/app/rest/mandators/59/worktimePeriods/223/signatures Authorization: APIKey aW5mb0B0aW1lc2F2ZXIuY2g6czNjcjN0 Accept: application/json { "filter.role": "Supervisor", "onlyCheck": false, "asUser": 223 }
TODO
The following request will remove an employee signature
DELETE https://timesaver.ch/app/rest/mandators/59/worktimePeriods/223/signatures?filter.role=Employee&filter.user=232 Authorization: Basic aW5mb0B0aW1lc2F2ZXIuY2g6dGVzdA== Accept: application/json
TODO