Get time-off records for one staff
\<font color="#2166ae">get \</font> /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 \<font color="#00a2e9">query parameters\</font> lang \<font color="#a7b4c3">string required\</font> the language settings, formatted as an uppercase iso 639 1 code https //en wikipedia org/wiki/list of iso 639 1 codes the leave item information will be displayed in the selected language valid values en, zh customer id \<font color="#a7b4c3">integer required\</font> the unique marco identifier for your company customer system id \<font color="#a7b4c3">string required\</font> the staff's unique identifier in your company's system example 50 filter \<font color="#a7b4c3">string optional\</font> 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 \<font color="#a7b4c3">string optional\</font> 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 \<font color="#a7b4c3">string \</font> \<font color="#a7b4c3">optional\</font> 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 \<font color="#a7b4c3">integer\</font> the unique marco identifier for the staff's time off record customer id \<font color="#a7b4c3">integer\</font> the unique marco identifier for the staff's company approver \<font color="#a7b4c3">integer\</font> the u nique marco identifier for the user who approved the time off record total days \<font color="#a7b4c3">integer\</font> the number of leave days in the time off record start date \<font color="#a7b4c3">string\</font> the start date for the time off record , formatted as yyyy mm dd end date \<font color="#a7b4c3">string\</font> the end date for the time off record , formatted as yyyy mm dd notes \<font color="#a7b4c3">string\</font> the notes for the time off record typically contains the reason for the leave application reject notes \<font color="#a7b4c3">string\</font> the rejection notes for the time off record, if rejected decision time \<font color="#a7b4c3">string\</font> unix timestamp for the approval decision decision \<font color="#a7b4c3">string\</font> the approval decision valid values approve, reject doc list \<font color="#a7b4c3">array\[string]\</font> the supporting documents for the leave application created at \<font color="#a7b4c3">integer\</font> unix timestamp for the time off record's creation date updated at \<font color="#a7b4c3">integer\</font> unix timestamp for the time off record's update date deleted at \<font color="#a7b4c3">integer\</font> unix timestamp for the time off record's deletion date created by \<font color="#a7b4c3">integer\</font> the unique marco identifier for the user who created the time off record last modified by \<font color="#a7b4c3">integer\</font> the unique marco identifier for the user who last modified the time off record {leave type} \<font color="#a7b4c3">object\</font> the leave type metadata {leave type} id \<font color="#a7b4c3">integer\</font> the unique marco identifier for the leave type {leave type} country \<font color="#a7b4c3">integer\</font> the unique marco identifier for the leave type's associated country {leave type} display order \<font color="#a7b4c3">integer\</font> the display order for the leave type, when displayed in a list {leave type} day type \<font color="#a7b4c3">string\</font> the day type for the leave type valid values calendar, working {leave type} minimum days \<font color="#a7b4c3">integer\</font> minimum amount of days that should be granted to the staff {leave type} is annual leave \<font color="#a7b4c3">boolean\</font> whether the leave type is an annual leave {leave type} created at \<font color="#a7b4c3">integer\</font> unix timestamp for the leave type's creation date {leave type} updated at \<font color="#a7b4c3">integer\</font> unix timestamp for the leave type's update date {leave type} last modified by \<font color="#a7b4c3">integer\</font> the unique marco identifier for the user who last modified the leave type {leave type} deleted at \<font color="#a7b4c3">integer\</font> unix timestamp for the leave type's deletion date {leave type} leave type name \<font color="#a7b4c3">integer\</font> the leave type name example sick leave {leave type} leave type notes \<font color="#a7b4c3">string\</font> the notes for the leave type {user} \<font color="#a7b4c3">object\</font> the staff's details {user} id \<font color="#a7b4c3">integer\</font> the unique marco identifier for the staff {user} name \<font color="#a7b4c3">integer\</font> the staff's full name {user} email \<font color="#a7b4c3">integer\</font> 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 \<font color="#a7b4c3">string\</font> the staff's unique identifier in your company's system example 50 {user} deleted at \<font color="#a7b4c3">integer\</font> unix timestamp for the time off record's deletion date