---
title: Get time-off records for one staff
slug: api/get-time-off-records-for-one-staff
description: API reference for GET endpoint: Get time-off-records for one staff.
createdAt: 2023-11-30T03:00:33.129Z
---

:::hint{type="info"}
<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.

&#x20;

**Request**

***

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

***

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

:::VerticalSplitItem
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
:::
::::

***

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

:::VerticalSplitItem
The unique Marco identifier for your company.
:::
::::

***

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

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

Example: 50
:::
::::

***

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

:::VerticalSplitItem
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}
:::
::::

***

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

:::VerticalSplitItem
Start date for the date range filter, formatted as YYYY/MM/DD. Only time-off records after the selected start date will be returned.
:::
::::

***

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

:::VerticalSplitItem
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**

***

::::CodeDrawer{title="Example" isResponseExpanded="true"}
:::CodeblockTabsExamples
```curl
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'
```

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

:::CodeblockTabsResponses
```javascript
[
  {
    "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.

::::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
**customer\_id** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The unique Marco identifier for the staff's company.
:::
::::

***

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

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

***

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

:::VerticalSplitItem
The number of leave days in the time-off record.
:::
::::

***

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

:::VerticalSplitItem
The start date for the time-off record, formatted as YYYY-MM-DD.
:::
::::

***

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

:::VerticalSplitItem
The end date for the time-off record, 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">string</font>****
:::

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

***

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

:::VerticalSplitItem
The approval decision.

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
**created\_by** <font color="#a7b4c3">integer</font>
:::

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

***

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

:::VerticalSplitItem
The unique Marco identifier for the user who last modified the time-off record.
:::
::::

***

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

:::VerticalSplitItem
The leave type metadata.
:::
::::

***

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

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

***

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

:::VerticalSplitItem
The unique Marco identifier for the leave type's associated country.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;leave\_type}.**display\_order** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The display order for the leave type, when displayed in a list.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;leave\_type}.**day\_type** <font color="#a7b4c3">string</font>
:::

:::VerticalSplitItem
The day type for the leave type.

Valid values: Calendar, Working
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;leave\_type}.**minimum\_days** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
Minimum amount of days that should be granted to the staff.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;leave\_type}.**is\_annual\_leave** <font color="#a7b4c3">boolean</font>
:::

:::VerticalSplitItem
Whether the leave type is an annual leave.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;leave\_type}.**created\_at** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
Unix timestamp for the leave type's creation date.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;leave\_type}.**updated\_at** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
Unix timestamp for the leave type's update date.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;leave\_type}.**last\_modified\_by** <font color="#a7b4c3">integer</font>
:::

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

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;leave\_type}.**deleted\_at** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
Unix timestamp for the leave type's deletion date.
:::
::::

***

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

:::VerticalSplitItem
The leave type name.

Example: Sick Leave
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;leave\_type}.**leave\_type\_notes** <font color="#a7b4c3">string</font>
:::

:::VerticalSplitItem
The notes for the leave type.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
**&#x7B;user}** <font color="#a7b4c3">object</font>
:::

:::VerticalSplitItem
The staff's details.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;user}.**id** <font color="#a7b4c3">integer</font>
:::

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

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;user}.**name** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The staff's full name.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;user}.**email** <font color="#a7b4c3">integer</font>
:::

:::VerticalSplitItem
The staff's email, used to log into Marco.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;user}.**pic**

:::

:::VerticalSplitItem
The staff's profile picture. Returned as a null value.
:::
::::

***

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
&#x7B;user}.**customer\_system\_id** <font color="#a7b4c3">string</font>
:::

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

Example: 50
:::
::::

***

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

:::

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

***

