GuidesAPI ReferenceChangelog
Changelog
added

v.2.1.15

Time Off

New endpoints for viewing and managing time-off


Get Profile Entitlements

List time-off entitlements.

Endpoint: [GET /rest/v2/time_offs/profile/{hris_profile_id}/entitlements]

https://developer.deel.com/reference/get_time-offs-profile-hris-profile-id-entitlements

curl --request GET \
     --url https://api.letsdeel.com/rest/v2/time_offs/profile/{hris_profile_id}/entitlements \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {YOUR_TOKEN}'

List policies

List time-off policies.

Endpoint: [GET /rest/v2/time_offs/profile/{hris_profile_id}/policies]

https://developer.deel.com/reference/getpoliciesforprofile

curl --request GET \
     --url https://api.letsdeel.com/rest/v2/time_offs/profile/{hris_profile_id}/policies \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {YOUR_TOKEN}'

List time-off requests

List time-off requests.

Endpoint: [GET /rest/v2/time_offs/profile/{hris_profile_id}]

https://developer.deel.com/reference/gettimeoffsquery

curl --request GET \
     --url https://api.letsdeel.com/rest/v2/time_offs/profile/hris_profile_id \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {YOUR_TOKEN}'

Create time-off request

Create time-off request.

Endpoint: [POST /rest/v2/time_offs]

https://developer.deel.com/reference/createtimeoff

curl --request POST \
     --url https://api.letsdeel.com/rest/v2/time_offs \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "data": {
    "is_paid": true,
    "recipient_profile_id": "8bcac37e-b127-4089-ad21-105a55d4f1cd",
    "other_type_description": "info",
    "reason": "Vacation",
    "start_date": "2024-09-19T07:55:19.848Z",
    "end_date": "2024-09-29T07:55:19.848Z",
    "time_off_type_id": "ea410e13-39b3-4f3b-8311-f22e440aaaca",
    "description": "New Vacation",
    "attachments": [
      {
        "filename": "iKekwntQ",
        "upload_id": "eLwoRgmQ",
        "id": "44c11232-fcc6-434c-814a-d14e0158c941"
      }
    ],
    "contract_oid": "34w57nn",
    "dates": [
      {
        "date": "2024-09-29T07:55:19.848Z",
        "day_type": "FULL_DAY",
        "amount": 10,
        "hours": 2
      }
    ],
    "time_off_percentage": 1
  }
}
'

Update time-off request

Update time-off request

Endpoint: [PATCH /rest/v2/time_offs/{time_off_id}]

https://developer.deel.com/reference/updatetimeoff

curl --request PATCH \
     --url https://api.letsdeel.com/rest/v2/time_offs/{time_off_id} \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "data": {
    "is_paid": false,
    "recipient_profile_id": "c7854faa-d4e2-447d-bed8-0744fddf7977",
    "start_date": "2024-09-19T07:55:19.848Z",
    "end_date": "2024-09-23T07:55:19.848Z",
    "time_off_type_id": "3aca334e-4233-4573-9103-63b2be235e25"
  }
}
'

Delete time-off request

Delete time-off request

Endpoint: [DELETE /rest/v2/time_offs/{time_off_id}]

https://developer.deel.com/reference/deletetimeoff

curl --request DELETE \
     --url https://api.letsdeel.com/rest/v2/time_offs/{time_off_id} \
     --header 'accept: application/json'