Skip to content

Deel: Validate time-off request

Deel timeOff.validateTimeOff: arguments, response, policy and SDK examples.

← Time off operations · Get started

Operation deel.timeoff_validatetimeoff

Provider route: POST /time_offs/validate. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/deel with npm, or alter-sdk-deel with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { DeelIntegration } from "@alter-ai/deel";
async function execute(input: Parameters<DeelIntegration["timeOff"]["validateTimeOff"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new DeelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.timeOff.validateTimeOff(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_deel import DeelIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = DeelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.time_off.validate_time_off(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyobjectOptional
body.dataModelOptionalExpand Validate time-off request — request body — body data
Time off request data

Referenced models: Validate time-off request — request body — body data

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Validate time-off request — 200 response body

Referenced models: Validate time-off request — 200 response body

13 more schemas are linked from the tables above, on the schema pages.

Validate time-off request — 200 response body
FieldTypePresenceDescription and constraints
$objectRootTime off request validation result
dataModelRequired within parentExpand Validate time-off request — 200 response body — data
Time off request validation result

Referenced models: Validate time-off request — 200 response body — data

Validate time-off request — request body — body data
FieldTypePresenceDescription and constraints
$objectRootTime off request data
custom_field_valuesarray or nullOptionalAnswers to the custom fields the request policy declares, addressed by custom field id.
custom_field_values[]ModelEach itemExpand Create time-off request — request body — body data custom field values item
datesarrayOptionalThe dates breakdown for the time off request.
dates[]ModelEach itemExpand Validate time-off request — request body — body data dates item
deduction_amountstringOptionalThe amount to be deducted from the time off balance. Only valid for policies used by independent contractors
descriptionstring or nullOptionalThe description of the time off request
Maximum length: 500
end_datestringRequired within parentThe end date of the time off request.
Format: date
event_detailsModelOptionalExpand Validate time-off request — request body — body data event details
Event details regarding the leave. Required for event based policies such as parental leave.
idstringOptionalThe time off id. Required when validating a time off update request
is_paidbooleanOptionalIndicates if the time off request is paid or not. By default it follows the policy configuration.
policy_idstringOptionalThe time off policy id. Can be used in place of time_off_type_id
recipient_profile_idstringRequired within parentThe hris profile id of the recipient
start_datestringRequired within parentThe start date of the time off request.
Format: date
time_off_event_idstringOptionalThe time off event id that this request is associated with. Only present for event-based policies such as parental leave.
time_off_percentagestring or nullOptionalThe percentage of time off requested. For example, if the request is for a full day, the percentage will be 1. If it's for half a day, the percentage will be 0.5.
time_off_type_idstringOptionalThe time off type id. Required when policy_id is not provided

Referenced models: Create time-off request — request body — body data custom field values item, Validate time-off request — request body — body data dates item, Validate time-off request — request body — body data event details

Validate time-off request — 200 response body — data
FieldTypePresenceDescription and constraints
$objectRootTime off request validation result
amountstringOptionalThe amount of time off requested.
amount_next_tracking_periodstringOptionalThe amount of time off requested to be applicable in the next tracking period.
country_specific_validation_resultsarrayOptionalResults of country-specific validation rules
country_specific_validation_results[]ModelEach itemExpand Validate time-off request — 200 response body — data country specific validation results item
country_specific_validation_results_next_tracking_periodarrayOptionalResults of country-specific validation rules
country_specific_validation_results_next_tracking_period[]ModelEach itemExpand Validate time-off request — 200 response body — data country specific validation results item
custom_field_validation_resultsarrayOptionalEvery rejected custom field answer. Omitted when all answers are valid.
custom_field_validation_results[]ModelEach itemExpand Validate time-off request — 200 response body — data custom field validation results item
custom_fieldsarrayOptionalThe custom fields the request policy declares. Omitted when the policy declares none.
custom_fields[]ModelEach itemExpand Validate time-off request — 200 response body — data custom fields item
datesarrayOptionalThe dates breakdown for the time off request.
dates[]ModelEach itemExpand Validate time-off request — 200 response body — data dates item
event_details_fieldsModelOptionalExpand Validate time-off request — 200 response body — data event details fields
Fields required for specific time off requests, such as parental leave.
is_event_basedbooleanOptionalIndicates if the time off request is event-based, such as parental leave
is_validbooleanRequired within parentIndicates if the time off request is valid or not. When false, the response will contain an error message.
max_time_off_percentagestringOptionalThe maximum time off percentage allowed for the request
new_end_datestringOptionalThe new end date for the time off request. It could be different from the original end date depending on the policy configuration. For example, for forfait-jour policies
Format: date
new_start_datestringOptionalThe new start date for the time off request. It could be different from the original start date depending on the policy configuration. For example, for forfait-jour policies
Format: date
remaining_balancestringOptionalThe remaining policy balance for the tracking period
remaining_balance_next_tracking_periodstringOptionalThe remaining policy balance for the next tracking period
require_attachmentbooleanOptionalIndicates if an attachment is required for the time off request
require_descriptionbooleanOptionalIndicates if a description is required for the time off request
validation_error_messagestringOptionalError message when the time off request is invalid

Referenced models: Validate time-off request — 200 response body — data custom fields item, Validate time-off request — 200 response body — data country specific validation results item, Validate time-off request — 200 response body — data custom field validation results item, Validate time-off request — 200 response body — data dates item, Validate time-off request — 200 response body — data event details fields

Create time-off request — request body — body data custom field values item
FieldTypePresenceDescription and constraints
$objectRoot
field_idstringRequired within parentThe id of the custom field this value answers.
Format: uuid
valueJSONRequired within parentThe 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.
value (oneOf 1)ModelAlternativeExpand Create time-off request — request body — body data custom field values item value value
value (oneOf 2)nullAlternative

Referenced models: Create time-off request — request body — body data custom field values item value value

Validate time-off request — request body — body data dates item
FieldTypePresenceDescription and constraints
$objectRootThe dates breakdown for the time off request.
amountstringOptionalThe 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.
datestringRequired within parentAn specific date in the time-off request
Format: date
day_typestringOptionalThe type of day for the time off request. All dates must follow the same type.
One of: HALF_DAY, FULL_DAY, PERCENTAGE, HOURLY
hoursstringOptionalThe amount taken in hours during this specific date. It can not exceed the maximum allowed hours for the date.
Validate time-off request — request body — body data event details
FieldTypePresenceDescription and constraints
$objectRootEvent details regarding the leave. Required for event based policies such as parental leave.
adoption_datestringOptionalThe adoption-date of the child. Required depending on the type of the leave requests.
Format: date
birth_datestringOptionalThe birth-date of the child. Required for parental leave requests.
Format: date
had_multiple_childrenbooleanOptionalIndicates if the request is for multiple children. Required for parental leave requests.
was_premature_birthbooleanOptionalIndicates if the child was born prematurely. Required for parental leave requests.
Validate time-off request — 200 response body — data custom field validation results item
FieldTypePresenceDescription and constraints
$objectRoot
field_idstringOptionalThe id of the rejected custom field. Absent for payload-level errors.
Format: uuid
keystringOptionalMachine key of the rejected field, when it resolved.
messagestringRequired within parentHuman-readable description of the rejection.
reasonstringRequired within parentWhy the answer was rejected.

SDK function policy ID: deel.timeoff_validatetimeoff. Catalog operation: timeoff_validatetimeoff. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["time-off:read"]

Pinned headers: {"X-Version": "2026-01-01"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.