Overtime

Decline an overtime entry

Changed on

Declines one approval step of a pending entry on behalf of the API key's member: their own step first if they are an approver, otherwise the next pending one (an admin key can decline for any approver). Whether one decline closes the entry depends on the member's approval process. Where it does not, the entry stays pending until the last step is decided, so read the entry before retrying after a lost response.

post/overtime-entries/{id}/decline

Request

  • Base URL
    https://api.absentify.com/api/v1
  • URL
    https://api.absentify.com/api/v1/overtime-entries/{id}/decline
  • Auth
    API key in header X-API-KEY

Path parameters

idinteger required

The id of the overtime entry.

Request body

reasonstring required

Why the entry is declined. The member sees it.

Response

Successful response

idinteger required
allowance_type_idstring required
allowance_unit'days' | 'hours' required

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

datestring required

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

amountnumber 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_amountnumber 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'WORKDAY' | 'DAY_OFF' | 'PUBLIC_HOLIDAY' required

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

factornumber required

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

credit_expiry_datestring nullable required

The LAST day (inclusive, YYYY-MM-DD) the credit can still be used, or null when the credit has no expiry of its own; it then follows the allowance's carry-over at the end of the year.

commentstring nullable required
status'PENDING' | 'APPROVED' | 'DECLINED' | 'CANCELED' required
decided_atstring nullable required
created_atstring required
canceled_atstring nullable required
decline_reasonstring nullable required

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

credited_amountnumber nullable 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_removedboolean required

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

Changes