Calls: {root}/{version}/leave type


POST/v4/create
Route {root}/v4/leave-type/create
Request type BODY
User level SUPER USER
Requires authentication Yes
Response type Single

Parameters

Sample cURL

curl --location --request POST "{{ROOT}}/v4/leave-type/create/" \
-H "Authorization: Bearer {{BEARER_TOKEN}}" \
-H "app-id:{{APP_ID}}" \
-H "Content-Type: application/json" \
-H "Accept-Encoding: gzip" \
-H "accept: */*" \
--data '{"name": "sample","code": "sample","colour": "sample","deduct_allowance_id": "0","requires_approval": false,"minimum_duration": "123456","allow_concurrent_requests": false,"notes_visible_to_id": "100","available_to_id": "100","seen_by_id": "100","min_notice_period": "123456","cancellation_period": "123456","include_department_level": false,"note_required": false,"email_request_id": "0","email_approve_id": "0","email_cancel_id": "0","status_id": "0","staff_url": "sample","staff_note": "sample","approver_url": "sample","approver_note": "sample","message": "sample"}'

Sample response

[
{
"object_name":"leave_type_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
}
]
POST/v4/retrieve
Route {root}/v4/leave-type/retrieve
Request type BODY
User level SUPER USER
Requires authentication Yes
Response type Array()

Parameters

Sample cURL

curl --location --request POST "{{ROOT}}/v4/leave-type/retrieve/" \
-H "Authorization: Bearer {{BEARER_TOKEN}}" \
-H "app-id:{{APP_ID}}" \
-H "Content-Type: application/json" \
-H "Accept-Encoding: gzip" \
-H "accept: */*" \
--data '{"status_id": "0"}'

Sample response

[
{
"object_name":"leave_type_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"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":"deduct_allowance_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"no",
"value":"0"
},
{
"name":"yes",
"value":"1"
},
{
"name":"no hours only",
"value":"2"
}]
"note":
},
{
"object_name":"requires_approval",
"type":"Boolean",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"consecutive_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"allow_concurrent_requests",
"type":"Boolean",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"minimum_duration",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"notes_visible_to_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"staff",
"value":"100"
},
{
"name":"approver",
"value":"200"
},
{
"name":"super user",
"value":"300"
},
{
"name":"super user with staff hub",
"value":"310"
}]
"note":
},
{
"object_name":"available_to_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"staff",
"value":"100"
},
{
"name":"approver",
"value":"200"
},
{
"name":"super user",
"value":"300"
},
{
"name":"super user with staff hub",
"value":"310"
}]
"note":
},
{
"object_name":"seen_by_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"staff",
"value":"100"
},
{
"name":"approver",
"value":"200"
},
{
"name":"super user",
"value":"300"
},
{
"name":"super user with staff hub",
"value":"310"
}]
"note":
},
{
"object_name":"min_notice_period",
"type":"minute(int32)",
"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":"include_department_level",
"type":"Boolean",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"note_required",
"type":"Boolean",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"email_request_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"none",
"value":"0"
},
{
"name":"staff approver notifier",
"value":"1"
},
{
"name":"staff only",
"value":"2"
},
{
"name":"staff approver",
"value":"3"
},
{
"name":"approver only",
"value":"4"
}]
"note":
},
{
"object_name":"email_approve_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"none",
"value":"0"
},
{
"name":"staff approver notifier",
"value":"1"
},
{
"name":"staff only",
"value":"2"
},
{
"name":"staff approver",
"value":"3"
},
{
"name":"approver only",
"value":"4"
}]
"note":
},
{
"object_name":"email_cancel_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"none",
"value":"0"
},
{
"name":"staff approver notifier",
"value":"1"
},
{
"name":"staff only",
"value":"2"
},
{
"name":"staff approver",
"value":"3"
},
{
"name":"approver only",
"value":"4"
}]
"note":
},
{
"object_name":"status_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"disabled",
"value":"0"
},
{
"name":"active",
"value":"1"
}]
"note":
},
{
"object_name":"staff_url",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"staff_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_url",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"message",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
}
]
GET/v4/retrieve-by-id
Route {root}/v4/leave-type/retrieve-by-id
Request type URL
User level SUPER USER
Requires authentication Yes
Response type Single
Sample call{root}/v0/leave-type/retrieve-by-id/12345678

Parameters

Sample cURL

curl --location --request GET "{{ROOT}}/v4/leave-type/retrieve-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_type_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"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":"deduct_allowance_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"no",
"value":"0"
},
{
"name":"yes",
"value":"1"
},
{
"name":"no hours only",
"value":"2"
}]
"note":
},
{
"object_name":"requires_approval",
"type":"Boolean",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"consecutive_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"allow_concurrent_requests",
"type":"Boolean",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"minimum_duration",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"notes_visible_to_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"staff",
"value":"100"
},
{
"name":"approver",
"value":"200"
},
{
"name":"super user",
"value":"300"
},
{
"name":"super user with staff hub",
"value":"310"
}]
"note":
},
{
"object_name":"available_to_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"staff",
"value":"100"
},
{
"name":"approver",
"value":"200"
},
{
"name":"super user",
"value":"300"
},
{
"name":"super user with staff hub",
"value":"310"
}]
"note":
},
{
"object_name":"seen_by_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"staff",
"value":"100"
},
{
"name":"approver",
"value":"200"
},
{
"name":"super user",
"value":"300"
},
{
"name":"super user with staff hub",
"value":"310"
}]
"note":
},
{
"object_name":"min_notice_period",
"type":"minute(int32)",
"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":"include_department_level",
"type":"Boolean",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"note_required",
"type":"Boolean",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"email_request_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"none",
"value":"0"
},
{
"name":"staff approver notifier",
"value":"1"
},
{
"name":"staff only",
"value":"2"
},
{
"name":"staff approver",
"value":"3"
},
{
"name":"approver only",
"value":"4"
}]
"note":
},
{
"object_name":"email_approve_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"none",
"value":"0"
},
{
"name":"staff approver notifier",
"value":"1"
},
{
"name":"staff only",
"value":"2"
},
{
"name":"staff approver",
"value":"3"
},
{
"name":"approver only",
"value":"4"
}]
"note":
},
{
"object_name":"email_cancel_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"none",
"value":"0"
},
{
"name":"staff approver notifier",
"value":"1"
},
{
"name":"staff only",
"value":"2"
},
{
"name":"staff approver",
"value":"3"
},
{
"name":"approver only",
"value":"4"
}]
"note":
},
{
"object_name":"status_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"disabled",
"value":"0"
},
{
"name":"active",
"value":"1"
}]
"note":
},
{
"object_name":"staff_url",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"staff_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_url",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"approver_note",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"message",
"type":"String",
"is_nullable":false,
"nest":null,
"custom":null
"note":
}
]
GET/v4/retrieve-for-user
Route {root}/v4/leave-type/retrieve-for-user
Request type URL
User level STAFF
Requires authentication Yes
Response type Array()
Sample call{root}/v0/leave-type/retrieve-for-user/?/

Parameters

Sample cURL

curl --location --request GET "{{ROOT}}/v4/leave-type/retrieve-for-user/?status_id=0option_id=0-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_type_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"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":"deduct_allowance_id",
"type":"custom",
"is_nullable":false,
"nest":null,
"custom":[
{
"name":"no",
"value":"0"
},
{
"name":"yes",
"value":"1"
},
{
"name":"no hours only",
"value":"2"
}]
"note":
},
{
"object_name":"consecutive_duration",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"minimum_duration",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"min_notice_period",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"note_required",
"type":"Boolean",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"can_request",
"type":"Boolean",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"can_record",
"type":"Boolean",
"is_nullable":false,
"nest":null,
"custom":null
"note":
},
{
"object_name":"cancellation_period",
"type":"minute(int32)",
"is_nullable":false,
"nest":null,
"custom":null
"note":
}
]
PUT/v4/update
Route {root}/v4/leave-type/update
Request type BODY
User level SUPER USER
Requires authentication Yes
Response type Single

Parameters

Sample cURL

curl --location --request PUT "{{ROOT}}/v4/leave-type/update/" \
-H "Authorization: Bearer {{BEARER_TOKEN}}" \
-H "app-id:{{APP_ID}}" \
-H "Content-Type: application/json" \
-H "Accept-Encoding: gzip" \
-H "accept: */*" \
--data '{"leave_type_id": "123456","name": "sample","code": "sample","colour": "sample","deduct_allowance_id": "0","requires_approval": false,"minimum_duration": "123456","allow_concurrent_requests": false,"notes_visible_to_id": "100","available_to_id": "100","seen_by_id": "100","min_notice_period": "123456","cancellation_period": "123456","include_department_level": false,"note_required": false,"email_request_id": "0","email_approve_id": "0","email_cancel_id": "0","status_id": "0","staff_url": "sample","staff_note": "sample","approver_url": "sample","approver_note": "sample","message": "sample"}'

Sample response

[
{
"object_name":"leave_type_id",
"type":"Int32",
"is_nullable":false,
"nest":null,
"custom":null
"note":
}
]
DELETE/v4/del
Route {root}/v4/leave-type/del
Request type URL
User level SUPER USER
Requires authentication Yes
Response type Single
Sample call{root}/v0/leave-type/del/12345678/true

Parameters

Sample cURL

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

Sample response

Standard response object returned, see API Overview for structure.


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