Skip to content
PATCH /unified/hris/timeoff_requests/{id}

Path Parameters

idstring
required·

The ID of the resource.

Example: 23423523

Query Parameters

Refer Specifying query parameters in Truto APIs

Show Truto-specific parameters
integrated_account_idstring · uuid
required·

The ID of the integrated account to use for the request.

Example: 62f44730-dd91-461e-bd6a-aedd9e0ad79d
truto_response_formatstring

The format of the response.

  • unified returns the response with unified mappings applied.
  • raw returns the unprocessed, raw response from the remote API.
  • normalized applies the unified mappings and returns the data in a normalized format.
  • stream returns the response as a stream, which is ideal for transmitting large datasets, files, or binary data. Using streaming mode helps to efficiently handle large payloads or real-time data flows without requiring the entire data to be buffered in memory.
  • debug returns the final unified result alongside raw remote fetch information. The response is an envelope containing result (identical to unified mode output) and debug (with requestUrl, requestOptions, data, responseHeaders, and for list operations: nextCursor, isLooping, isEmptyResult, resultCount). When the upstream body exceeds 1 MiB, data is replaced by { truto_truncated: true, truto_max_bytes, truto_excerpt }. debug is null for static responses or when truto_skip_api_call=true.

Defaults to unified.

Example: unified
Possible values:
unifiedrawnormalizedstreamdebug
truto_ignore_remote_databoolean

Excludes the remote_data attribute from the response.

truto_enforce_write_schemaboolean

Validates the request body against this method's request_body_schema before the request is sent to the underlying integration. When a field marked required is missing, Truto responds 400 with the missing field names under truto_error_insight.missing_required_body_fields instead of forwarding the call. Only the fields documented in request_body_schema are checked. A body carrying a non-empty remote_data object is forwarded unchecked, because remote_data is merged into the provider request and may already carry the required values. A field the mapping always supplies through its default body is treated as present, and a field that is only conditionally required is reported under truto_error_insight.conditionally_required_body_fields rather than rejected. Some integrations declare fields required on update that the provider only requires on create; check meta/{method} for the resource before enabling this on update calls. If you sent an Idempotency-Key and the request was rejected, use a fresh key when you retry with a corrected body: the idempotency cache is keyed on the integrated account, path and key only — it ignores the query string and the body — so reusing the key replays the rejection. Defaults to false, which forwards the request as-is.

truto_exclude_fieldsstring[]

Array of fields to exclude from the response.

Example: truto_exclude_fields[]=id&truto_exclude_fields[]=name
remote_queryRecord<string, any>

Query parameters to pass to the underlying API without any transformations. Refer this guide to see how to structure the query parameters.

Example: remote_query[foo]=bar

Request Body

Refer Writing data using Unified APIs

amountnumber

Hours requested. Required by 7shifts for paid and paid_sick types on single-day requests. Multi-day requests spread it evenly per day, with any rounding remainder on the last day. 7shifts stores the hours per day, so amount is only applied together with start_time and end_time (always the case on create); on update, an amount sent without both dates is not applied.

7 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
approverstring

The deciding manager's employee id (Sesame managerId).

5 supported
7shifts
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
change_reasonstring

Reason sent to Remote: edit_reason for edits, decline_reason for rejected, cancel_reason for cancelled.

1 supported
Remote
supported
descriptionstring

This represents the description of the time off request.

5 supported
7shifts
supported
Deel
supported
Humaans
supported
Remote
supported
Sesame
supported
employeeobject

Only accepted when it is the employee the absence already belongs to: HR WORKS has no API to move an absence to another person (its edit body has no personnel number), so a different id is refused with a 400 instead of being ignored.

References: Employees → id
7 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
idstring
required·

The unique identifier for employees

namestring

This represents the name of the employee.

employee_notestring

Notes for the request.

7 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
end_timestring · date-time

New last day (only the date is used). Send together with start_time: the per-day hours only change when both dates are sent. Sent without start_time it is ignored.

7 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
is_paidboolean

Deel-specific: whether the time off is paid. Defaults to the policy configuration.

1 supported
Deel
supported
reasonobject

Deel reason: a free-text sub-category of the time off.

2 supported
Deel
supported
HR WORKS
supported
idstring
required·

The unique identifier for timeoff_reason

namestring

This represents the name of the timeoff_reason.

remote_dataRecord<string, any>

Any additional data that should be passed as part of the request body. This data is not transformed by Truto and is passed as is to the remote API.

resolution_commentstring

Not a unified field. Manager's comment (Sesame resolutionComment); not sent when approving a vacation request, whose accept endpoint takes only managerId.

1 supported
Sesame
supported
sessionstring

full, morning or afternoon. HR WORKS stores two flags instead: isBeginDateHalfDay ("the absence spans only the afternoon of the first day") and isEndDateHalfDay ("only the forenoon of the last day"). For a one-day absence afternoon sets isBeginDateHalfDay, morning sets isEndDateHalfDay and full sets both to false. For an absence spanning several days only full is accepted: morning and afternoon cannot say which end they mean, so they are refused with a 400 (use the proxy API to set the two flags individually).

Possible values:
fullmorningafternoonfullmorningafternoon
3 supported
HR WORKS
supported
fullmorningafternoon
Deel
supported
Humaans
supported
start_timestring · date-time

New first day (only the date is used). The dates and the per-day hours only change when start_time and end_time are sent together; the per-day hours are then rebuilt (8 hours Monday to Friday, 0 on Saturday and Sunday). Sent without end_time it is ignored.

7 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
statusstring

Move the request to this status as a manager. The request is read first (one extra call) and only a status that UKG lists in the request's next valid statuses is sent; when UKG offers none of them nothing is written and the call fails with 409 naming the allowed ones. Side effects: UKG's approval workflow runs (reviewers are notified per tenant configuration) and approving or cancelling changes the employee's schedule and timecard pay code edits, which feed payroll. Dates, amounts and types of an existing request are not changed: a request without a status is refused with 400 and nothing is written. DELETE on a request is the same as status cancelled. When UKG's only cancel transition is one a manager still has to approve (CANCELSUBMITTED), the time off stays booked until that approval, and the record returned keeps the status it really has (approved).

Possible values:
pendingapprovedrejectedapprovedrejectedcancelledapprovedrejectedapprovedrejectedcancelled
7 supported2 required
Sesame
required
approvedrejected
UKG Dimensions
required
approvedrejectedcancelled
7shifts
supported
pendingapprovedrejected
Remote
supported
approvedrejectedcancelled
Deel
supported
HR WORKS
supported
Humaans
supported
timeoff_typestring

Change the Remote leave type (timeoff_types.id, e.g. paid_time_off, sick_leave). Requires change_reason.

7 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
timezonestring

Change the IANA timezone of the request. Requires change_reason.

1 supported
Remote
supported

Response Body

idstring
required·

The unique identifier for timeoffpolicies

7 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
amountnumber

This represents the amount of the time off request.

7 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
approverstring

This represents the approver of the time off request.

5 supported
7shifts
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
created_atstring · date-time

This represents the date when the timeoffpolicies was created

5 supported
7shifts
supported
Deel
supported
Humaans
supported
Sesame
supported
UKG Dimensions
supported
descriptionstring

This represents the description of the time off request.

5 supported
7shifts
supported
Deel
supported
Humaans
supported
Remote
supported
Sesame
supported
employeeobject

This represents the employee requesting time off.

References: Employees → id
7 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
idstring
required·

The unique identifier for employees

namestring

This represents the name of the employee.

employee_notestring

This represents the employee note for the time off request.

7 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
end_timestring · date-time

This represents the end time of the time off request.

7 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
reasonobject

This represents the reason of the time off request.

2 supported
Deel
supported
HR WORKS
supported
idstring
required·

The unique identifier for timeoff_reason

namestring

This represents the name of the timeoff_reason.

remote_dataRecord<string, any>

Raw data returned from the remote API call.

request_policy_typestring

This represents the request type of the time off request.

3 supported
Deel
supported
Sesame
supported
UKG Dimensions
supported
sessionstring

This represents the session of the time off request.

Possible values:
fullmorningafternoon
3 supported
Deel
supported
HR WORKS
supported
Humaans
supported
start_timestring · date-time

This represents the start time of the time off request.

7 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
statusstring

This represents the status of the time off request.

7 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
timeoff_typestring

This represents the time off type of the time off request.

7 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
unitsstring

This represents the units of the time off request.

Possible values:
hoursdaysweeksmonths
7 supported
7shifts
supported
Deel
supported
HR WORKS
supported
Humaans
supported
Remote
supported
Sesame
supported
UKG Dimensions
supported
updated_atstring · date-time

This represents the date when the timeoffpolicies was updated

4 supported
7shifts
supported
Deel
supported
Humaans
supported
Sesame
supported
truto unified hris timeoffrequests '<resource_id>' \
  -m update \
  -a '<integrated_account_id>' \
  -b '{
  "start_time": "your_start_time",
  "end_time": "your_end_time",
  "timeoff_type": "your_timeoff_type",
  "status": "pending",
  "employee_note": "your_employee_note",
  "amount": 0,
  "employee": {},
  "reason": {},
  "is_paid": true,
  "session": "full",
  "description": "your_description",
  "timezone": "your_timezone",
  "approver": "your_approver",
  "change_reason": "your_change_reason",
  "resolution_comment": "your_resolution_comment",
  "remote_data": {}
}' \
  -o json
import Truto from '@truto/truto-ts-sdk';

const truto = new Truto({
  token: '<your_api_token>',
});

const result = await truto.unifiedApi.update(
  'hris',
  'timeoffrequests',
  '<resource_id>',
  {
  "start_time": "your_start_time",
  "end_time": "your_end_time",
  "timeoff_type": "your_timeoff_type",
  "status": "pending",
  "employee_note": "your_employee_note",
  "amount": 0,
  "employee": {},
  "reason": {},
  "is_paid": true,
  "session": "full",
  "description": "your_description",
  "timezone": "your_timezone",
  "approver": "your_approver",
  "change_reason": "your_change_reason",
  "resolution_comment": "your_resolution_comment",
  "remote_data": {}
},
  { integrated_account_id: '<integrated_account_id>' }
);

console.log(result);
import asyncio
from truto_python_sdk import TrutoApi

truto_api = TrutoApi(token="<your_api_token>")

async def main():
    result = await truto_api.unified_api.update(
        "hris",
        "timeoffrequests",
        "<resource_id>",
        {
        "start_time": "your_start_time",
        "end_time": "your_end_time",
        "timeoff_type": "your_timeoff_type",
        "status": "pending",
        "employee_note": "your_employee_note",
        "amount": 0,
        "employee": {},
        "reason": {},
        "is_paid": True,
        "session": "full",
        "description": "your_description",
        "timezone": "your_timezone",
        "approver": "your_approver",
        "change_reason": "your_change_reason",
        "resolution_comment": "your_resolution_comment",
        "remote_data": {}
},
        {"integrated_account_id": "<integrated_account_id>"}
    )
    print(result)

asyncio.run(main())
curl -X PATCH 'https://api.truto.one/unified/hris/timeoff_requests/{id}?integrated_account_id=<integrated_account_id>' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "start_time": "your_start_time",
  "end_time": "your_end_time",
  "timeoff_type": "your_timeoff_type",
  "status": "pending",
  "employee_note": "your_employee_note",
  "amount": 0,
  "employee": {},
  "reason": {},
  "is_paid": true,
  "session": "full",
  "description": "your_description",
  "timezone": "your_timezone",
  "approver": "your_approver",
  "change_reason": "your_change_reason",
  "resolution_comment": "your_resolution_comment",
  "remote_data": {}
}'
const integratedAccountId = '<integrated_account_id>';

const body = {
  "start_time": "your_start_time",
  "end_time": "your_end_time",
  "timeoff_type": "your_timeoff_type",
  "status": "pending",
  "employee_note": "your_employee_note",
  "amount": 0,
  "employee": {},
  "reason": {},
  "is_paid": true,
  "session": "full",
  "description": "your_description",
  "timezone": "your_timezone",
  "approver": "your_approver",
  "change_reason": "your_change_reason",
  "resolution_comment": "your_resolution_comment",
  "remote_data": {}
};

const response = await fetch(`https://api.truto.one/unified/hris/timeoff_requests/{id}?integrated_account_id=${integratedAccountId}`, {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import requests

url = "https://api.truto.one/unified/hris/timeoff_requests/{id}"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
    "integrated_account_id": "<integrated_account_id>"
}
payload = {
    "start_time": "your_start_time",
    "end_time": "your_end_time",
    "timeoff_type": "your_timeoff_type",
    "status": "pending",
    "employee_note": "your_employee_note",
    "amount": 0,
    "employee": {},
    "reason": {},
    "is_paid": True,
    "session": "full",
    "description": "your_description",
    "timezone": "your_timezone",
    "approver": "your_approver",
    "change_reason": "your_change_reason",
    "resolution_comment": "your_resolution_comment",
    "remote_data": {}
}

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