Skip to main content
POST
Log overtime

Autorisierungen

X-API-KEY
string
header
erforderlich

Body

application/json
allowance_type_id
string<uuid>
erforderlich

The allowance type the overtime is credited to. Overtime logging has to be switched on for it.

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})$
date
string
erforderlich

The day the overtime was worked, YYYY-MM-DD. Today or a day in the past.

Pattern: ^\d{4}-\d{2}-\d{2}$
amount
number
erforderlich

Days (0.5 or 1) when allowance_unit is days, whole MINUTES when it is hours (for example 90 = 1 hour 30 minutes).

member_id
string<uuid>

The member the overtime was worked by. Defaults to the API key's member. Only admins may name someone else.

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})$
comment
string | null

A note for the approvers, at most 2500 characters.

Maximum string length: 2500
submission_id
string

Makes a retry safe: the same value for the same member returns the existing entry. Generated when omitted, in which case a retry logs a second entry.

Required string length: 8 - 64

Antwort

Successful response

id
integer
erforderlich
Erforderlicher Bereich: -9007199254740991 <= x <= 9007199254740991
member
object
erforderlich

The member the overtime was worked by.

allowance_type_id
string
erforderlich
allowance_unit
enum<string>
erforderlich

The unit of the allowance type. Amounts are in days for days and in MINUTES for hours.

Verfügbare Optionen:
days,
hours
date
string
erforderlich

The day the overtime was worked, YYYY-MM-DD.

amount
number
erforderlich

The amount that was logged. Days (0.5 or 1) when allowance_unit is days, whole MINUTES when it is hours (for example 90 = 1 hour 30 minutes).

recognized_amount
number
erforderlich

The amount an approver recognized, never more than amount. Equal to amount until someone lowers it. Days (0.5 or 1) when allowance_unit is days, whole MINUTES when it is hours (for example 90 = 1 hour 30 minutes).

day_kind
enum<string>
erforderlich

What kind of day it was when the entry was logged.

Verfügbare Optionen:
WORKDAY,
DAY_OFF,
PUBLIC_HOLIDAY
factor
number
erforderlich

The multiplier applied to the recognized amount, fixed when the entry was logged.

credit_expiry_date
string | null
erforderlich

The LAST day (inclusive, YYYY-MM-DD) the credit can still be used, or null when it does not expire.

comment
string | null
erforderlich
status
enum<string>
erforderlich
Verfügbare Optionen:
PENDING,
APPROVED,
DECLINED,
CANCELED
decided_by
object | null
erforderlich

Who made the final decision. Null while the entry is open.

decided_at
string | null
erforderlich
created_by
object | null
erforderlich

Who logged the entry. It differs from member when an admin logged it for someone else. Null for entries from before this was recorded and once that member has been deleted.

created_at
string
erforderlich
canceled_at
string | null
erforderlich
canceled_by
object | null
erforderlich

Who withdrew the entry. It differs from member when the member who logged it for them withdrew it. Null unless the status is CANCELED.

decline_reason
string | null
erforderlich

The reason given when the entry was declined, also when an admin declined for the approver.

credited_amount
number | null
erforderlich

What was credited to the allowance: the recognized amount times factor, as booked. Null while there is no credit. Days (rounded to two decimals, for example 0.75 or 1.5) when allowance_unit is days, whole MINUTES when it is hours.

credit_removed
boolean
erforderlich

True when the entry is approved but its credit was deleted from the allowance afterwards.