Skip to main content
POST
Change a request

Authorizations

X-API-KEY
string
header
required

Path Parameters

id
string<uuid>
required
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
reason
string | null
start
string

Start/end of the request in ISO 8601. For day-based leave types (leave_unit: days) send the date at midnight UTC (e.g. 2026-06-01T00:00:00Z) and use start_at / end_at to set half-days. For hour-based leave types include the exact time of day (e.g. 2026-06-01T09:00:00Z); start_at / end_at are then ignored.

end
string

Start/end of the request in ISO 8601. For day-based leave types (leave_unit: days) send the date at midnight UTC (e.g. 2026-06-01T00:00:00Z) and use start_at / end_at to set half-days. For hour-based leave types include the exact time of day (e.g. 2026-06-01T09:00:00Z); start_at / end_at are then ignored.

start_at
enum<string>

For day-based leave types: whether the absence starts in the morning (the whole first day counts) or afternoon (only the second half of the first day). Ignored for hour-based leave types.

Available options:
morning,
afternoon
end_at
enum<string>

For day-based leave types: whether the absence ends at lunchtime (only the first half of the last day) or end_of_day (the whole last day counts). Ignored for hour-based leave types.

Available options:
lunchtime,
end_of_day
leave_type_id
string<uuid>

The new leave type, which must allow changes and be day-based or hour-based like the request.

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})$
admin_approval_option
enum<string>

Whether the change is applied at once (admins only) or goes through the normal approval process.

Available options:
approve_request_immediately,
go_through_the_normal_approval_process

Response

Successful response

id
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
revision
integer | null
required

The revision the request gets when this change is applied. Null while the change is pending, declined or withdrawn.

Required range: -9007199254740991 <= x <= 9007199254740991
kind
enum<string>
required

What the change does: reason (only the reason changes), shortened (the new period lies inside the old one), extended (the new period covers the old one), moved (other dates), leave_type (another leave type) or cancellation (the absence is to be cancelled). For cancellation, previous and proposed are equal, and applying the change cancels the absence.

Available options:
reason,
shortened,
extended,
moved,
leave_type,
cancellation
status
enum<string>
required

pending waits for approvers, applied is in force, declined and withdrawn never changed the request.

Available options:
pending,
approved,
declined,
withdrawn,
applied
previous
object
required

The request as it was before this change.

proposed
object
required

The request as this change wants it. Only for applied changes is this what is in force. For a cancellation it equals previous: use allowance_delta for what cancelling gives back.

changed_by
object | null
required
decided_by
object | null
required
created_at
string
required
decided_at
string | null
required
decision_reason
string | null
required

Null while the change is pending, and when the caller may not see the reasons of the request (same rule as reason). A withdrawal that an earlier cancel of the absence made shows the cancel reason here only to those who may see cancel_reason.

cancel_reason
string | null
required

Only for kind cancellation: the reason the requester gave for cancelling. Null for other kinds, and when the user of the API key may not see the reason of a cancellation request.

allowance_delta
number
required

How much this change adds to the counted duration (workday_absence_duration), in the unit of the request. Negative when it gives days back: for a cancellation it is the whole counted duration, negated. It moves an allowance only when the leave type takes from one.