v3

latestSwagger 2.02026-08-067506752.0 MB
Time off ledger

Create a time off ledger entry

post/v1/org/{orgId}/timeoff-ledger

Path parameters

orgIdstring required

Org identifier (either id or slug)

Request body

orgIdstring required

org that the time off belongs to

personIdstring required

person taking the time off

timeOffPolicyIdstring

Time off policy to which this entry pertains.

entryType'EXPIRATION' | 'BALANCE_RESET' | 'CARRYOVER' | 'UPFRONT_BALANCE' | 'ACCRUAL' | 'ADJUSTMENT' | 'TIME_OFF' required

Ledger entry type

externalIdstring

external identifier, if this entry exists in an external system

fromDatestring date

For time off, from date of time off, inclusive

fromDatePartialDaynumber

For time off, portion of the from date to take

fromDatePartialDayPeriod'AM' | 'PM'

Portion of the from day requested (e.g. AM or PM)

untilDatestring date

For time off, until date of time off, exclusive

endDatePartialDaynumber

For time off, portion of the end date (day before the until date) to take

endDatePartialDayPeriod'AM' | 'PM'

Portion of the end day requested (e.g. AM or PM)

datestring date required

date on which this entry appears in the ledger

daysnumber required

Change to the balance made by this ledger entry. This value is always nonnegative; it is interpreted in the context of entryAction.

hoursnumber

For time off, number of hours taken

entryAction'SET' | 'MIN' | 'EXPIRE' | 'CARRYOVER' | 'ADD' | 'ADD_CLAMP' | 'SUBTRACT' required

Action this entry takes on the balance.

typeDescriptionstring

type of time off

notestring

notes on the time off

approval'APPROVED' | 'PENDING' | 'CANCELLED' | 'REJECTED' | 'SUPERSEDED'

approval status of the time off

approvalAtstring

timestamp of approval

approvalUserIdstring

user who either is the next one requesting approval, or the user who did the final approval or rejection

createIdstring

created by user id

createAtstring

created timestamp

requestAtstring

requested at timestamp -- often the same as createAt

Example request

{
  "orgId": "588f7ee98f138b19220041a7",
  "personId": "588f7ee98f138b19220041a7",
  "timeOffPolicyId": "588f7ee98f138b19220041a7",
  "approvalAt": "2017-01-24T13:57:52Z",
  "approvalUserId": "588f7ee98f138b19220041a7",
  "createId": "588f7ee98f138b19220041a7",
  "createAt": "2017-01-24T13:57:52Z",
  "requestAt": "2017-01-24T13:57:52Z"
}

Response

ledger entry created