---
title: "Validate time-off request"
method: POST
path: "/time_offs/validate"
tags: ["timeOff"]
---

# Validate time-off request

`POST /time_offs/validate`

## Request

- Base URL: `https://api.letsdeel.com/rest`
- URL: `https://api.letsdeel.com/rest/time_offs/validate`
- Auth: HTTP bearer

Validates a time-off request against policy compliance, available balance, blackout dates, and other rules before the request is created. Call this ahead of submitting the actual time-off request to catch validation errors early and avoid a failed creation attempt.

 **Token scopes**: `time-off:read`

## Request body

- object
  - `data` TimeOffsValidatePostRequestBodyContentApplicationJsonSchemaData: Time off request data
    - `id` string: The time off id. Required when validating a time off update request
    - `dates` TimeOffsValidatePostRequestBodyContentApplicationJsonSchemaDataDatesItems[]: The dates breakdown for the time off request.
      - `date` string, date, required: An specific date in the time-off request
      - `hours` string: The amount taken in hours during this specific date. It can not exceed the maximum allowed hours for the date.
      - `amount` string: 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` 'HALF_DAY' | 'FULL_DAY' | 'PERCENTAGE' | 'HOURLY': The type of day for the time off request. All dates must follow the same type.
    - `is_paid` boolean: Indicates if the time off request is paid or not. By default it follows the policy configuration.
    - `end_date` string, date, required: The end date of the time off request.
    - `policy_id` string: The time off policy id. Can be used in place of time_off_type_id
    - `start_date` string, date, required: The start date of the time off request.
    - `description` string, nullable: The description of the time off request
    - `event_details` TimeOffsValidatePostRequestBodyContentApplicationJsonSchemaDataEventDetails: Event details regarding the leave. Required for event based policies such as parental leave. Not accepted on a policy with request steps: send the answers of the event in `custom_field_values`.
      - `birth_date` string, date: The birth-date of the child. Required for parental leave requests.
      - `adoption_date` string, date: The adoption-date of the child. Required depending on the type of the leave requests.
      - `was_premature_birth` boolean: Indicates if the child was born prematurely. Required for parental leave requests.
      - `had_multiple_children` boolean: Indicates if the request is for multiple children. Required for parental leave requests.
    - `deduction_amount` string: The amount to be deducted from the time off balance. Only valid for policies used by independent contractors
    - `time_off_type_id` string: The time off type id. Required when policy_id is not provided
    - `time_off_event_id` string: The time off event id that this request is associated with. Only present for event-based policies such as parental leave. On a policy with request steps, set it to continue an existing event; leave it out to declare a new event with the answers.
    - `custom_field_values` TimeOffsValidatePostRequestBodyContentApplicationJsonSchemaDataCustomFieldValuesItems[], nullable: Answers to the custom fields the request policy declares, addressed by custom field key (`field_key`) or, for existing clients, by custom field id (`field_id`). Each answer names a different field. On a policy with request steps, send every answer of the request in this call: the dates and the description stay in their own properties, and a document field takes the position (0, 1, 2…) of its file in `files`.
      - `value` union, required: 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.
        - string
        - number, double
        - boolean
      - `field_id` string, uuid: The id of the custom field this value answers, kept for the clients that already send it. An id from an earlier version of the policy answers the current field with the same key. Send exactly one of `field_key` and `field_id` in each answer.
      - `field_key` string: The key of the custom field this value answers. The key stays the same when the policy changes, so prefer it to `field_id`. Send exactly one of `field_key` and `field_id` in each answer.
    - `time_off_percentage` string, nullable: 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.
    - `recipient_profile_id` string, required: The hris profile id of the recipient

## Response `200`

Time off request validation result

- TimeOffValidateTimeOffResponse200: Time off request validation result
  - `data` TimeOffsValidatePostResponsesContentApplicationJsonSchemaData, required: Time off request validation result
    - `dates` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataDatesItems[]: The dates breakdown for the time off request.
      - `date` string, date, required: An specific date in the time-off request
      - `type` 'WORKING_DAY' | 'NON_WORKING_DAY' | 'HOLIDAY' | 'FORFAIT_HOUR_DAY', required: The type of day for the time off request. All dates must follow the same type.
      - `hours` string[]: The maximum allowed number of hours that can be take in this specific date. For example, if there is another leave taking 3 hours in the same date, the maximum allowed hours will be 5 (assuming a work schedule of 8 hours).
      - `amount` string: The amount of time off requested for the date. It uses the same time unit as in the total amount for the time off request.
      - `day_types` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataDatesItemsDayTypesItems[]: The types of leave available for the date. Either FULL_DAY or HALF_DAY.
      - `holiday_name` string: The name of the holiday for the date. Only applicable for holidays. Only present when date type is HOLIDAY.
      - `time_off_percentage` string: The percentage of time off requested for the date. 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.
    - `amount` string: The amount of time off requested.
    - `is_valid` boolean, required: Indicates if the time off request is valid or not. When false, the response will contain an error message.
    - `new_end_date` string, date: 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
    - `custom_fields` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataCustomFieldsItems[]: The custom fields the request policy declares. Omitted when the policy declares none.
      - `id` string, uuid, required: The custom field id.
      - `key` string, required: Machine key, unique within the policy.
      - `name` string, required: Human-facing field name shown on the request form.
      - `schema` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataCustomFieldsItemsSchema, required: The value type plus shape/constraints of the field.
        - `enum` string[]: Allowed values, when the field is a closed list.
        - `type` 'string' | 'number' | 'boolean' | 'date' | 'datetime', required: The value type of the field.
        - `is_nullable` boolean, required: Whether the field accepts a null answer. Always `false` today — nullable custom fields are not supported yet, but the flag is present from the start so support can be added later without a breaking change.
      - `field_requirement` 'ALWAYS_REQUIRED' | 'REQUIRED_CONDITIONALLY' | 'OPTIONAL', required: Whether an answer is mandatory, and under which conditions.
      - `requirement_conditions` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataCustomFieldsItemsRequirementConditionsItems[], nullable: Present only for a REQUIRED_CONDITIONALLY field: the conditions under which it becomes required.
        - `operator` 'IS' | 'IS_NOT' | 'IS_ANY_OF' | 'IS_AT_LEAST' | 'IS_AT_MOST' | 'IS_LESS_THAN' | 'IS_MORE_THAN', required: How the left field's answer is compared against the right side.
        - `static_items` string[], nullable: Literal list to compare against, for IS_ANY_OF.
        - `static_value` string, nullable: Literal value to compare against, for a single-value operator (IS, IS_NOT, IS_AT_LEAST, IS_AT_MOST, IS_LESS_THAN, IS_MORE_THAN).
        - `left_field_key` string: Machine key of the field whose answer is being compared.
        - `right_field_key` string: Machine key of another field to compare against, when the right side is itself an answer rather than a static value.
    - `is_event_based` boolean: Indicates if the time off request is event-based, such as parental leave
    - `new_start_date` string, date: 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
    - `remaining_balance` string: The remaining policy balance for the tracking period
    - `require_attachment` boolean: Indicates if an attachment is required for the time off request
    - `require_description` boolean: Indicates if a description is required for the time off request
    - `event_details_fields` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataEventDetailsFields: Fields required for specific time off requests, such as parental leave.
      - `birth_date` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataEventDetailsFieldsBirthDate: The birth-date of the child. Required for parental leave requests.
        - `type` 'date-only', required: The type of the field, indicating it is a date-only field
        - `required` boolean, required: Indicates if the field is required
      - `adoption_date` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataEventDetailsFieldsAdoptionDate: The adoption-date of the child. Might be required depending on the type if leave requests.
        - `type` 'date-only', required: The type of the field, indicating it is a date-only field
        - `required` boolean, required: Indicates if the field is required
      - `was_premature_birth` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataEventDetailsFieldsWasPrematureBirth: Indicates if the child was born prematurely. Required for parental leave requests.
        - `type` 'boolean', required: The type of the field, indicating it is a boolean field
        - `required` boolean, required: Indicates if the field is required
      - `had_multiple_children` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataEventDetailsFieldsHadMultipleChildren: Indicates if the request is for multiple children. Required for parental leave requests.
        - `type` 'boolean', required: The type of the field, indicating it is a boolean field
        - `required` boolean, required: Indicates if the field is required
    - `max_time_off_percentage` string: The maximum time off percentage allowed for the request
    - `validation_error_message` string: Error message when the time off request is invalid
    - `amount_next_tracking_period` string: The amount of time off requested to be applicable in the next tracking period.
    - `custom_field_validation_results` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataCustomFieldValidationResultsItems[]: Every rejected custom field answer. Omitted when all answers are valid.
      - `key` string: Machine key of the rejected field, when it resolved.
      - `reason` string, required: Why the answer was rejected.
      - `message` string, required: Human-readable description of the rejection.
      - `field_id` string, uuid: The id of the rejected custom field. Absent for payload-level errors.
    - `country_specific_validation_results` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataCountrySpecificValidationResultsItems[]: Results of country-specific validation rules
      - `data` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataCountrySpecificValidationResultsItemsData
        - `ranges` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataCountrySpecificValidationResultsItemsDataRangesItems[]: Date ranges that were validated
          - `end_day` number, double: The end day in the range
          - `start_day` number, double, required: The start day in the range
        - `max_requests` number, double: Maximum number of requests allowed by this validation rule
        - `remaining_balance` number, double: Remaining balance at the time of applying this rule
      - `is_valid` boolean: Indicates if this specific validation passed
      - `description` string: A human-readable description of the validation result
      - `validation_type` string, required: The type of validation rule being applied
    - `remaining_balance_next_tracking_period` string: The remaining policy balance for the next tracking period
    - `country_specific_validation_results_next_tracking_period` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataCountrySpecificValidationResultsNextTrackingPeriodItems[]: Results of country-specific validation rules
      - `data` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataCountrySpecificValidationResultsNextTrackingPeriodItemsData
        - `ranges` TimeOffsValidatePostResponsesContentApplicationJsonSchemaDataCountrySpecificValidationResultsNextTrackingPeriodItemsDataRangesItems[]: Date ranges that were validated
          - `end_day` number, double: The end day in the range
          - `start_day` number, double, required: The start day in the range
        - `max_requests` number, double: Maximum number of requests allowed by this validation rule
        - `remaining_balance` number, double: Remaining balance at the time of applying this rule
      - `is_valid` boolean: Indicates if this specific validation passed
      - `description` string: A human-readable description of the validation result
      - `validation_type` string, required: The type of validation rule being applied

## Other responses

- `400`: Operation failed.
- `401`: Operation failed.
- `403`: Operation failed.
- `404`: Operation failed.
- `500`: Operation failed.

## Changes

- **2026-12-01** `b7b456c45a40`: 2 info
  - added the new optional request property `data/custom_field_values/items/field_key`
  - the request property `data/custom_field_values/items/field_id` became optional

[Operation history](https://skmtc.dev/deel/apis/hris-endpoints/changes/time_offs/validate/post.md)

---

[API](https://skmtc.dev/deel/apis/hris-endpoints.md) - [All operations](https://skmtc.dev/deel/apis/hris-endpoints/llms.txt) - [OpenAPI document](https://skmtc.dev/deel/apis/hris-endpoints/revisions/b7b456c45a40?raw)
