API Reference
Time

Get leave items

get get /api/bulk ee leave details balance gets the details for all leave items for multiple staff , using the user ids 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 integer required integer 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 example requests curl 'https //api marcopayroll com/api\ benkock8/api/bulk ee leave details balance?lang=en\&customer id=99\&customer system id=\[29, 31]' \\ h 'authorization $auth token'import requests url = "https //api marcopayroll com/api\ benkock8/api/bulk ee leave details balance?lang=en\&customer id=99\&customer system id=\[29, 31]" headers = { 'accept' 'application/json', 'authorization' 'your auth token' } response = requests get(url, headers=headers) print(response text)\[ { "leaves" \[], "customer system id" "31" }, { "leaves" \[ { "id" 321, "user" 561, "customer id" 33, "entitlement" 1, "effective date" "2022 02 01", "carried expiry date" "2022 09 30", "carried" 1, "notes" "", "created at" 1664436985819, "updated at" 1664436985819, "deleted at" null, "last modified by" 808, "leave type" { "id" 24, "country" 178, "display order" 1, "iso code" "pk", "dictionary" \[ { "key" "data", "value" "annual leave" }, { "key" "notes", "value" "an employee is entitled to 14 calendar days paid annual leave, after completion of 12 months of continuous service factory workers are paid half of the pay due for annual leave before start of the leave " } ] }, "leaves" { "balance" 3, "carried" 1, "entitlement" 1, "taken" 2, "expired" 3, "carried can use" 0, "entitlement can use" 3 } }, { "id" 68, "user" 561, "customer id" 33, "entitlement" 8, "effective date" "2022 01 01", "carried expiry date" "2022 01 01", "carried" 0, "notes" "", "created at" 1663039559952, "updated at" 1663039559953, "deleted at" null, "last modified by" 326, "leave type" { "id" 25, "country" 178, "display order" 2, "iso code" "pk", "dictionary" \[ { "key" "data", "value" "sick leave" }, { "key" "notes", "value" "the employee certified by a medical practitioner is entitled to paid sick leave for a period of 121 days per year in case of ordinary ailments, and 365 days per year in case of cancer or tuberculosis during the leave, the employer pays 100% of the regular wage for cancer or tuberculosis or work related injury, and 75% of the regular wage for the rest of the diseases " } ] }, "leaves" { "balance" 8, "carried" 0, "entitlement" 8, "taken" 0, "expired" 0, "carried can use" 0, "entitlement can use" 8 } }, { "id" 67, "user" 561, "customer id" 33, "entitlement" 10, "effective date" "2022 01 01", "carried expiry date" "2022 01 01", "carried" 0, "notes" "", "created at" 1663039559928, "updated at" 1663039559928, "deleted at" null, "last modified by" 326, "leave type" { "id" 28, "country" 178, "display order" 5, "iso code" "pk", "dictionary" \[ { "key" "data", "value" "casual leave" }, { "key" "notes", "value" "the employee is entitled to 10 days of paid casual leave per year, the unused casual leaves are not able to be carried forward or cashed out " } ] }, "leaves" { "balance" 10, "carried" 0, "entitlement" 10, "taken" 0, "expired" 0, "carried can use" 0, "entitlement can use" 10 } } ], "customer system id" "29" } ] response (200) a successful response will return an array of objects each object contains all the leave items for one staff leaves array\[object] array\[object] an array of all active leave items for one staff leaves id integer integer the unique marco identifier for the leave item leaves user integer integer the unique marco identifier for the staff leaves customer id integer integer the unique marco identifier for the staff's company leaves entitlement integer integer the entitlement amount for the leave item leaves effective date string string the effective date for the leave item's entitlement , formatted as yyyy mm dd leaves carried expiry date string string the expiry date for the leave item's carried balance , formatted as yyyy mm dd leaves carried integer integer the carried over amount for the leave item leaves notes string string company notes for the leave item leaves created at integer integer unix timestamp for the leave item's creation date leaves updated at integer integer unix timestamp for the leave item's update date leaves deleted at integer integer unix timestamp for the leave item's deletion date leaves last modified by integer integer the unique marco identifier for the user who last modified the leave item details leaves {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} display order integer integer the display order for the leave type, when displayed in a list {leave type} iso code string string the associated country for the leave type, formatted as an iso alpha 2 code example gb {leave type} dictionary array\[object] array\[object] contains the leave type name and its corresponding notes dictionary key string string the type of data valid values data, notes "data" stores the leave type name, while "notes" stores the leave type notes dictionary value string string the field value for the data or notes example sick leave leaves the leave object docid\ fdhajys0v 8oqcypctmzs object object leave item metadata, such as the leave balances and consumed leave days customer system id string string the staff's unique identifier in your company's system example 50