Time off & holidays

Create Hris Time Off

Creates a REQUESTED time-off request after eligibility and day calculation, logging and notifying approvers.

POSThttps://api.toku.com/hris/create-hris-time-off

Not available to API keys yet. It will need time:write.

curl --request POST \
  --url 'https://api.toku.com/hris/create-hris-time-off' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "roleInOrgID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "startDate": "string",
  "endDate": "string",
  "days": 0,
  "data": {},
  "note": "string",
  "leaveType": "ANNUAL_LEAVE",
  "customLeaveTypeID": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
200 response
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "hrisTimeOffID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "startDate": "string",
  "endDate": "string",
  "days": 0,
  "status": "REQUESTED",
  "leaveType": "ANNUAL_LEAVE",
  "customLeaveTypeID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "note": "string"
}

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is an access token from a Toku sign-in. See Authentication in the API reference.

Body

application/json

roleInOrgIDstring<uuid>
startDatestringrequired

Allowed: matches ^\d{4}-\d{2}-\d{2}$

endDatestringrequired

Allowed: matches ^\d{4}-\d{2}-\d{2}$

daysnumberrequired

The day allocations must sum to days within 0.001 and fall within the requested date range.

Allowed: greater than 0

dataobjectrequired
notestring

Allowed: at most 100 characters

leaveTypestringrequired

Available options: ANNUAL_LEAVE, PAID_TIME_OFF, PUBLIC_HOLIDAY, SICK_LEAVE, COMPASSIONATE_BEREAVEMENT_LEAVE, PARENTAL_LEAVE, MATERNITY_LEAVE, LONG_SERVICE_LEAVE, COMMUNITY_SERVICE_LEAVE, FAMILY_CARE_LEAVE, UNPAID_LEAVE, SPECIAL_LEAVE

customLeaveTypeIDstring<uuid>

Response

200Successful response
idstring<uuid>required
hrisTimeOffIDstring<uuid>required
startDatestringrequired

Allowed: matches ^\d{4}-\d{2}-\d{2}$

endDatestringrequired

Allowed: matches ^\d{4}-\d{2}-\d{2}$

daysnumberrequired
statusstringrequired

Available options: REQUESTED, APPROVED, REJECTED, CANCELLED

leaveTypestringrequired

Available options: ANNUAL_LEAVE, PAID_TIME_OFF, PUBLIC_HOLIDAY, SICK_LEAVE, COMPASSIONATE_BEREAVEMENT_LEAVE, PARENTAL_LEAVE, MATERNITY_LEAVE, LONG_SERVICE_LEAVE, COMMUNITY_SERVICE_LEAVE, FAMILY_CARE_LEAVE, UNPAID_LEAVE, SPECIAL_LEAVE

customLeaveTypeIDstring | null<uuid>required
notestring | nullrequired
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits