Edit time-off record
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
ee_time_off_id integer Required
The unique Marco identifier for the time-off record.
start_date string Required
The start date of the leave request, formatted as YYYY-MM-DD.
Example: 2023-12-31
end_date string Required
The end date of the leave request, formatted as YYYY-MM-DD.
total_days string Required
The total number of days in the leave request.
notes string Optional
The notes for the time-off record. Typically contains the reason for the leave application.
reject_notes string Optional
The rejection notes for the time-off record, if rejected.
decision string Optional
The decision for the leave request.
Valid values: Approve, Reject
Example Requests
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)
Response (200)
id integer
The unique Marco identifier for the staff's time-off record.
user integer
The unique Marco identifier for the staff.
customer_id integer
The staff's unique identifier in your company's system.
Example: 50
leave_type integer
The unique Marco identifier for the leave type.
approver integer
The unique Marco identifier for the approver.
total_days integer
The total number of days in the leave request.
start_date string
The start date of the leave request, formatted as YYYY-MM-DD.
Example: 2023-12-31
end_date string
The end date of the leave request, formatted as YYYY-MM-DD.
notes string
The notes for the time-off record. Typically contains the reason for the leave application.
reject_notes string
The rejection notes for the time-off record, if rejected.
decision_time integer
Unix timestamp for the approval decision date.
decision string
The decision for the leave request.
Valid values: Approve, Reject
doc_list array[string]
The supporting documents for the leave application.
created_at integer
Unix timestamp for the time-off record's creation date.
updated_at integer
Unix timestamp for the time-off record's update date.
deleted_at integer
Unix timestamp for the time-off record's deletion date.
last_modified_by integer
The unique Marco identifier for the user who last modified the leave item details.