Leave Record - UPSERT
This API is used to create, amend, approve and cancel leave requests in BIPO. It also covers leave-with-expiry requests (for example Leave Code LWE01), and it is the API to use when you sync leave requests from an external system into BIPO.
A leave request can be identified in two ways, chosen with RespectField:
Note: The response returns the RecordID of every imported leave request only when RespectField = R. Keep it: it is the key for a later amend, approve, cancel or delete.
Note: ExternalRequestID is not unique. BIPO does not stop two leave requests from carrying the same value, so store the returned RecordID next to your own reference.
Note: Cancelling adds a separate cancellation record and marks the leave request as cancelled. A request that is already cancelled cannot be cancelled again.
Note: This API cannot create a leave request that waits for approval. A new request is approved as soon as it is created.
Note: To approve a leave request that is waiting for approval, send its RecordID, EmployeeCode and LeaveCode and leave ApprovalStatus out. The API user must have write access to that employee.
Note: The saved examples below show create (Recommended), amend, cancel, approve, sync from an external system, leave-with-expiry, the legacy multi-key style and the common error messages.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
