Skip to main content
POST
Log overtime

Authorizations

X-API-KEY
string
header
required

Body

application/json
allowance_type_id
string<uuid>
required

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
required

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
required

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

Response

Successful response

id
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
member
object
required

The member the overtime was worked by.

allowance_type_id
string
required
allowance_unit
enum<string>
required

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

Available options:
days,
hours
date
string
required

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

amount
number
required

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
required

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>
required

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

Available options:
WORKDAY,
DAY_OFF,
PUBLIC_HOLIDAY
factor
number
required

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

credit_expiry_date
string | null
required

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

comment
string | null
required
status
enum<string>
required
Available options:
PENDING,
APPROVED,
DECLINED,
CANCELED
decided_by
object | null
required

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

decided_at
string | null
required
created_by
object | null
required

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
required
canceled_at
string | null
required
canceled_by
object | null
required

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
required

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

credited_amount
number | null
required

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
required

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