API Reference
Time

Get one leave item for one staff

get get /api/one ee leave details balance gets the details for one leave item 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 leave type id string required string required the unique marco identifier for the leave type example requests curl 'https //api marcopayroll com/api\ benkock8/api/one ee leave details balance?lang=en\&customer id=99\&customer system id=123\&leave type id=12' \\ h 'authorization $auth token'import requests url = "https //api marcopayroll com/api\ benkock8/api/one ee leave details balance?lang=en\&customer id=99\&customer system id=123\&leave type id=12" headers = { 'accept' 'application/json', 'authorization' 'your auth token' } response = requests get(url, headers=headers) print(response text){ "id" 518, "user" 1348, "customer id" 99, "leave type" { "id" 12, "country" "cn", "leave type name" "annual leave" "leave type notes" "employees should be entitled 14 consecutive days during the subsequent 12 months ", }, "entitlement" 10, "effective date" "2023 01 01", "carried expiry date" null, "carried" 0, "notes" "based on company policy, all employees in china will get at least 10 days of leave", "created at" 1678771660572, "updated at" 1687155340223, "deleted at" null, "last modified by" 33, "balance" 7, "taken" 3, "entitlement can use" 7, "carried can use" 0 } curl 'https //api marcopayroll com/api\ benkock8/api/one ee leave details balance?lang=en\&customer id=99\&customer system id=345\&leave type id=12' \\ h 'authorization $auth token'{ "id" 459, "user" 1938, "customer id" 99, "leave type" { "id" 12, "country" "cn", "leave type name" "annual leave" "leave type notes" "employees should be entitled 14 consecutive days during the subsequent 12 months ", }, "entitlement" 10, "effective date" "2023 01 01", "carried expiry date" "2023 05 31", "carried" 2, "notes" "based on company policy, all employees in china will get at least 10 days of leave", "created at" 1678771660572, "updated at" 1687155340223, "deleted at" null, "last modified by" 33, "balance" 11, "taken" 1, "entitlement can use" 10, "carried can use" 1 } response (200) id integer integer the unique marco identifier for the staff's 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 {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 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 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