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.

Assign a leave policy to an employee

Deprecated

POST
/api/public/v2/employees/{employee_id}/leave_types

Path Parameters

employee_id*integer
Formatint64

Request Body

application/json
  1. body
leave_type_id*integer
Formatint64
leave_type_policy_id*integer
Formatint64
effective_on*string
Formatdate

Response Body

The created leave policy.

application/json
  1. response
data*
Example Request
curl -X POST 'https://app.peopleforce.io/api/public/v2/employees/0/leave_types' \  -H 'Content-Type: application/json' \  -d '{  "leave_type_id": 0,  "leave_type_policy_id": 0,  "effective_on": "2019-08-24"}'
Example Response
{  "data": {    "id": 0,    "effective_on": "2019-08-24",    "balance": 0.1,    "leave_type": {      "id": 0,      "name": "string"    },    "leave_type_policy": {      "id": 0,      "name": "string"    },    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  }}