Time off & holidays
Create Hris Time Off
Creates a REQUESTED time-off request after eligibility and day calculation, logging and notifying approvers.
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"
}'{
"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
AuthorizationstringheaderrequiredBearer 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>startDatestringrequiredAllowed: matches ^\d{4}-\d{2}-\d{2}$
endDatestringrequiredAllowed: matches ^\d{4}-\d{2}-\d{2}$
daysnumberrequiredThe day allocations must sum to days within 0.001 and fall within the requested date range.
Allowed: greater than 0
dataobjectrequirednotestringAllowed: at most 100 characters
leaveTypestringrequiredAvailable 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>requiredhrisTimeOffIDstring<uuid>requiredstartDatestringrequiredAllowed: matches ^\d{4}-\d{2}-\d{2}$
endDatestringrequiredAllowed: matches ^\d{4}-\d{2}-\d{2}$
daysnumberrequiredstatusstringrequiredAvailable options: REQUESTED, APPROVED, REJECTED, CANCELLED
leaveTypestringrequiredAvailable 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>requirednotestring | nullrequired