Zum Hauptinhalt springen
POST
Cancel a request

Autorisierungen

X-API-KEY
string
header
erforderlich

Pfadparameter

id
string<uuid>
erforderlich
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$

Body

application/json
cancel_reason
string
erforderlich
Minimum string length: 1
revision
integer

Revision you last saw (from GET /requests/{id} or the webhook). If the request was changed since, the call fails with 409 and nothing happens.

Erforderlicher Bereich: x <= 9007199254740991
accepts_cancellation_request
boolean
Standard:false

Set it to true to allow a cancellation request where approval is required. When the caller is the requester (not an admin or a manager of the requester) and the leave type has request_cancellation_needs_approval on, the absence is then not cancelled at once: a cancellation request goes to the approvers and the request stays approved until they decide. Without it such a call is refused, so a flow never reports a cancellation that was only requested. It does not prevent an immediate cancel: a request that needs no approval (for example a pending one), or a call by an admin or a manager of the requester, cancels at once. Branch on outcome.

Antwort

Successful response

success
boolean
erforderlich
message
string
erforderlich
outcome
enum<string>
erforderlich

canceled: the request is cancelled. cancellation_requested: the approvers were asked and the request stays approved until they decide.

Verfügbare Optionen:
canceled,
cancellation_requested
change
object | null
erforderlich

The cancellation request, a change of kind cancellation. Null unless outcome is cancellation_requested.