Calls: {root}/{version}/leave


GET/v4/get-by-id
Route {root}/v4/leave/get-by-id
Request type URL
User level STAFF
Requires authentication Yes
Response type Single
Sample call{root}/v0/leave/get-by-id/12345678

Parameters

Sample cURL

curl --location --request GET "{{ROOT}}/v4/leave/get-by-id/12345678-H "Authorization: Bearer {{BEARER_TOKEN}}" \
-H "app-id:{{APP_ID}}" \
-H "Content-Type: application/json" \
-H "Accept-Encoding: gzip" \
-H "accept: */*" \

Sample response

[
{
"object_name":"requested_by_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"requested_by_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"image_url_small",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"image_url_large",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"user_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"department_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"department_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"code",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"colour",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"cancellation_period_id",
"type":"[Int32]",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"status_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"disabled",
"value":"0"
},
{
"name":"active",
"value":"1"
}]
"note":
},
{
"object_name":"start_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"end_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"allowance_type_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"days",
"value":"0"
},
{
"name":"hours",
"value":"1"
}]
"note":
},
{
"object_name":"duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"allowance_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"work_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"free_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"requested_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_by_id",
"type":"[Int32]",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_by_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_by_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"request_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approve_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"cancellation_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"last_reminder_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_status_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"disabled",
"value":"0"
},
{
"name":"active",
"value":"1"
}]
"note":
}
]
GET/v4.1/get-by-id
Route {root}/v4.1/leave/get-by-id
Request type URL
User level STAFF
Requires authentication Yes
Response type Single
Sample call{root}/v0/leave/get-by-id/12345678

Parameters

Sample cURL

curl --location --request GET "{{ROOT}}/v4.1/leave/get-by-id/12345678-H "Authorization: Bearer {{BEARER_TOKEN}}" \
-H "app-id:{{APP_ID}}" \
-H "Content-Type: application/json" \
-H "Accept-Encoding: gzip" \
-H "accept: */*" \

Sample response

[
{
"object_name":"allowance_split",
"type":"NESTED",
"is_nullable":false,
"nest":[
{
"object_name":"start_date",
"type":"Date",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"end_date",
"type":"Date",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"remaining",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"carryover_remaining",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
}],
"custom":null
"note":
},
{
"object_name":"requested_by_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"requested_by_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"image_url_small",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"image_url_large",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"user_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"department_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"department_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"code",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"colour",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"cancellation_period_id",
"type":"[Int32]",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"status_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"disabled",
"value":"0"
},
{
"name":"active",
"value":"1"
}]
"note":
},
{
"object_name":"start_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"end_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"allowance_type_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"days",
"value":"0"
},
{
"name":"hours",
"value":"1"
}]
"note":
},
{
"object_name":"duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"allowance_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"work_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"free_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"requested_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_by_id",
"type":"[Int32]",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_by_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_by_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"request_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approve_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"cancellation_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"last_reminder_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_status_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"disabled",
"value":"0"
},
{
"name":"active",
"value":"1"
}]
"note":
}
]
GET/v4/get-declined-by-id
Route {root}/v4/leave/get-declined-by-id
Request type URL
User level STAFF
Requires authentication Yes
Response type Single
Sample call{root}/v0/leave/get-declined-by-id/12345678

Parameters

Sample cURL

curl --location --request GET "{{ROOT}}/v4/leave/get-declined-by-id/12345678-H "Authorization: Bearer {{BEARER_TOKEN}}" \
-H "app-id:{{APP_ID}}" \
-H "Content-Type: application/json" \
-H "Accept-Encoding: gzip" \
-H "accept: */*" \

Sample response

[
{
"object_name":"leave_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"user_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"department_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"department_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"code",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"colour",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"status_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"disabled",
"value":"0"
},
{
"name":"active",
"value":"1"
}]
"note":
},
{
"object_name":"start_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"end_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"allowance_type_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"days",
"value":"0"
},
{
"name":"hours",
"value":"1"
}]
"note":
},
{
"object_name":"duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"allowance_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"work_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"free_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"requested_by_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"requested_by_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"requested_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_by_id",
"type":"[Int32]",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_by_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_by_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"request_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approve_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"cancellation_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"declined_by_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"declined_by_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"declined_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
}
]
POST/v4/my
Route {root}/v4/leave/my
Request type BODY
User level STAFF
Requires authentication Yes
Response type Single

Parameters

Nested object(s)[]

Sample cURL

curl --location --request POST "{{ROOT}}/v4/leave/my/" \
-H "Authorization: Bearer {{BEARER_TOKEN}}" \
-H "app-id:{{APP_ID}}" \
-H "Content-Type: application/json" \
-H "Accept-Encoding: gzip" \
-H "accept: */*" \
--data '{"date_option": "0","leave_type_ids": [{"leave_type_id":"234"},{"leave_type_id":"234"}],"status_id": "0","include_leave": false,"include_work": false,"include_free_restricted": false}'

Sample response

[
{
"object_name":"start_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"end_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave",
"type":"NESTED",
"is_nullable":false,
"nest":[
{
"object_name":"leave_id",
"type":"Int32",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"leave_type_name",
"type":"String",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"leave_type_id",
"type":"[Int32]",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"code",
"type":"String",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"colour",
"type":"String",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"status_id",
"type":"custom",
"is_nullable":False,
"nest":null,
"custom":"[
{
"name":"disabled",
"value":"0"
},
{
"name":"active",
"value":"1"
}]"
"note":"",
},
{
"object_name":"start_date",
"type":"DateTime",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"end_date",
"type":"DateTime",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"duration",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"allowance_duration",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"allowance_type_id",
"type":"custom",
"is_nullable":False,
"nest":null,
"custom":"[
{
"name":"days",
"value":"0"
},
{
"name":"hours",
"value":"1"
}]"
"note":"",
},
{
"object_name":"work_duration",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"free_duration",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"requested_date",
"type":"DateTime",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"approver_id",
"type":"Int32",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"approver_first_name",
"type":"String",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"approver_last_name",
"type":"String",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"approved_date",
"type":"DateTime",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"approved_by_id",
"type":"[Int32]",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"approved_by_first_name",
"type":"String",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"approved_by_last_name",
"type":"String",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"request_note",
"type":"String",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"approved_note",
"type":"String",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"cancellation_period",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"last_reminder_date",
"type":"DateTime",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
}],
"custom":null
"note":
},
{
"object_name":"work",
"type":"NESTED",
"is_nullable":false,
"nest":[
{
"object_name":"start_date",
"type":"DateTime",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"end_date",
"type":"DateTime",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"monday",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"tuesday",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"wednesday",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"thursday",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"friday",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"saturday",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"sunday",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
}],
"custom":null
"note":
},
{
"object_name":"free_days",
"type":"NESTED",
"is_nullable":false,
"nest":[
{
"object_name":"start_date",
"type":"DateTime",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"end_date",
"type":"DateTime",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"description",
"type":"String",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
}],
"custom":null
"note":
},
{
"object_name":"restricted_days",
"type":"NESTED",
"is_nullable":false,
"nest":[
{
"object_name":"start_date",
"type":"DateTime",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"end_date",
"type":"DateTime",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"description",
"type":"String",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
}],
"custom":null
"note":
},
{
"object_name":"leave_types",
"type":"NESTED",
"is_nullable":false,
"nest":[
{
"object_name":"leave_type_id",
"type":"Int32",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"code",
"type":"String",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"colour",
"type":"String",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"name",
"type":"String",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
}],
"custom":null
"note":
}
]
POST/v4.1/my
Route {root}/v4.1/leave/my
Request type BODY
User level STAFF
Requires authentication Yes
Response type Single

Parameters

Nested object(s)[]

Sample cURL

curl --location --request POST "{{ROOT}}/v4.1/leave/my/" \
-H "Authorization: Bearer {{BEARER_TOKEN}}" \
-H "app-id:{{APP_ID}}" \
-H "Content-Type: application/json" \
-H "Accept-Encoding: gzip" \
-H "accept: */*" \
--data '{"date_option": "0","leave_type_ids": [{"leave_type_id":"234"},{"leave_type_id":"234"}],"status_id": "0"}'

Sample response

[
{
"object_name":"leave_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"start_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"end_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_id",
"type":"[Int32]",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"code",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"colour",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"status_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"disabled",
"value":"0"
},
{
"name":"active",
"value":"1"
}]
"note":
},
{
"object_name":"allowance_type_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"days",
"value":"0"
},
{
"name":"hours",
"value":"1"
}]
"note":
},
{
"object_name":"duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"work_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"allowance_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"free_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"shifts",
"type":"Decimal",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"requested_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"request_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"cancellation_period",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"last_reminder_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"original_start_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"original_end_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
}
]
POST/v4/get
Route {root}/v4/leave/get
Request type BODY
User level APPROVER
Requires authentication Yes
Response type Array()

Parameters

Nested object(s)[]

Sample cURL

curl --location --request POST "{{ROOT}}/v4/leave/get/" \
-H "Authorization: Bearer {{BEARER_TOKEN}}" \
-H "app-id:{{APP_ID}}" \
-H "Content-Type: application/json" \
-H "Accept-Encoding: gzip" \
-H "accept: */*" \
--data '{"map_type_id": "0","map_id": "123456","user_status_id": "0","leave_type_ids": [{"leave_type_id":"234"},{"leave_type_id":"234"}],"date_option": "0","status_id": "0"}'

Sample response

[
{
"object_name":"leave_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"user_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"department_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"department_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"code",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"colour",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"cancellation_period_id",
"type":"[Int32]",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"status_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"disabled",
"value":"0"
},
{
"name":"active",
"value":"1"
}]
"note":
},
{
"object_name":"start_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"end_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"allowance_type_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"days",
"value":"0"
},
{
"name":"hours",
"value":"1"
}]
"note":
},
{
"object_name":"duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"allowance_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"work_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"free_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"requested_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_by_id",
"type":"[Int32]",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_by_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_by_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"request_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approve_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"cancellation_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"last_reminder_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_status_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"disabled",
"value":"0"
},
{
"name":"active",
"value":"1"
}]
"note":
}
]
POST/v4.1/get
Route {root}/v4.1/leave/get
Request type BODY
User level APPROVER
Requires authentication Yes
Response type Array()

Parameters

Nested object(s)[]

Sample cURL

curl --location --request POST "{{ROOT}}/v4.1/leave/get/" \
-H "Authorization: Bearer {{BEARER_TOKEN}}" \
-H "app-id:{{APP_ID}}" \
-H "Content-Type: application/json" \
-H "Accept-Encoding: gzip" \
-H "accept: */*" \
--data '{"map_type_id": "0","map_id": "123456","user_status_id": "0","leave_type_ids": [{"leave_type_id":"234"},{"leave_type_id":"234"}],"date_option": "0","status_id": "0"}'

Sample response

[
{
"object_name":"leave_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"user_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"department_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"department_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"code",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"colour",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"cancellation_period",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"leave_type_status_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"disabled",
"value":"0"
},
{
"name":"active",
"value":"1"
}]
"note":
},
{
"object_name":"status_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"disabled",
"value":"0"
},
{
"name":"active",
"value":"1"
}]
"note":
},
{
"object_name":"start_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"end_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"allowance_type_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"days",
"value":"0"
},
{
"name":"hours",
"value":"1"
}]
"note":
},
{
"object_name":"duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"allowance_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"work_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"free_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"shifts",
"type":"Decimal",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"requested_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_id",
"type":"[Int32]",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"notifier_2_id",
"type":"[Int32]",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"notifier_2_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"notifier_2_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"notifier_3_id",
"type":"[Int32]",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"notifier_3_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"notifier_3_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_by_id",
"type":"[Int32]",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_by_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approved_by_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"declined_by_id",
"type":"[Int32]",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"declined_by_first_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"declined_by_last_name",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"request_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approve_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"cancellation_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"last_reminder_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"original_start_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"original_end_date",
"type":"DateTime",
"is_nullable":false,
"nest":null,
"custom":null
"note":
}
]
POST/v4/validate
Route {root}/v4/leave/validate
Request type BODY
User level STAFF
Requires authentication Yes
Response type Single

Parameters

Sample cURL

curl --location --request POST "{{ROOT}}/v4/leave/validate/" \
-H "Authorization: Bearer {{BEARER_TOKEN}}" \
-H "app-id:{{APP_ID}}" \
-H "Content-Type: application/json" \
-H "Accept-Encoding: gzip" \
-H "accept: */*" \
--data '{"leave_id": "123456","user_id": "123456","leave_type_id": "123456","start_date": "20230401T00:00","end_date": "20230401T00:00","admin": false,"note": "sample"}'

Sample response

[
{
"object_name":"user_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"allowance_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"free_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"work_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"allowance_type_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"days",
"value":"0"
},
{
"name":"hours",
"value":"1"
}]
"note":
},
{
"object_name":"breakdown",
"type":"NESTED",
"is_nullable":false,
"nest":[
{
"object_name":"duration",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"work_duration",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"allowance_duration",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"free_duration",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"user_allowance_id",
"type":"[Int32]",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"allowance_start_date",
"type":"String",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"opening",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"remaining",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"carryover_opening",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"carryover_remaining",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"pending",
"type":"minute(int32)",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"remaining_deducted",
"type":"[Int32]",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"carryover_remaining_deducted",
"type":"[Int32]",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"pending_deducted",
"type":"[Int32]",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"remaining_deduction",
"type":"[Int32]",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
},
{
"object_name":"carryover_remaining_deduction",
"type":"[Int32]",
"is_nullable":False,
"nest":null,
"custom":null
"note":"",
}],
"custom":null
"note":
}
]
POST/v4/submit
Route {root}/v4/leave/submit
Request type BODY
User level STAFF
Requires authentication Yes
Response type Single

Parameters

Sample cURL

curl --location --request POST "{{ROOT}}/v4/leave/submit/" \
-H "Authorization: Bearer {{BEARER_TOKEN}}" \
-H "app-id:{{APP_ID}}" \
-H "Content-Type: application/json" \
-H "Accept-Encoding: gzip" \
-H "accept: */*" \
--data '{"leave_id": "123456","user_id": "123456","leave_type_id": "123456","start_date": "20230401T00:00","end_date": "20230401T00:00","note": "sample","admin": false}'

Sample response

[
{
"object_name":"status_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"pending",
"value":"1"
},
{
"name":"approved",
"value":"100"
},
{
"name":"auto approved",
"value":"110"
},
{
"name":"self approved",
"value":"120"
},
{
"name":"approved by approver",
"value":"130"
},
{
"name":"approved by super user",
"value":"140"
},
{
"name":"paid overtime only",
"value":"200"
},
{
"name":"cancelled by user pending",
"value":"900"
},
{
"name":"cancelled by user approved",
"value":"901"
},
{
"name":"cancelled by approver pending",
"value":"910"
},
{
"name":"cancelled by approved approved",
"value":"911"
},
{
"name":"cancelled by super user pending",
"value":"920"
},
{
"name":"cancelled by super user approved",
"value":"921"
},
{
"name":"declined by approved",
"value":"930"
},
{
"name":"declined by auper user",
"value":"940"
}]
"note":
},
{
"object_name":"leave_id",
"type":"[Int32]",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"message",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
}
]
POST/v4/approve-decline
Route {root}/v4/leave/approve-decline
Request type BODY
User level APPROVER
Requires authentication Yes
Response type Single

Parameters

Sample cURL

curl --location --request POST "{{ROOT}}/v4/leave/approve-decline/" \
-H "Authorization: Bearer {{BEARER_TOKEN}}" \
-H "app-id:{{APP_ID}}" \
-H "Content-Type: application/json" \
-H "Accept-Encoding: gzip" \
-H "accept: */*" \
--data '{"leave_id": "123456","option_id": "1","approver_note": "sample"}'

Sample response

[
{
"object_name":"message",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
}
]
POST/v4/cancel
Route {root}/v4/leave/cancel
Request type BODY
User level STAFF
Requires authentication Yes
Response type Single

Parameters

Sample cURL

curl --location --request POST "{{ROOT}}/v4/leave/cancel/" \
-H "Authorization: Bearer {{BEARER_TOKEN}}" \
-H "app-id:{{APP_ID}}" \
-H "Content-Type: application/json" \
-H "Accept-Encoding: gzip" \
-H "accept: */*" \
--data '{"leave_id": "123456","cancellation_note": "sample","admin": false}'

Sample response

[
{
"object_name":"message",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
}
]


Don't have a WhosOff account yet?

Instantly reduce time spent on leave management with your FREE, no obligation trial today!
Sign up today and get until Sunday, 26th July 2026 to try the full service, for Free!

Get your instant FREE account today