v1
latestOpenAPI 3.0.02026-07-14800227.2 KBReturn a list of time-off requests.
This endpoint returns a paginated list of time off requests for a given date range.The maximum number of time off requests to retrieve once is 92 days, so the URL params from and to are mandatory. The URL params help to return more accurate results.
Query parameters
A date in format YYYY-MM-DD to indicate the starting point. It needs to be equals or less than the to param.
A date in format YYYY-MM-DD to indicate the ending point. It needs to be equals or greater than the from param.
This field allows to return only the time off requests for a given _userId.
This field allows to filter by time-off type Id.
This field allows to filter by the time-off request status.
Optional filter for pagination proposals. Determines the number of pages to skip when pagination is being used. If this value is not provided, by default the offset will be 1.
Optional filter for pagination proposals. The maximum number of rows to retrieve which determines the size of the page. If this value is not provided then the limit will be 50 users. The maximum value of the limit is 100 users per page. Only are valid the following limit values: 25, 50 and 100.
Headers
A valid bearer token.
Response
OK.
Example response
{
"data": [
{
"_id": "60a2db290da29e126a18789a",
"_userId": "80a2db290da29e126a18789b",
"_timeOffTypeId": "80a2db290da29e126a187809",
"_policyId": "80a2db290da29e126a187878",
"policyName": "Sick days",
"_policyType": "Day",
"status": "Submitted",
"from": "2022-03-10T00:00:00",
"to": "2022-03-12T00:00:00",
"duration": 2,
"workingTime": 2,
"_createdAt": "2022-03-10T08:00:00",
"hasAttachment": true,
"_type": "Submission"
},
{
"_id": "60a2db290da29e126a18789b",
"_userId": "80a2db290da29e126a18789b",
"_timeOffTypeId": "80a2db290da29e126a18789f",
"_policyId": "80a2db290da29e126a187897",
"policyName": "Holidays for tech team",
"_policyType": "Day",
"status": "Submitted",
"from": "2022-02-01T00:00:00",
"to": "2022-02-12T00:00:00",
"duration": 12,
"workingTime": 8,
"_createdAt": "2022-02-01T10:30:00",
"description": "I have requested days off",
"hasAttachment": false,
"_type": "Submission"
}
],
"metadata": {
"count": 2,
"offset": 1,
"limit": 50,
"total": 2
}
}