---
title: Edit time-off record
slug: api/edit-time-off-record
description: API reference for POST endpoint: Edit time-off record.
docTags: 
createdAt: 2023-12-01T08:55:59.151Z
---

:::hint{type="success"}
<font color="#3b9f0f">**POST**</font>**&#x20;/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**

***

<font color="#00a2e9">**Body parameters**</font>

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**ee\_time\_off\_id** <font color="#a7b4c3">integer Required</font>
:::

:::VerticalSplitItem
The unique Marco identifier for the time-off record.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**start\_date** <font color="#a7b4c3">string Required</font>
:::

:::VerticalSplitItem
The start date of the leave request, formatted as YYYY-MM-DD.

Example: 2023-12-31
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**end\_date** <font color="#a7b4c3">string Required</font>
:::

:::VerticalSplitItem
The end date of the leave request, formatted as YYYY-MM-DD.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**total\_days** <font color="#a7b4c3">string Required</font>
:::

:::VerticalSplitItem
The total number of days in the leave request.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**notes** <font color="#a7b4c3">string Optional</font>
:::

:::VerticalSplitItem
The notes for the time-off record. Typically contains the reason for the leave application.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**reject\_notes** <font color="#a7b4c3">string </font><font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The rejection notes for the time-off record, if rejected.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**decision** <font color="#a7b4c3">string</font> <font color="#a7b4c3">Optional</font>
:::

:::VerticalSplitItem
The decision for the leave request.

Valid values: Approve, Reject
:::
::::

***



**Example Requests**

***

::::CodeDrawer{title="Example" isResponseExpanded="true"}
:::CodeblockTabsExamples
```curl
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&nbsp;infection",
  "reject_notes": "",
  "total_days": "2",
  "decision": "Approve"
}'
```

```python
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&nbsp;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)
```
:::

:::CodeblockTabsResponses
```javascript
{
  "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&nbsp;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)**

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**id** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The unique Marco identifier for the staff's time-off record.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**user** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The unique Marco identifier for the staff.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**customer\_id** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The staff's unique identifier in your company's system.

Example: 50
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**leave\_type** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The unique Marco identifier for the leave type.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**approver** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The unique Marco identifier for the approver.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**total\_days** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The total number of days in the leave request.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**start\_date** <font color="#a7b4c3">string</font>
:::

:::VerticalSplitItem
The start date of the leave request, formatted as YYYY-MM-DD.

Example: 2023-12-31
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**end\_date** <font color="#a7b4c3">string</font>
:::

:::VerticalSplitItem
The end date of the leave request, formatted as YYYY-MM-DD.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**notes** <font color="#a7b4c3">string</font>
:::

:::VerticalSplitItem
The notes for the time-off record. Typically contains the reason for the leave application.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**reject\_notes** <font color="#a7b4c3">string</font>
:::

:::VerticalSplitItem
The rejection notes for the time-off record, if rejected.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**decision\_time** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
Unix timestamp for the approval decision date.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**decision** <font color="#a7b4c3">string</font>
:::

:::VerticalSplitItem
The decision for the leave request.

Valid values: Approve, Reject
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**doc\_list** <font color="#a7b4c3">array\[string\]</font>
:::

:::VerticalSplitItem
The supporting documents for the leave application.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**created\_at** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
Unix timestamp for the time-off record's creation date.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**updated\_at** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
Unix timestamp for the time-off record's update date.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**deleted\_at** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
Unix timestamp for the time-off record's deletion date.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**last\_modified\_by** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The unique Marco identifier for the user who last modified the leave item details.
:::
::::

***

