This looks like a feature that should be added to the API. Please submit the feature request here. You'll receive updates when we start working on that capability.
It is not valid for an admin to cancel a request. They can deny it. We will not entertain a change here. Only the agent can cancel their own request and then only under certain circumstances.
Valid transitions for an administrator:
submitted -> Pending, Approved
Pending -> Approved, Denied
Approved -> Denied
Denied -> Approved
Canceled -> none
Valid transitions for an agent:
submitted -> Pending
Pending -> Canceled
Approved -> Canceled
Note that only an agent can cancel his or her time off requests. Pending time off requests can be canceled at anytime; approved time off requests can only be canceled if their start date is in the future.
If an administrator needs to cancel an agent's time off request, then he or she should deny the time off request.
We do work on Java API based WFM API, that should serve as an interface for admins or agents to access WFM Pure Cloud platform.
The API itself uses Java API Client Credentials client for OAuth. The agent and admin application that communicates through the API with Genesys Pure Cloud WFM API uses Code Authorization to get user context.
We would like to avoid transfer of agent authentication token from clients to API and as well caching of tokens at WFM API side.
Therefore adding of Cancel into enumeration would help us perform Cancel action in behalf of an agent through the API.
If this is not possible and won't be supported, we will need to find a way around it.