Skip to Content
PeopleForce
Leaves

Deprecated

Company API v2 is deprecated. It no longer receives changes and will stop being supported, so move integrations to Company API v3, which serves every v2 path under /api/public/v3.

List all pending leave requests

Deprecated

GET
/api/public/v2/leave_requests/pending

Query Parameters

page?integer

Which page of results to return. Defaults to 1.

Formatint32
Range1 <= value

Response Body

A page of pending leave requests.

application/json
  1. response
data*array<>
metadata*
Example Request
curl -X GET 'https://app.peopleforce.io/api/public/v2/leave_requests/pending'
Example Response
{  "data": [    {      "id": 0,      "employee_id": 0,      "leave_type_id": 0,      "leave_type": "string",      "state": "pending",      "amount": "string",      "hours": "string",      "tracking_time_in": "hours",      "on_demand": true,      "starts_on": "2019-08-24",      "ends_on": "2019-08-24",      "comment": "string",      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "attachment_url": "string",      "attachments": [        {          "filename": "string",          "url": "string",          "expires_at": "2019-08-24T14:15:22Z"        }      ],      "employee": {        "id": 0,        "first_name": "string",        "last_name": "string",        "email": "string"      },      "entries": [        {          "date": "2019-08-24",          "amount": "string",          "starts_at": "2019-08-24T14:15:22Z",          "ends_at": "2019-08-24T14:15:22Z"        }      ],      "leave_type_policy": {        "name": "string",        "visibility": "public",        "activity_type": "not_working_paid"      },      "approvals": [        {          "state": "queued",          "assigned_to": {            "id": 0,            "full_name": "string"          }        }      ]    }  ],  "metadata": {    "pagination": {      "page": 0,      "pages": 0,      "count": 0,      "items": 0    }  }}