Add time-off record
\<font color="#3b9f0f">post\</font> /api/apply ee time off adds a time off record to one staff, using the user id in your system (external id) the time off record can be added in your language of choice request \<font color="#00a2e9">body parameters\</font> 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 leave type \<font color="#a7b4c3">string required\</font> the leave type example sick leave 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 type information should be sent in the selected language valid values en, zh country \<font color="#a7b4c3">string required\</font> the country where the leave will be taken, formatted as an iso alpha 2 code https //www iban com/country codes example jp start date \<font color="#a7b4c3">string required\</font> the start date of the leave request, formatted as yyyy mm dd example 2023 12 31 end date \<font color="#a7b4c3">string required\</font> the end date of the leave request, formatted as yyyy mm dd total days \<font color="#a7b4c3">string required\</font> the total number of days in the leave request notes \<font color="#a7b4c3">string optional\</font> the notes for the time off record typically contains the reason for the leave application decision \<font color="#a7b4c3">string\</font> \<font color="#a7b4c3">optional\</font> the decision for the leave request valid values approve, reject example requests curl x post 'https //api marcopayroll com/api\ benkock8/api/apply ee time off' \\ h 'content type application/json' \\ h 'authorization $auth token' \\ d '{ "customer id" "99", "customer system id" "5555", "leave type" "sick leave", "lang" "en", "country" "my", "start date" "2022 10 08", "end date" "2022 10 09", "total days" "2", "notes" "stomach\ infection", "decision" "" }'import requests url = "https //api marcopayroll com/api\ benkock8/api/apply ee time off" payload={ "customer id" "99", "customer system id" "5555", "leave type" "sick leave", "lang" "en", "country" "my", "start date" "2022 10 08", "end date" "2022 10 09", "total days" "2", "notes" "stomach\ infection", "decision" "" } headers = { "accept" "application/json", "authorization" "your auth token" } response = requests post(url, headers=headers, data=payload) print(response text){ "time off data" { "id" 1111, "user" 55, "customer id" 99, "leave type" 2, "approver" 0, "total days" 2, "start date" "2022 10 08", "end date" "2022 10 09", "notes" "stomach\ infection", "reject notes" "", "decision time" 1665564058828, "decision" "", "doc list" \[], "created at" 1665564058831, "updated at" 1665564058831, "deleted at" null, "last modified by" 123 }, "message" "successfully added" } response (200) {time off data} \<font color="#a7b4c3">object\</font> t he time off record details {time off data} id \<font color="#a7b4c3">integer\</font> the unique marco identifier for the staff's time off record {time off data} user \<font color="#a7b4c3">integer\</font> the unique marco identifier for the staff {time off data} customer id \<font color="#a7b4c3">integer\</font> the staff's unique identifier in your company's system example 50 {time off data} leave type \<font color="#a7b4c3">integer\</font> the unique marco identifier for the leave type {time off data} approver \<font color="#a7b4c3">integer\</font> the unique marco identifier for the approver {time off data} total days \<font color="#a7b4c3">integer\</font> the total number of days in the leave request {time off data} start date \<font color="#a7b4c3">string\</font> the start date of the leave request, formatted as yyyy mm dd example 2023 12 31 {time off data} end date \<font color="#a7b4c3">string\</font> the end date of the leave request, formatted as yyyy mm dd {time off data} notes \<font color="#a7b4c3">string\</font> the notes for the time off record typically contains the reason for the leave application {time off data} reject notes \<font color="#a7b4c3">string\</font> the rejection notes for the time off record, if rejected {time off data} decision \<font color="#a7b4c3">string\</font> the decision for the leave request valid values approve, reject {time off data} doc list \<font color="#a7b4c3">array\[string]\</font> the supporting documents for the leave application {time off data} created at \<font color="#a7b4c3">integer\</font> unix timestamp for the time off record's creation date {time off data} updated at \<font color="#a7b4c3">integer\</font> unix timestamp for the time off record's update date {time off data} deleted at \<font color="#a7b4c3">integer\</font> unix timestamp for the time off record's deletion date {time off data} last modified by \<font color="#a7b4c3">integer\</font> the unique marco identifier for the user who last modified the leave item details message \<font color="#a7b4c3">string\</font> the endpoint response status