API Reference
Time
Edit time-off record
post post /api/edit ee time off edits an existing time off record for one staff, using the time off record id this endpoint can be used to approve or reject leave requests request body parameters body parameters ee time off id integer required integer required the unique marco identifier for the time off record start date string required string required the start date of the leave request, formatted as yyyy mm dd example 2023 12 31 end date string required string required the end date of the leave request, formatted as yyyy mm dd total days string required string required the total number of days in the leave request notes string optional string optional the notes for the time off record typically contains the reason for the leave application reject notes string string optional optional the rejection notes for the time off record, if rejected decision string string optional optional the decision for the leave request valid values approve, reject example requests curl x post 'https //api marcopayroll com/api\ benkock8/api/edit ee time off' \\ h 'content type application/json' \\ h 'authorization $auth token' \\ d '{ "ee time off id" "1111", "start date" "2022 10 08", "end date" "2022 10 09", "notes" "stomach\ infection", "reject notes" "", "total days" "2", "decision" "approve" }'import requests url = "https //api marcopayroll com/api\ benkock8/api/edit ee time off" payload={ "ee time off id" "1111", "start date" "2022 10 08", "end date" "2022 10 09", "notes" "stomach\ infection", "reject notes" "", "total days" "2", "decision" "approve" } headers = { "accept" "application/json", "authorization" "your auth token" } response = requests post(url, headers=headers, data=payload) print(response text){ "id" 1111, "user" 55, "customer id" 99, "leave type" 2, "approver" 326, "total days" 2, "start date" "2022 10 08", "end date" "2022 10 09", "notes" "stomach\ infection", "reject notes" "", "decision time" 1666145444364, "decision" "approve", "doc list" \[], "created at" 1665564058831, "updated at" 1666145444364, "deleted at" null, "last modified by" 326 } response (200) id integer integer the unique marco identifier for the staff's time off record user integer integer the unique marco identifier for the staff customer id integer integer the staff's unique identifier in your company's system example 50 leave type integer integer the unique marco identifier for the leave type approver integer integer the unique marco identifier for the approver total days integer integer the total number of days in the leave request start date string string the start date of the leave request, formatted as yyyy mm dd example 2023 12 31 end date string string the end date of the leave request, 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 integer integer unix timestamp for the approval decision date decision string string the decision for the leave request 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 last modified by integer integer the unique marco identifier for the user who last modified the leave item details