API Reference
Time

Get leave items for one staff

get get /api/ee leave details balance gets the details for all leave items for one staff , using the user id in your system (external id) the leave details includes leave type, leave balance, effective date, and more, which will be displayed in your language of choice request query parameters query parameters lang string required string required the language settings, formatted as an uppercase iso 639 1 code the leave item information will be displayed in the selected language valid values en, zh customer id string required string required the unique marco identifier for your company customer system id string required string required the staff's unique identifier in your company's system example 50 filter string optional string optional filter for deleted items marco retains deleted items in the system, and you can choose whether deleted items will be returned default {"is deleted"\ false} example requests curl 'https //api marcopayroll com/api\ benkock8/api/ee leave details balance?lang=en\&customer id=99\&customer system id=123\&filter={"is deleted"\ false}' \\ h 'authorization $auth token'import requests url = "https //api marcopayroll com/api\ benkock8/api/ee leave details balance?lang=en\&customer id=99\&customer system id=123\&filter={"is deleted"\ false}" headers = { 'accept' 'application/json', 'authorization' 'your auth token' } response = requests get(url, headers=headers) print(response text)\[ { "id" 1316, "user" 1685, "customer id" 99, "entitlement" 14, "effective date" "2023 01 01", "carried expiry date" "2023 07 01", "carried" 4, "notes" "", "created at" 1691114428862, "updated at" 1691119088462, "deleted at" null, "last modified by" 33, "leave type" { "id" 288, "country" "jp", "leave type name" "annual leave", "leave type notes" "annual leave should not exceed 14 days" }, "balance" 7, "taken" 5, "entitlement can use" 7 "carried can use" 0, }, { "id" 1357, "user" 1685, "customer id" 99, "entitlement" 10, "effective date" "2023 01 01", "carried expiry date" "", "carried" 0, "notes" "please attach your medical certificate when applying for sick leave", "created at" 1691114428859, "updated at" 1691114428859, "deleted at" null, "last modified by" 0, "leave type" { "id" 289, "country" "jp", "leave type name" "sick leave", "leave type notes" "paid sick leave cannot exceed 120 days" }, "balance" 6 5, "taken" 3 5, "entitlement can use" 6 5 "carried can use" 0, }, { "id" 1358, "user" 1685, "customer id" 99, "entitlement" 6, "effective date" "2023 01 01", "carried expiry date" "", "carried" 0, "notes" "please provide hr with your family registration certificate before applying for parental leave ", "created at" 1691114428860, "updated at" 1691114428860, "deleted at" null, "last modified by" 0, "leave type" { "id" 531, "country" "jp", "leave type name" "parental leave", "leave type notes" "for parents with children below 12 years old " }, "balance" 6, "taken" 0, "entitlement can use" 6 "carried can use" 0, } ] response (200) a successful response will return an array of objects each object contains one leave item's details for the staff id integer integer the unique marco identifier for the leave item user integer integer the unique marco identifier for the staff customer id integer integer the unique marco identifier for the staff's company entitlement integer integer the entitlement amount for the leave item effective date string string the effective date for the leave item's entitlement, formatted as yyyy mm dd carried expiry date string string the expiry date for the leave item's carried balance, formatted as yyyy mm dd carried integer integer the carried over amount for the leave item notes string string company notes for the leave item created at integer integer unix timestamp for the leave item's creation date updated at integer integer unix timestamp for the leave item's u pdate date deleted at integer integer unix timestamp for the leave item's d eletion date last modified by integer integer the unique marco identifier for the user who last modified the leave item details {leave type} object object leave type metadata {leave type} id integer integer the unique marco identifier for the leave type {leave type} country integer integer the unique marco identifier for the leave type's associated country {leave type} leave type name integer integer the leave type name example sick leave {leave type} leave type notes string string the notes for the leave type balance integer integer the total balance available for the leave item taken integer integer the total number of leave days consumed for the leave item entitlement can use integer integer the amount of available leave, excluding the carried balance carried can use integer integer the amount of available carried balance