VERSION: 4.0, DEPRECATED: NO
POSTcreate
Params
curl --location --request POST "{{ROOT}}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,"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"}'
[ { "object_name":"leave_type_id", "type":"Int32", "is_nullable":false, "nest":null, "custom":null "note": }]
POSTretrieve
curl --location --request POST "{{ROOT}}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"}'
[ { "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":"notes_visible_to_id", "type":"custom", "is_nullable":false, "nest":null, "custom":[ { "name":"staff", "value":"100" }, { "name":"approver", "value":"200" }, { "name":"superuser", "value":"300" }, { "name":"poweruser", "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":"superuser", "value":"300" }, { "name":"poweruser", "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":"superuser", "value":"300" }, { "name":"poweruser", "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": }]
GETretrieve by id
Sample call: {root}/v4/leave-type/retrieve-by-id/12345678
curl --location --request GET "{{ROOT}}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: */*" \
GETretrieve for user
Sample call: {root}/v4/leave-type/retrieve-for-user
curl --location --request GET "{{ROOT}}leave-type/retrieve-for-user/-H "Authorization: Bearer {{BEARER_TOKEN}}" \ -H "app-id:{{APP_ID}}" \ -H "Content-Type: application/json" \ -H "Accept-Encoding: gzip" \ -H "accept: */*" \
[ { "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":"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": }]
PUTupdate
curl --location --request PUT "{{ROOT}}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,"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"}'
DELETEdel
Sample call: {root}/v4/leave-type/del/12345678/true
curl --location --request DELETE "{{ROOT}}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: */*" \
Standard response object returned, see API Overview for structure.
[]
INSTANTLY REDUCE TIME SPENT ON LEAVE MANAGEMENT
Start Your Free Trial