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.
Call through Alter
Section titled “Call through Alter”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 osfrom alter_sdk import Appfrom 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()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | object | Optional | |
body.data | Model | Optional | Expand Validate time-off request — request body — body data Time off request data |
Referenced models: Validate time-off request — request body — body data
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Validate time-off request — 200 response body |
Referenced models: Validate time-off request — 200 response body
Schemas
Section titled “Schemas”13 more schemas are linked from the tables above, on the schema pages.
Validate time-off request — 200 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Time off request validation result |
data | Model | Required within parent | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Time off request data |
custom_field_values | array or null | Optional | Answers to the custom fields the request policy declares, addressed by custom field id. |
custom_field_values[] | Model | Each item | Expand Create time-off request — request body — body data custom field values item |
dates | array | Optional | The dates breakdown for the time off request. |
dates[] | Model | Each item | Expand Validate time-off request — request body — body data dates item |
deduction_amount | string | Optional | The amount to be deducted from the time off balance. Only valid for policies used by independent contractors |
description | string or null | Optional | The description of the time off request Maximum length: 500 |
end_date | string | Required within parent | The end date of the time off request. Format: date |
event_details | Model | Optional | Expand Validate time-off request — request body — body data event details Event details regarding the leave. Required for event based policies such as parental leave. |
id | string | Optional | The time off id. Required when validating a time off update request |
is_paid | boolean | Optional | Indicates if the time off request is paid or not. 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 |
recipient_profile_id | string | Required within parent | The hris profile id of the recipient |
start_date | string | Required within parent | The start date of the time off request. Format: date |
time_off_event_id | string | Optional | The time off event id that this request is associated with. Only present for event-based policies such as parental leave. |
time_off_percentage | string or null | Optional | The 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_id | string | Optional | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Time off request validation result |
amount | string | Optional | The amount of time off requested. |
amount_next_tracking_period | string | Optional | The amount of time off requested to be applicable in the next tracking period. |
country_specific_validation_results | array | Optional | Results of country-specific validation rules |
country_specific_validation_results[] | Model | Each item | Expand Validate time-off request — 200 response body — data country specific validation results item |
country_specific_validation_results_next_tracking_period | array | Optional | Results of country-specific validation rules |
country_specific_validation_results_next_tracking_period[] | Model | Each item | Expand Validate time-off request — 200 response body — data country specific validation results item |
custom_field_validation_results | array | Optional | Every rejected custom field answer. Omitted when all answers are valid. |
custom_field_validation_results[] | Model | Each item | Expand Validate time-off request — 200 response body — data custom field validation results item |
custom_fields | array | Optional | The custom fields the request policy declares. Omitted when the policy declares none. |
custom_fields[] | Model | Each item | Expand Validate time-off request — 200 response body — data custom fields item |
dates | array | Optional | The dates breakdown for the time off request. |
dates[] | Model | Each item | Expand Validate time-off request — 200 response body — data dates item |
event_details_fields | Model | Optional | Expand Validate time-off request — 200 response body — data event details fields Fields required for specific time off requests, such as parental leave. |
is_event_based | boolean | Optional | Indicates if the time off request is event-based, such as parental leave |
is_valid | boolean | Required within parent | Indicates if the time off request is valid or not. When false, the response will contain an error message. |
max_time_off_percentage | string | Optional | The maximum time off percentage allowed for the request |
new_end_date | string | Optional | The 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_date | string | Optional | The 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_balance | string | Optional | The remaining policy balance for the tracking period |
remaining_balance_next_tracking_period | string | Optional | The remaining policy balance for the next tracking period |
require_attachment | boolean | Optional | Indicates if an attachment is required for the time off request |
require_description | boolean | Optional | Indicates if a description is required for the time off request |
validation_error_message | string | Optional | Error 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
field_id | string | Required within parent | The id of the custom field this value answers. Format: uuid |
value | JSON | Required within parent | 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. |
value (oneOf 1) | Model | Alternative | Expand Create time-off request — request body — body data custom field values item value value |
value (oneOf 2) | null | Alternative |
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The dates breakdown for the time off request. |
amount | string | 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. |
date | string | Required within parent | An specific date in the time-off request Format: date |
day_type | string | Optional | The type of day for the time off request. All dates must follow the same type. One of: HALF_DAY, FULL_DAY, PERCENTAGE, HOURLY |
hours | string | Optional | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Event details regarding the leave. Required for event based policies such as parental leave. |
adoption_date | string | Optional | The adoption-date of the child. Required depending on the type of the leave requests. Format: date |
birth_date | string | Optional | The birth-date of the child. Required for parental leave requests. Format: date |
had_multiple_children | boolean | Optional | Indicates if the request is for multiple children. Required for parental leave requests. |
was_premature_birth | boolean | Optional | Indicates if the child was born prematurely. Required for parental leave requests. |
Validate time-off request — 200 response body — data custom field validation results item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
field_id | string | Optional | The id of the rejected custom field. Absent for payload-level errors. Format: uuid |
key | string | Optional | Machine key of the rejected field, when it resolved. |
message | string | Required within parent | Human-readable description of the rejection. |
reason | string | Required within parent | Why the answer was rejected. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”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"}