Zum Hauptinhalt springen
POST
Create a request

Autorisierungen

X-API-KEY
string
header
erforderlich

Body

application/json
start
string
erforderlich

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
erforderlich

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.

leave_type_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})$
requester_member_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})$
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.

Verfügbare Optionen:
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.

Verfügbare Optionen:
lunchtime,
end_of_day
reason
string
representative_member_ids
string<uuid>[]

Member IDs to assign as representatives, on a plan that includes representatives. For a leave type that requires them, and for one with optional representatives when continue_without_representative is false (which non-empty IDs imply when it is omitted), the request needs as many available representatives as the member's required_representatives_count; fewer returns REQUIRED_REPRESENTATIVES_COUNT_NOT_MET (as a 400 on create, as rejection.code on preview). A member who may neither choose nor reorder representatives gets the configured ones instead of these IDs. A member whose required_representatives_count is 0 gets none, but IDs passed for a member who may choose or reorder them are still validated.

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})$
continue_without_representative
boolean

Only for leave types with optional representatives. false asks for representatives: the ones in representative_member_ids when the member may choose or reorder them, otherwise the member's configured ones. A member whose required_representatives_count is 0 gets none. true creates the request without representatives. When omitted, it is false if representative_member_ids is not empty, otherwise the request has no representatives. Ignored for leave types that require representatives.

ignoreRepresentativeRequirement
boolean

Skip the representative requirement. Only honored when the API key's member is an admin and the request is created for another member.

Antwort

Successful response

The response is of type string<uuid>.

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})$