API Reference
Time
Get time-off records for one staff
get get /api/ee time off gets time off records for one staff , using the user id in your system (external id) the information 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 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} search start date string optional string optional start date for the date range filter, formatted as yyyy/mm/dd only time off records after the selected start date will be returned search end date string string optional optional end date for the date range filter, formatted as yyyy/mm/dd only time off records before the selected end date will be returned example requests curl 'https //api marcopayroll com/api\ benkock8/api/ee time off?customer id=99\&lang=en\&customer system id=123\&filter={"is deleted"\ false}\&search start date=2023/01/01\&search end date=2023/12/31' \\ h 'authorization $auth token'import requests url = "https //api marcopayroll com/api\ benkock8/api/ee time off?customer id=99\&lang=en\&customer system id=123\&filter={"is deleted"\ false}\&search start date=2023/01/01\&search end date=2023/12/31" headers = { 'accept' 'application/json', 'authorization' 'your auth token' } response = requests get(url, headers=headers) print(response text)\[ { "id" 474, "customer id" 99, "approver" 0, "total days" 1, "start date" "2023 03 03", "end date" "2023 03 03", "notes" "", "reject notes" "", "decision time" null, "decision" "", "doc list" \[], "created at" 1679661912563, "updated at" 1679661912563, "deleted at" null, "created by" 0, "last modified by" 1348, "leave type" { "id" 12, "country" 15, "display order" 1, "day type" "", "minimum days" 0, "is annual leave" true, "created at" 1667530650560, "updated at" 1667530650560, "last modified by" 33, "deleted at" null, "leave type name" "annual leave", "leave type notes" "employees should be entitled 14 consecutive days during the subsequent 12 months " }, "user" { "id" 1348, "name" "mary jane", "email" "mary jane\@mail com", "pic" null, "customer system id" "123", "deleted at" null } }, { "id" 473, "customer id" 99, "approver" 1307, "total days" 2, "start date" "2023 03 01", "end date" "2023 03 02", "notes" "", "reject notes" "", "decision time" 1679690638000, "decision" "approve", "doc list" \[], "created at" 1679661838905, "updated at" 1679661838906, "deleted at" null, "created by" 0, "last modified by" 1307, "leave type" { "id" 12, "country" 15, "display order" 1, "day type" "", "minimum days" 0, "is annual leave" true, "created at" 1667530650560, "updated at" 1667530650560, "last modified by" 33, "deleted at" null, "leave type name" "annual leave", "leave type notes" "employees should be entitled 14 consecutive days during the subsequent 12 months " }, "user" { "id" 1348, "name" "mary jane", "email" "mary jane\@mail com", "pic" null, "customer system id" "123", "deleted at" null } }, { "id" 452, "customer id" 99, "approver" 0, "total days" 2, "start date" "2023 10 08", "end date" "2023 10 09", "notes" "", "reject notes" "", "decision time" 1678779083230, "decision" "", "doc list" \[], "created at" 1678779083232, "updated at" 1678779083232, "deleted at" null, "created by" 0, "last modified by" 1307, "leave type" { "id" 13, "country" 15, "display order" 2, "day type" "", "minimum days" 10, "is annual leave" false, "created at" 1667530650560, "updated at" 1667530650560, "last modified by" 33, "deleted at" null, "leave type name" "sick leave", "leave type notes" "employees are entitled to sick leave after 3 months of working " }, "user" { "id" 1348, "name" "mary jane", "email" "mary jane\@mail com", "pic" null, "customer system id" "123", "deleted at" null } }, { "id" 457, "customer id" 99, "approver" 654, "total days" 2, "start date" "2023 10 08", "end date" "2023 10 09", "notes" "", "reject notes" "please include details for the leave application", "decision time" 1678956394828, "decision" "reject", "doc list" \[], "created at" 1678956371624, "updated at" 1678956371624, "deleted at" null, "created by" 0, "last modified by" 654, "leave type" { "id" 12, "country" 15, "display order" 1, "day type" "", "minimum days" 0, "is annual leave" true, "created at" 1668493783625, "updated at" 1668493783625, "last modified by" 4, "deleted at" null, "leave type name" "annual leave", "leave type notes" "employees should be entitled 14 consecutive days during the subsequent 12 months " }, "user" { "id" 1348, "name" "mary jane", "email" "mary jane\@mail com", "pic" null, "customer system id" "123", "deleted at" null } }, { "id" 544, "customer id" 99, "approver" 0, "total days" 2, "start date" "2023 10 08", "end date" "2023 10 09", "notes" "", "reject notes" "", "decision time" 1685516501705, "decision" "", "doc list" \[], "created at" 1685516501707, "updated at" 1685516501707, "deleted at" null, "created by" 0, "last modified by" 1307, "leave type" { "id" 104, "country" 61, "display order" 1, "day type" "working", "minimum days" 7, "is annual leave" true, "created at" 1668493783625, "updated at" 1668493783625, "last modified by" 4, "deleted at" null, "leave type name" "annual leave", "leave type notes" "employees are entitled to minimum 7 days, with 1 additional day for each year " }, "user" { "id" 1348, "name" "mary jane", "email" "mary jane\@mail com", "pic" null, "customer system id" "123", "deleted at" null } } ] response (200) a successful response will return an array of objects each object contains one time off record for the staff id integer integer the unique marco identifier for the staff's time off record customer id integer integer the unique marco identifier for the staff's company approver integer integer the u nique marco identifier for the user who approved the time off record total days integer integer the number of leave days in the time off record start date string string the start date for the time off record , formatted as yyyy mm dd end date string string the end date for the time off record , formatted as yyyy mm dd notes string string the notes for the time off record typically contains the reason for the leave application reject notes string string the rejection notes for the time off record, if rejected decision time string string unix timestamp for the approval decision decision string string the approval decision valid values approve, reject doc list array\[string] array\[string] the supporting documents for the leave application created at integer integer unix timestamp for the time off record's creation date updated at integer integer unix timestamp for the time off record's update date deleted at integer integer unix timestamp for the time off record's deletion date created by integer integer the unique marco identifier for the user who created the time off record last modified by integer integer the unique marco identifier for the user who last modified the time off record {leave type} object object the 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} day type string string the day type for the leave type valid values calendar, working {leave type} minimum days integer integer minimum amount of days that should be granted to the staff {leave type} is annual leave boolean boolean whether the leave type is an annual leave {leave type} created at integer integer unix timestamp for the leave type's creation date {leave type} updated at integer integer unix timestamp for the leave type's update date {leave type} last modified by integer integer the unique marco identifier for the user who last modified the leave type {leave type} deleted at integer integer unix timestamp for the leave type's deletion date {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 {user} object object the staff's details {user} id integer integer the unique marco identifier for the staff {user} name integer integer the staff's full name {user} email integer integer the staff's email, used to log into marco {user} pic the staff's profile picture returned as a null value {user} customer system id string string the staff's unique identifier in your company's system example 50 {user} deleted at integer integer unix timestamp for the time off record's deletion date