> This page is for API, version 2026-01-01 (Stable) (default).
> For other versions, use one of these documentation indexes:
> - 2026-01-01 (Stable) (default): https://developer.deel.com/api/stable/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.deel.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.deel.com/_mcp/server.

# Update time-off request

PATCH https://api.letsdeel.com/rest/time_offs/{time_off_id}
Content-Type: application/json

Corrects details of an existing time-off request, such as its dates, amount, reason, or time-off type, without requiring the worker to cancel and resubmit it. Applies a partial update identified by time_off_id; only fields included in the request body are modified.

 **Token scopes**: `time-off:write`, `worker:write`

Reference: https://developer.deel.com/api/reference/endpoints/time-off/update-time-off-request

## Authentication

- `Authorization` header (bearer token, required) — ## Authentication The Deel API uses bearer tokens to authenticate requests. All API calls must be made over HTTPS — calls over plain HTTP or without authentication will fail. ```curl curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \ -H 'Authorization: Bearer YOUR-TOKEN-HERE' ``` [Learn more about authentication](/api/authentication)
- `Authorization` header (bearer token, required) — Standard OAuth2 security scheme based on https://swagger.io/docs/specification/authentication/

## Servers

- `https://api.letsdeel.com/rest` (Production, default)
- `https://api-staging.letsdeel.com/rest` (Demo)

## Request

### Path parameters

- `time_off_id` (string, required) — Time off request id

### Body (application/json)

This endpoint expects an object.

- `data` (TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaData, optional) — Time off update request data

## Response

### 200

Time off updated

- `time_off` (TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOff, required) — Used to return the updated time off request after modification. Contains all the time off details including status, dates, amounts, and associated metadata.

## Errors

### 400 Bad Request Error

Bad Request

- `errors` (list of TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaErrorsItems, optional) — List of errors describing what went wrong
- `request` (TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaRequest, optional) — Request metadata

### 401 Unauthorized Error

Operation failed.

- `request` (ApiErrorRequest, optional)
- `errors` (list of ApiError, optional)

### 403 Forbidden Error

Operation failed.

- `request` (ApiErrorRequest, optional)
- `errors` (list of ApiError, optional)

### 404 Not Found Error

Operation failed.

- `request` (ApiErrorRequest, optional)
- `errors` (list of ApiError, optional)

### 500 Internal Server Error

Operation failed.

- `request` (ApiErrorRequest, optional)
- `errors` (list of ApiError, optional)

## Types

### TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaData

Time off update request data

- `end_date` (TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaDataEndDate, required) — End date of the time off request. This is the date when the time off ends. For example, if you take 2 days off, this will be the end date of the second day.
- `start_date` (TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaDataStartDate, required) — Start date of the time off request. This is the date when the time off starts. For example, if you take 2 days off, this will be the start date of the first day.
- `recipient_profile_id` (string, required) — The hris profile id of the recipient
- `dates` (list of TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaDataDatesItems, optional) — The dates breakdown for the time off request.
- `reason` (string, optional, nullable) — Reason for taking time off. This is complementary information for the time-off description. Useful to provide sub categories for the same policy.
- `is_paid` (boolean, optional) — Whether the time off is paid or unpaid. By default it follows the policy configuration.
- `policy_id` (string, optional) — The time off policy id. Can be used in place of time_off_type_id
- `description` (string, optional, nullable) — Description of the time off request. Some policies require that a description is provided.
- `contract_oid` (string, optional, nullable) — Contract id. This is the id of the contract associated with the time off request.
- `event_details` (TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaDataEventDetails, optional) — Details of the event associated with the time off request. Required for event based policies such as parental leave.
- `deduction_amount` (float, optional, nullable) — Deduction amount. Available for independent contractor's policies
- `time_off_type_id` (string, optional) — The time off type id. Required when policy_id is not provided
- `time_off_event_id` (string, optional) — The time off event id. This is used to link the time off request to an event.
- `custom_field_values` (list of TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaDataCustomFieldValuesItems, optional, nullable) — Answers to the custom fields the request policy declares, addressed by custom field id.
- `time_off_percentage` (double, optional, nullable) — This is the percentage of time off taken. This is used when the time off request is a percentage.
- `other_type_description` (string, optional, nullable) — Description of the time off type. This is used when the policy is OTHER.

### TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOff

Used to return the updated time off request after modification. Contains all the time off details including status, dates, amounts, and associated metadata.

- `amount` (float, required) — Amount of time off taken. This is the total amount of time off taken. For example, if you take 2 days off, this will be 2. If you take 1 day off, this will be 1.
- `is_paid` (boolean, required) — Whether the time off is paid or unpaid.
- `end_date` (string, required) — End date of the time off request. This is the date when the time off ends. For example, if you take 2 days off, this will be the end date of the second day.
- `created_at` (string, required) — This is the date when the time off request was created in the database.
- `start_date` (string, required) — Start date of the time off request. This is the date when the time off starts. For example, if you take 2 days off, this will be the start date of the first day.
- `updated_at` (string, required) — This is the date when the time off request was last updated in the database.
- `requested_at` (string, required) — This is the date when the time off request was made.
- `half_end_date` (boolean, required) — Whether the end date is a half day or not.
- `half_start_date` (boolean, required) — Whether the start date is a half day or not.
- `entitlement_unit` (enum, required) — The unit in which the time off usage and entitlement are calculated.
  - Allowed values: `HOUR`, `BUSINESS_DAY`, `CALENDAR_DAY`, `WEEK`, `MONTH`, `YEAR`
- `time_off_type_id` (string, required) — Time off type id. This is the id of the time off type associated with the time off request.
- `reason` (string, optional) — Reason for taking time off. This is complementary information for the time-off description. Useful to provide sub categories for the same policy.
- `status` (enum, optional) — Status of the time off request. Can be REQUESTED, APPROVED, REJECTED, USED or CANCELED.
  - Allowed values: `REQUESTED`, `APPROVED`, `REJECTED`, `USED`, `CANCELED`, `DELETED`
- `deleted_at` (string, optional, nullable) — Time off deletion date. Present only when the time-off is soft-deleted and include_deleted_time_offs was requested.
- `approved_at` (string, optional, nullable) — This is the date when the time off request was approved. This will be null if the time off request is not approved yet.
- `attachments` (list of TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffAttachmentsItems, optional) — List of attachments associated with the time off request.
- `canceled_at` (string, optional, nullable) — Time off cancellation date
- `description` (string, optional) — Description of the time off request. Some policies require that a description is provided.
- `contract_oid` (string, optional) — Contract id. This is the id of the contract associated with the time off request.
- `time_off_type` (TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffTimeOffType, optional) — The type of time off taken.
- `time_off_event` (TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffTimeOffEvent, optional)
- `deduction_amount` (float, optional) — Deduction amount. Available for independent contractor's policies
- `time_off_dailies` (list of TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffTimeOffDailiesItems, optional) — Used to break down the time off request into daily records. Each entry represents a single day within the time off period, allowing for detailed tracking of working days, non-working days, and holidays included in the request.
- `recipient_profile` (TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffRecipientProfile, optional) — The time off profile of the recipient of the time off request. Must be a worker profile.
- `requester_profile` (TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffRequesterProfile, optional) — The time off profile of the requester of the time off request. Can be either a client or worker profile.
- `custom_field_values` (list of TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffCustomFieldValuesItems, optional) — Answers to the custom fields the request policy declares. Omitted when the policy declares none.
- `time_off_percentage` (float, optional) — Used to specify the percentage of time off taken relative to full-time employment. This value ranges from 0 to 1, where 1 represents full-time (100%) and 0.5 represents part-time (50%). This is useful for part-time workers or when taking partial time off.
- `is_end_date_estimated` (boolean, optional) — Used to indicate if the end date is an estimate rather than a confirmed date. This is particularly important for event-based policies such as Parental Leave, where the actual end date may depend on the actual birth or adoption date, which may not be known at the time of request submission.
- `other_type_description` (string, optional) — Used to provide a custom description when the time off type is categorized as 'OTHER'. This allows users to specify the nature of time off that doesn't fit into standard categories, providing flexibility for unique or organization-specific time off types.

### TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaErrorsItems

- `code` (string, optional) — A machine-readable error code
- `field` (string, optional, nullable) — The field associated with the error, if applicable
- `details` (TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaErrorsItemsDetails, optional, nullable) — Additional error details, if applicable
- `message` (string, optional) — A description of the returned error

### TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaRequest

Request metadata

- `url` (string, optional) — Request URL path
- `docs` (string, optional) — Documentation reference
- `method` (string, optional) — HTTP method
- `source` (string, optional) — Request source
- `status` (integer, optional) — HTTP status code
- `api_req_id` (string, optional) — Unique API request identifier

### ApiErrorRequest

- `method` (string, optional) — The HTTP method of the failed request
- `url` (string, optional) — The relative URL of the failed request
- `status` (double, optional) — The status code of the response
- `api_req_id` (string, optional) — The request ID of the failed request
- `docs` (string, optional) — A link to the official documentation for the requested endpoint resource
- `source` (string, optional) — The source handler which produced the returned error
- `code` (double, optional) — The code of the source handler which produced the returned error

### ApiError

- `message` (string, optional) — A description of the returned error
- `path` (string, optional) — The JSON path where input validation failed

### TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaDataEndDate

End date of the time off request. This is the date when the time off ends. For example, if you take 2 days off, this will be the end date of the second day.

### TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaDataStartDate

Start date of the time off request. This is the date when the time off starts. For example, if you take 2 days off, this will be the start date of the first day.

### TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaDataDatesItems

The dates breakdown for the time off request.

- `date` (TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaDataDatesItemsDate, required) — An specific date in the time-off request
- `hours` (float, optional) — The amount taken in hours during this specific date. It can not exceed the maximum allowed hours for the date.
- `amount` (float, optional) — The amount of time off requested for the date. It must be in the same time unit as in the total amount for the time off request.
- `day_type` (enum, optional) — The type of day for the time off request. All dates must follow the same type.
  - Allowed values: `HALF_DAY`, `FULL_DAY`, `PERCENTAGE`, `HOURLY`

### TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaDataEventDetails

Details of the event associated with the time off request. Required for event based policies such as parental leave.

- `birth_date` (string, required) — The birth date of the child. This is used for parental leave requests.
- `was_premature_birth` (boolean, required) — Whether the birth was premature or not. This is used for parental leave requests.
- `had_multiple_children` (boolean, required) — Whether the birth was multiple or not. This is used for parental leave requests.
- `adoption_date` (string, optional) — The date of adoption. This is used for parental leave requests.
- `is_confirmation` (boolean, optional) — Whether the event date are a confirmed or not. This is used for parental leave requests when either the birth date or adoption date are not estimated anymore but actually confirmed.

### TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaDataCustomFieldValuesItems

- `value` (TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaDataCustomFieldValuesItemsValue, required, nullable) — The submitted value for the custom field. Accepts a string, number, or boolean — always stored as text. `null` means "no answer for this field" and is rejected today, since no field supports a null answer yet.
- `field_id` (string, required) — The id of the custom field this value answers.

### TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffAttachmentsItems

An attachment associated with the time off request.

- `id` (string, required) — Attachment id
- `filename` (string, required) — Filename of the attachment
- `created_at` (string, required) — This is the date when the attachment was created in the database.
- `updated_at` (string, required) — This is the date when the attachment was last updated in the database.

### TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffTimeOffType

The type of time off taken.

- `id` (string, required) — Time off type id.
- `name` (string, required) — Time off type name. Basically the reason or category of time-off taken. For SICK leave, it can be doctor appointment, surgery etc.
- `policy` (TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffTimeOffTypePolicy, optional) — The policy associated with the time off type.

### TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffTimeOffEvent

- `id` (string, optional) — The time off event id. This is used to link the time off request to an event.
- `type` (enum, optional) — The type of the time off event.
  - Allowed values: `PARENTAL_LEAVE`
- `policy_id` (string, optional) — The policy id associated with the time off event. Same as the policy_id in the time off type.
- `created_at` (string, optional) — The date when the time off event was created in the database.
- `updated_at` (string, optional) — The date when the time off event was last updated in the database.
- `event_details` (TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffTimeOffEventEventDetails, optional) — Details of the event associated with the time off request. Required for event based policies such as parental leave.
- `hris_profile_id` (string, optional) — The HRIS profile id of the worker associated with the time off event. Same as the hris_profile_id in the recipient_profile.
- `time_off_type_id` (string, optional) — The time off type id associated with the time off event. Same as the time_off_type_id in the time off request.

### TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffTimeOffDailiesItems

- `id` (string, required) — Time off daily id
- `date` (string, required) — Date of the time off daily. This is the date when the time off was taken.
- `type` (enum, required) — Type of the time off daily. Can be WORKING_DAY, NON_WORKING_DAY, HOLIDAY or FORFAIT_HOUR_DAY.
  - Allowed values: `WORKING_DAY`, `NON_WORKING_DAY`, `HOLIDAY`, `FORFAIT_HOUR_DAY`
- `amount` (float, required) — Amount of time off taken in this specific date.
- `created_at` (string, required) — This is the date when the time off daily was created in the database.
- `updated_at` (string, required) — This is the date when the time off daily was last updated in the database.
- `time_off_id` (string, required) — Time off id. This is the id of the time off request associated with the time off daily.
- `description` (string, optional, nullable) — Description of the time off daily. When it is a HOLIDAY this is the holiday name.

### TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffRecipientProfile

The time off profile of the recipient of the time off request. Must be a worker profile.

- `hris_profile_id` (string, required) — The worker HRIS profile id in the given organization.
- `organization_id` (string, required) — Id of the organization the profile belongs to.

### TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffRequesterProfile

The time off profile of the requester of the time off request. Can be either a client or worker profile.

- `organization_id` (string, required) — Id of the organization the profile belongs to.
- `hris_profile_id` (string, optional) — The worker HRIS profile id in the given organization. Available when the requester is a worker.
- `client_profile_id` (string, optional) — Id of the client profile. Available when the requester is a client.

### TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffCustomFieldValuesItems

- `value` (string, required, nullable) — The submitted value for the custom field, serialized as text. When no value is provided, this will be null.
- `field_id` (string, required) — The id of the custom field this value answers.

### TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaErrorsItemsDetails

Additional error details, if applicable

### TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaDataDatesItemsDate

An specific date in the time-off request

### TimeOffsTimeOffIdPatchRequestBodyContentApplicationJsonSchemaDataCustomFieldValuesItemsValue

The submitted value for the custom field. Accepts a string, number, or boolean — always stored as text. `null` means "no answer for this field" and is rejected today, since no field supports a null answer yet.

### TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffTimeOffTypePolicy

The policy associated with the time off type.

- `id` (string, required) — Policy id
- `name` (string, required) — The custom name given to policy during policy creation.
- `policy_type` (TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffTimeOffTypePolicyPolicyType, required)

### TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffTimeOffEventEventDetails

Details of the event associated with the time off request. Required for event based policies such as parental leave.

- `was_premature_birth` (boolean, required) — Whether the birth was premature or not. This is used for parental leave requests.
- `had_multiple_children` (boolean, required) — Whether the birth was multiple or not. This is used for parental leave requests.
- `birth_date` (string, optional) — The birth date of the child. This is used for parental leave requests.
- `adoption_date` (string, optional) — The date of adoption. This is used for parental leave requests.
- `estimated_birth_date` (string, optional) — The estimated birth date of the child. Birth is estimated when the birth date has not been confirmed yet.
- `estimated_adoption_date` (string, optional) — The estimated adoption date of the child. Birth is estimated when the adoption date has not been confirmed yet.

### TimeOffsTimeOffIdPatchResponsesContentApplicationJsonSchemaTimeOffTimeOffTypePolicyPolicyType

- `id` (string, required) — Policy type id
- `name` (string, required) — Depicts the type of policy, like VACATION, SICK etc

## Examples

**Request**

```json
{
  "data": {
    "end_date": "2021-04-30",
    "start_date": "2021-04-01",
    "recipient_profile_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "reason": "Vacation",
    "is_paid": true,
    "time_off_type_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "amount": 30
  }
}
```

**Response**

```json
{
  "time_off": {
    "amount": 1,
    "is_paid": false,
    "end_date": "2021-08-01",
    "created_at": "2021-07-01T00:00:00Z",
    "start_date": "2021-07-01",
    "updated_at": "2021-07-01T00:00:00Z",
    "requested_at": "2021-07-01",
    "half_end_date": false,
    "half_start_date": false,
    "entitlement_unit": "CALENDAR_DAY",
    "time_off_type_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "reason": "Vacation",
    "status": "REQUESTED",
    "approved_at": "2021-07-01T00:00:00Z",
    "attachments": [
      {
        "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
        "filename": "vacation-request.pdf",
        "created_at": "2021-07-01T11:22:33Z",
        "updated_at": "2021-07-01T33:44:33Z"
      }
    ],
    "description": "Vacation",
    "contract_oid": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "deduction_amount": 1,
    "time_off_dailies": [
      {
        "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
        "date": "2021-07-01",
        "type": "WORKING_DAY",
        "amount": 1,
        "created_at": "2021-07-01T00:00:00Z",
        "updated_at": "2021-07-01T00:00:00Z",
        "time_off_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
        "description": "Vacation"
      }
    ],
    "recipient_profile": {
      "hris_profile_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "organization_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "client_profile_id": "d290f1ee-6c54-4b01-90e6-d701748f0851"
    },
    "requester_profile": {
      "organization_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "hris_profile_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "client_profile_id": "d290f1ee-6c54-4b01-90e6-d701748f0851"
    },
    "time_off_percentage": 1,
    "is_end_date_estimated": false,
    "other_type_description": "Vacation",
    "id": "d290f1ee-6c54-4b01-90e6-d701748f0851"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.letsdeel.com/rest/time_offs/d290f1ee-6c54-4b01-90e6-d701748f0851"

payload = { "data": {
        "end_date": "2021-04-30",
        "start_date": "2021-04-01",
        "recipient_profile_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
        "reason": "Vacation",
        "is_paid": True,
        "time_off_type_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
        "amount": 30
    } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.letsdeel.com/rest/time_offs/d290f1ee-6c54-4b01-90e6-d701748f0851';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"data":{"end_date":"2021-04-30","start_date":"2021-04-01","recipient_profile_id":"d290f1ee-6c54-4b01-90e6-d701748f0851","reason":"Vacation","is_paid":true,"time_off_type_id":"d290f1ee-6c54-4b01-90e6-d701748f0851","amount":30}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.letsdeel.com/rest/time_offs/d290f1ee-6c54-4b01-90e6-d701748f0851"

	payload := strings.NewReader("{\n  \"data\": {\n    \"end_date\": \"2021-04-30\",\n    \"start_date\": \"2021-04-01\",\n    \"recipient_profile_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\",\n    \"reason\": \"Vacation\",\n    \"is_paid\": true,\n    \"time_off_type_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\",\n    \"amount\": 30\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/time_offs/d290f1ee-6c54-4b01-90e6-d701748f0851")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": {\n    \"end_date\": \"2021-04-30\",\n    \"start_date\": \"2021-04-01\",\n    \"recipient_profile_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\",\n    \"reason\": \"Vacation\",\n    \"is_paid\": true,\n    \"time_off_type_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\",\n    \"amount\": 30\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.letsdeel.com/rest/time_offs/d290f1ee-6c54-4b01-90e6-d701748f0851")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": {\n    \"end_date\": \"2021-04-30\",\n    \"start_date\": \"2021-04-01\",\n    \"recipient_profile_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\",\n    \"reason\": \"Vacation\",\n    \"is_paid\": true,\n    \"time_off_type_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\",\n    \"amount\": 30\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.letsdeel.com/rest/time_offs/d290f1ee-6c54-4b01-90e6-d701748f0851', [
  'body' => '{
  "data": {
    "end_date": "2021-04-30",
    "start_date": "2021-04-01",
    "recipient_profile_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "reason": "Vacation",
    "is_paid": true,
    "time_off_type_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "amount": 30
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/time_offs/d290f1ee-6c54-4b01-90e6-d701748f0851");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"data\": {\n    \"end_date\": \"2021-04-30\",\n    \"start_date\": \"2021-04-01\",\n    \"recipient_profile_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\",\n    \"reason\": \"Vacation\",\n    \"is_paid\": true,\n    \"time_off_type_id\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\",\n    \"amount\": 30\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["data": [
    "end_date": "2021-04-30",
    "start_date": "2021-04-01",
    "recipient_profile_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "reason": "Vacation",
    "is_paid": true,
    "time_off_type_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "amount": 30
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.letsdeel.com/rest/time_offs/d290f1ee-6c54-4b01-90e6-d701748f0851")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```