---
updatedAt: 2026-03-08T11:24:32.000Z
---

Fetch the complete documentation index at: https://apidocs.hibob.com/llms.txt. Use this file to discover all available pages before exploring further.

# Set end date to a time off request

Triggered when setting the end date of an open-ended time off request.

In the right panel, open **Examples** and select **Payload Example** to see a real payload.


# OpenAPI definition

```json
{
  "openapi": "3.1.1",
  "info": {
    "title": "Time Off API",
    "description": "Use Public API to access Time off requests, policies, and balances in Bob",
    "license": {
      "name": "Proprietary",
      "url": "https://apidocs.hibob.com/docs/api-terms-of-use"
    },
    "contact": {
      "name": "Hi Bob, Inc."
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.hibob.com/v1",
      "description": "Production"
    },
    {
      "url": "https://api.sandbox.hibob.com/v1",
      "description": "Sandbox"
    }
  ],
  "x-readme": {
    "metrics-enabled": false
  },
  "tags": [
    {
      "name": "Time off requests",
      "description": "Operations for managing time off requests"
    },
    {
      "name": "Time off policies",
      "description": "Operations for managing time off policies"
    },
    {
      "name": "Time off balance",
      "description": "Operations for managing time off balances"
    },
    {
      "name": "Time off Webhooks",
      "description": "Webhook events for time off request-related operations"
    }
  ],
  "webhooks": {
    "timeoffRequestRequested": {
      "post": {
        "operationId": "post_webhook_timeoff-request-requested",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Time off request requested",
        "description": "Triggered when submitting a time off request.\n\nUse the **getApi** URL in the payload to retrieve the full request details.\nWhen using the getApi URL immediately after this event, the status in the response will be **approved** if the request was auto-approved, or **pending** if it is awaiting approval.\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestRequestedEvent"
              },
              "example": {
                "companyId": 637323,
                "type": "timeoff.request.requested",
                "triggeredBy": "3419283646526259215",
                "triggeredAt": "2024-10-03T09:29:00.831502",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 32832853,
                  "employeeId": "3373576791477190995",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3373576791477190995/requests/32832853"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "timeoffRequestApproved": {
      "post": {
        "operationId": "post_webhook_timeoff-request-approved",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Time off request approved",
        "description": "Triggered when approving a time off request.\n\nFor auto-approved requests, two events are sent in sequence: **requested** then **approved**.\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestApprovedEvent"
              },
              "example": {
                "companyId": 637323,
                "type": "timeoff.request.approved",
                "triggeredBy": "3419283646526259215",
                "triggeredAt": "2024-10-03T09:29:00.831502",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 32832853,
                  "employeeId": "3373576791477190995",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3373576791477190995/requests/32832853"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "timeoffRequestDeclined": {
      "post": {
        "operationId": "post_webhook_timeoff-request-declined",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Time off request declined",
        "description": "Triggered when declining a time off request.\n\nWhen using the **getApi** URL to retrieve details of a declined request, the status in the response will be **disapproved** (not \"declined\").\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestDeclinedEvent"
              },
              "example": {
                "companyId": 637323,
                "type": "timeoff.request.declined",
                "triggeredBy": "3419283646526259215",
                "triggeredAt": "2024-10-03T09:29:00.831502",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 32832969,
                  "employeeId": "3332883884017713938",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3332883884017713938/requests/32832969"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "timeoffRequestCancelled": {
      "post": {
        "operationId": "post_webhook_timeoff-request-cancelled",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Time off request cancelled",
        "description": "Triggered when cancelling a time off request.\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestCancelledEvent"
              },
              "example": {
                "companyId": 636192,
                "type": "timeoff.request.cancelled",
                "triggeredBy": "3332883804594373380",
                "triggeredAt": "2025-01-02T11:08:26.022782",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 32809865,
                  "employeeId": "3332883804594373380",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3332883804594373380/requests/32809865",
                  "originalRequestId": null
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "timeoffRequestDeleted": {
      "post": {
        "operationId": "post_webhook_timeoff-request-deleted",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Time off request deleted",
        "description": "Triggered when deleting a time off request.\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestDeletedEvent"
              },
              "example": {
                "companyId": 636192,
                "type": "timeoff.request.deleted",
                "triggeredBy": "3332883804594373380",
                "triggeredAt": "2025-01-02T11:08:26.022782",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 32809865,
                  "employeeId": "3332883804594373380",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3332883804594373380/requests/32809865",
                  "originalRequestId": null
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "timeoffRequestUpdated": {
      "post": {
        "operationId": "post_webhook_timeoff-request-updated",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Time off request updated",
        "description": "Triggered when updating a time off request.\n\nFor date or time changes (hard-update), a new request replaces the existing one. The payload then includes **originalRequestId** (the very first request before any modifications) and **previousRequestId** (the most recently replaced request).\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestUpdatedEvent"
              },
              "example": {
                "companyId": 636192,
                "type": "timeoff.request.updated",
                "triggeredBy": "3332883804594373380",
                "triggeredAt": "2025-02-18T16:15:00.218602",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 34902625,
                  "employeeId": "3332883884017713938",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3332883884017713938/requests/34900183",
                  "originalRequestId": 34615592,
                  "previousRequestId": 34900183
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "timeoffRequestImported": {
      "post": {
        "operationId": "post_webhook_timeoff-request-imported",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Time off request created from import",
        "description": "Triggered when importing a time off request.\n\nImported requests are always approved by default. When using the **getApi** URL immediately after this event, the status in the response will be **approved**.\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestImportedEvent"
              },
              "example": {
                "companyId": 637323,
                "type": "timeoff.request.imported",
                "triggeredBy": "3419283646526259215",
                "triggeredAt": "2024-10-03T09:29:00.831502",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 24640322,
                  "employeeId": "3052501936990322832",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3052501936990322832/requests/24640322"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "timeoffRequestSetEndDate": {
      "post": {
        "operationId": "post_webhook_timeoff-request-set-end-date",
        "tags": [
          "Time off Webhooks"
        ],
        "summary": "Set end date to a time off request",
        "description": "Triggered when setting the end date of an open-ended time off request.\n\nIn the right panel, open **Examples** and select **Payload Example** to see a real payload.\n",
        "parameters": [
          {
            "name": "bob-signature",
            "in": "header",
            "required": true,
            "description": "Base64-encoded signature sent with each webhook request. Use it to verify that the request came from Bob. To verify webhook authenticity, see <a href=\"https://apidocs.hibob.com/update/reference?isFramePreview=true#how-does-bob-calculate-the-signature\" target=\"_blank\">How does Bob calculate the signature</a>.",
            "schema": {
              "type": "string",
              "example": "EQScIBkAtTKFW0ictgt5zzOsqIc2+xGEsM88jOdLuW4CM/a3gLEfrKV+IC5IHx0xbirzLKPIfaZjCGwzuiyI8w=="
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoffRequestSetEndDateEvent"
              },
              "example": {
                "companyId": 637323,
                "type": "timeoff.request.setEndDate",
                "triggeredBy": "3419283646526259215",
                "triggeredAt": "2024-10-03T09:29:00.831502",
                "version": "v2",
                "data": {
                  "timeoffRequestId": 32832853,
                  "employeeId": "3373576791477190995",
                  "getApi": "https://api.hibob.com/v1/timeoff/employees/3373576791477190995/requests/32832853"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully"
          },
          "400": {
            "description": "Invalid webhook payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": []
      }
    }
  },
  "paths": {
    "/timeoff/employees/{id}/requests": {
      "post": {
        "operationId": "post_timeoff-employees-id-requests",
        "tags": [
          "Time off requests"
        ],
        "summary": "Submit a new time off request.",
        "description": "Submits a new time off request.<br /> <br />Time off requests can be of the listed types in the body params section below.<br /> <br />Each request type requires different parameters in the body params. Select the type in the body params section to view the expected fields. <br /><br>**Testing Note:**<br/> To test each type of request:<br /> 1. Open the relevant request type in the body params section.<br /> 2. In the test widget on the right, click \"Request Example\" to open the menu, and select the request type you want to send. <br /> 3. Update values and send.<br /> <br>**Important testing disclaimer:** Changing the request type example does not automatically switch the parameters. First, select the request schema, and then select the equivalent request in the \"Request Example\" to avoid inconsistencies in the example fields.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The Employee ID as pulled from the database, or from the URL In Bob when viewing the employee. For example, if the URL in Bob is \"https://app.hibob.com/employee-profile/3332883884017713238\" you should copy the \"3332883884017713238\".",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/SubmitTimeoffRequestDays"
                  },
                  {
                    "$ref": "#/components/schemas/SubmitTimeoffRequestHours"
                  },
                  {
                    "$ref": "#/components/schemas/SubmitTimeoffRequestDiffHoursPerDay"
                  },
                  {
                    "$ref": "#/components/schemas/SubmitTimeoffRequestPortionOnRange"
                  },
                  {
                    "$ref": "#/components/schemas/SubmitTimeoffRequestHoursOnRange"
                  },
                  {
                    "$ref": "#/components/schemas/SubmitTimeoffRequestSpecificHoursOnRange"
                  },
                  {
                    "$ref": "#/components/schemas/SubmitTimeoffRequestDifferentSpecificHoursOnRange"
                  }
                ]
              },
              "examples": {
                "SubmitTimeoffRequestDays": {
                  "summary": "Time off request in days",
                  "value": {
                    "requestRangeType": "days",
                    "policyType": "Holiday",
                    "startDate": "2024-05-29",
                    "startDatePortion": "all_day",
                    "endDate": "2024-06-03",
                    "endDatePortion": "morning",
                    "skipManagerApproval": false,
                    "approver": "3452152476387906847",
                    "description": "a much needed holiday",
                    "reasonCode": 3000
                  }
                },
                "SubmitTimeoffRequestHours": {
                  "summary": "Time off request in hours",
                  "value": {
                    "requestRangeType": "hours",
                    "policyType": "Holiday",
                    "startDate": "2024-05-29",
                    "endDate": "2024-05-29",
                    "hours": 4,
                    "minutes": 30,
                    "skipManagerApproval": false,
                    "approver": "3452152476387906847",
                    "description": "a much needed holiday",
                    "reasonCode": 3000
                  }
                },
                "SubmitTimeoffRequestDiffHoursPerDay": {
                  "summary": "Time off request of different hours per day",
                  "value": {
                    "requestRangeType": "differentDayDurations",
                    "policyType": "Holiday",
                    "startDate": "2024-01-03",
                    "endDate": "2024-01-05",
                    "durations": [
                      {
                        "date": "2024-01-03",
                        "hours": 0,
                        "minutes": 15
                      },
                      {
                        "date": "2024-01-04",
                        "hours": 0,
                        "minutes": 0
                      },
                      {
                        "date": "2024-01-05",
                        "hours": 2,
                        "minutes": 45
                      }
                    ],
                    "skipManagerApproval": false,
                    "approver": "3452152476387906847",
                    "description": "a much needed holiday",
                    "reasonCode": 3000
                  }
                },
                "SubmitTimeoffRequestPortionOnRange": {
                  "summary": "Time off request of same portion per day",
                  "value": {
                    "requestRangeType": "portionOnRange",
                    "policyType": "Holiday",
                    "startDate": "2024-05-29",
                    "endDate": "2024-06-03",
                    "dayPortion": "morning",
                    "skipManagerApproval": false,
                    "approver": "3452152476387906847",
                    "description": "a much needed holiday",
                    "reasonCode": 3000
                  }
                },
                "SubmitTimeoffRequestHoursOnRange": {
                  "summary": "Time off request of same hours per day",
                  "value": {
                    "requestRangeType": "hoursOnRange",
                    "policyType": "Holiday",
                    "startDate": "2024-05-29",
                    "endDate": "2024-06-03",
                    "dailyHours": 7,
                    "dailyMinutes": 30,
                    "skipManagerApproval": false,
                    "approver": "3452152476387906847",
                    "description": "a much needed holiday",
                    "reasonCode": 3000
                  }
                },
                "SubmitTimeoffRequestSpecificHoursOnRange": {
                  "summary": "Time off request of specific hours per day",
                  "value": {
                    "requestRangeType": "specificHoursDayDurations",
                    "policyType": "Holiday",
                    "startDate": "2024-01-03",
                    "endDate": "2024-01-05",
                    "localStartTime": "09:30:00",
                    "localEndTime": "13:00:00",
                    "skipManagerApproval": false,
                    "approver": "3452152476387906847",
                    "description": "a much needed holiday",
                    "reasonCode": 3000
                  }
                },
                "SubmitTimeoffRequestDifferentSpecificHoursOnRange": {
                  "summary": "Time off request of different specific hours per day",
                  "value": {
                    "requestRangeType": "differentSpecificHoursDayDurations",
                    "policyType": "Holiday",
                    "startDate": "2024-01-03",
                    "endDate": "2024-01-06",
                    "durations": [
                      {
                        "date": "2024-01-03",
                        "dayDuration": {
                          "dayDurationType": "specificHoursDayDuration",
                          "localStartTime": "09:00:00",
                          "localEndTime": "11:00:00"
                        }
                      },
                      {
                        "date": "2024-01-04",
                        "dayDuration": {
                          "dayDurationType": "portionDayDuration",
                          "portion": "vacant"
                        }
                      },
                      {
                        "date": "2024-01-05",
                        "dayDuration": {
                          "dayDurationType": "specificHoursDayDuration",
                          "localStartTime": "14:00:00",
                          "localEndTime": "16:30:00"
                        }
                      },
                      {
                        "date": "2024-01-06",
                        "dayDuration": {
                          "dayDurationType": "portionDayDuration",
                          "portion": "all_day"
                        }
                      }
                    ],
                    "skipManagerApproval": false,
                    "approver": "3452152476387906847",
                    "description": "flexible schedule vacation",
                    "reasonCode": 3000
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully submitted",
            "content": {}
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ],
        "x-codegen-request-body-name": "body"
      }
    },
    "/timeoff/employees/{id}/requests/{requestId}": {
      "get": {
        "operationId": "get_timeoff-employees-id-requests-requestid",
        "tags": [
          "Time off requests"
        ],
        "summary": "Get the details of an existing time off request.",
        "description": "Retrieve the detailed info about an existing time off request.<br> <br> \n<b>Possible time off request types:</b> <ul>\n  <li><b>days</b>: the request is for X days.</li>\n  <li>\n    <b>hours</b>: the request is for X hours during the requested day\n    (supported only for policy types measured in hours).\n  </li>\n  <li>\n    <b>portionOnRange</b>: the request is for every morning or every afternoon\n    during the requested days.\n  </li>\n  <li>\n    <b>hoursOnRange</b>: the request is for X hours every day during the\n    requested days.\n  </li>\n  <li>\n    <b>differentDayDurations</b>: the request is for a different amount of\n    hours on each requested day.\n  </li>\n  <li>\n    <b>specificHoursDayDurations</b>: the request is for specific hours per day.\n  </li>\n  <li>\n    <b>differentSpecificHoursDayDurations</b>: the request is for different\n    specific hours or portions on each day.\n  </li>\n  <li>\n    <b>percentageOnRange</b>: the request is for X percent of every day during\n    the requested days.\n  </li>\n  <li><b>openEnded</b>: the request does not have an end date yet.</li>\n</ul> Each request type is represented by a separate schema with the relevant fields.\n<p><b>Daily durations and cost:</b>This endpoint returns a full daily duration and cost breakdown for <b>all request types</b> when <code>includeDailyDurations=true</code> is provided.</p>\n<p><b>Permissions required</b>: Please refer to the main <a href=\"https://apidocs.hibob.com/reference/time-off#required-permissions\">Time off API Required Permissions</a> page. </p>",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The Employee ID as pulled from the database, or from the URL In Bob when viewing the employee. For example, if the URL in Bob is \"https://app.hibob.com/employee-profile/3332883884017713238\" you should copy the \"3332883884017713238\".",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestId",
            "in": "path",
            "description": "request id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "includeDailyDurations",
            "in": "query",
            "description": "Determines whether the response includes daily duration details, including the cost per day. Daily costs are calculated based on the request’s duration unit. The totalCost field is always returned at the request level and represents the sum of all daily costs, even when daily durations are not included.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetTimeoffRequest"
                },
                "examples": {
                  "GetRequestByIdDays": {
                    "summary": "Days request",
                    "value": {
                      "policyTypeDisplayName": "Holiday",
                      "attachmentLinks": [],
                      "endDate": "2025-08-06",
                      "timeZoneOffset": null,
                      "approvedBy": null,
                      "description": null,
                      "type": "days",
                      "createdOn": "2025-08-17T17:07:54.414098",
                      "declinedAt": null,
                      "approved": true,
                      "hasAttachment": false,
                      "requestId": 42016838,
                      "reasonCode": null,
                      "durationUnit": "days",
                      "declineReason": null,
                      "totalDuration": 1.5,
                      "originalRequestId": null,
                      "visibility": "Public",
                      "employeeId": "2911111434173677987",
                      "declinedBy": null,
                      "approvedAt": null,
                      "startPortion": "all_day",
                      "policyTypeCustomName": null,
                      "previousRequestId": null,
                      "endPortion": "morning",
                      "totalCost": 1.5,
                      "startDate": "2025-08-05",
                      "status": "approved",
                      "durations": [
                        {
                          "date": "2025-08-05",
                          "cost": 1
                        },
                        {
                          "date": "2025-08-06",
                          "cost": 0.5
                        }
                      ]
                    }
                  },
                  "GetRequestByIdHours": {
                    "summary": "Hours request",
                    "value": {
                      "date": "2025-08-04",
                      "policyTypeDisplayName": "Holiday",
                      "attachmentLinks": [],
                      "timeZoneOffset": null,
                      "approvedBy": null,
                      "description": null,
                      "type": "hours",
                      "createdOn": "2025-08-17T17:06:04.415477",
                      "declinedAt": null,
                      "approved": true,
                      "hasAttachment": false,
                      "requestId": 42016823,
                      "reasonCode": null,
                      "durationUnit": "hours",
                      "declineReason": null,
                      "totalDuration": 5.5,
                      "originalRequestId": null,
                      "visibility": "Public",
                      "employeeId": "2911111434173677987",
                      "declinedBy": null,
                      "hoursOnDate": 5.5,
                      "approvedAt": null,
                      "policyTypeCustomName": null,
                      "previousRequestId": null,
                      "totalCost": 5.5,
                      "status": "approved",
                      "durations": [
                        {
                          "date": "2025-08-04",
                          "dayDuration": {
                            "hours": 5,
                            "minutes": 30,
                            "dayDurationType": "hoursAndMinutesDayDuration"
                          },
                          "cost": 5.5
                        }
                      ]
                    }
                  },
                  "GetRequestByIdDifferentDayDurations": {
                    "summary": "Different day durations request",
                    "value": {
                      "policyTypeDisplayName": "Holiday",
                      "attachmentLinks": [],
                      "endDate": "2025-08-12",
                      "timeZoneOffset": null,
                      "approvedBy": null,
                      "description": null,
                      "type": "differentDayDurations",
                      "createdOn": "2025-08-17T17:10:06.785864",
                      "declinedAt": null,
                      "approved": true,
                      "hasAttachment": false,
                      "requestId": 42016862,
                      "durations": [
                        {
                          "date": "2025-08-11",
                          "dayDuration": {
                            "hours": 5,
                            "minutes": 0,
                            "dayDurationType": "hoursAndMinutesDayDuration"
                          },
                          "cost": 5
                        },
                        {
                          "date": "2025-08-12",
                          "dayDuration": {
                            "hours": 1,
                            "minutes": 30,
                            "dayDurationType": "hoursAndMinutesDayDuration"
                          },
                          "cost": 1.5
                        }
                      ],
                      "reasonCode": null,
                      "durationUnit": "hours",
                      "declineReason": null,
                      "totalDuration": 6.5,
                      "originalRequestId": null,
                      "visibility": "Public",
                      "employeeId": "2911111434173677987",
                      "declinedBy": null,
                      "approvedAt": null,
                      "policyTypeCustomName": null,
                      "previousRequestId": null,
                      "totalCost": 6.5,
                      "startDate": "2025-08-11",
                      "status": "approved"
                    }
                  },
                  "GetRequestByIdPortionOnRange": {
                    "summary": "Portion-on-range request",
                    "value": {
                      "policyTypeDisplayName": "Holiday",
                      "attachmentLinks": [],
                      "endDate": "2025-08-14",
                      "timeZoneOffset": null,
                      "approvedBy": null,
                      "description": null,
                      "type": "portionOnRange",
                      "createdOn": "2025-08-17T17:12:43.518257",
                      "declinedAt": null,
                      "dayPortion": "morning",
                      "approved": true,
                      "hasAttachment": false,
                      "requestId": 42016894,
                      "reasonCode": null,
                      "durationUnit": "days",
                      "declineReason": null,
                      "totalDuration": 1,
                      "originalRequestId": null,
                      "visibility": "Public",
                      "employeeId": "2911111434173677987",
                      "declinedBy": null,
                      "approvedAt": null,
                      "policyTypeCustomName": null,
                      "previousRequestId": null,
                      "totalCost": 1,
                      "startDate": "2025-08-13",
                      "status": "approved",
                      "durations": [
                        {
                          "date": "2025-08-13",
                          "cost": 0.5
                        },
                        {
                          "date": "2025-08-14",
                          "cost": 0.5
                        }
                      ]
                    }
                  },
                  "GetRequestByIdHoursOnRange": {
                    "summary": "Hours-on-range request",
                    "value": {
                      "policyTypeDisplayName": "Holiday",
                      "attachmentLinks": [],
                      "endDate": "2025-08-19",
                      "timeZoneOffset": null,
                      "approvedBy": null,
                      "description": null,
                      "dailyHours": 2,
                      "type": "hoursOnRange",
                      "createdOn": "2025-08-17T18:22:03.338909",
                      "declinedAt": null,
                      "approved": true,
                      "hasAttachment": false,
                      "requestId": 42017566,
                      "reasonCode": null,
                      "durationUnit": "hours",
                      "declineReason": null,
                      "totalDuration": 4,
                      "originalRequestId": null,
                      "visibility": "Public",
                      "employeeId": "2911111434173677987",
                      "declinedBy": null,
                      "approvedAt": null,
                      "policyTypeCustomName": null,
                      "previousRequestId": null,
                      "totalCost": 4,
                      "startDate": "2025-08-18",
                      "status": "approved",
                      "durations": [
                        {
                          "date": "2025-08-18",
                          "dayDuration": {
                            "hours": 2,
                            "minutes": 0,
                            "dayDurationType": "hoursAndMinutesDayDuration"
                          },
                          "cost": 2
                        },
                        {
                          "date": "2025-08-19",
                          "dayDuration": {
                            "hours": 2,
                            "minutes": 0,
                            "dayDurationType": "hoursAndMinutesDayDuration"
                          },
                          "cost": 2
                        }
                      ]
                    }
                  },
                  "GetRequestByIdSpecificHoursDayDurations": {
                    "summary": "Specific-hours request",
                    "value": {
                      "policyTypeDisplayName": "Holiday",
                      "attachmentLinks": [],
                      "endDate": "2025-08-29",
                      "timeZone": "Europe/London",
                      "timeZoneOffset": "GMT +0:00",
                      "approvedBy": null,
                      "description": null,
                      "type": "specificHoursDayDurations",
                      "createdOn": "2025-08-17T18:33:52.209741",
                      "declinedAt": null,
                      "approved": true,
                      "hasAttachment": false,
                      "requestId": 42017666,
                      "durations": [
                        {
                          "date": "2025-08-28",
                          "dayDuration": {
                            "localStartTime": "04:00:00",
                            "localEndTime": "05:00:00",
                            "dayDurationType": "specificHoursDayDuration"
                          },
                          "cost": 1
                        },
                        {
                          "date": "2025-08-29",
                          "dayDuration": {
                            "localStartTime": "04:00:00",
                            "localEndTime": "05:00:00",
                            "dayDurationType": "specificHoursDayDuration"
                          },
                          "cost": 1
                        }
                      ],
                      "reasonCode": null,
                      "durationUnit": "hours",
                      "declineReason": null,
                      "totalDuration": 2,
                      "originalRequestId": null,
                      "visibility": "Public",
                      "employeeId": "2911111434173677987",
                      "declinedBy": null,
                      "approvedAt": null,
                      "policyTypeCustomName": null,
                      "previousRequestId": null,
                      "totalCost": 2,
                      "startDate": "2025-08-28",
                      "status": "approved"
                    }
                  },
                  "GetRequestByIdDifferentSpecificHoursDayDurations": {
                    "summary": "Different specific hours day durations request",
                    "value": {
                      "policyTypeDisplayName": "Holiday",
                      "attachmentLinks": [],
                      "endDate": "2025-08-31",
                      "timeZone": "Europe/London",
                      "timeZoneOffset": "GMT +0:00",
                      "approvedBy": null,
                      "description": "flexible schedule vacation",
                      "type": "differentSpecificHoursDayDurations",
                      "createdOn": "2025-08-17T18:45:12.123456",
                      "declinedAt": null,
                      "approved": true,
                      "hasAttachment": false,
                      "requestId": 42017707,
                      "reasonCode": 3000,
                      "durationUnit": "hours",
                      "declineReason": null,
                      "totalDuration": 6.5,
                      "originalRequestId": null,
                      "visibility": "Public",
                      "employeeId": "2911111434173677987",
                      "declinedBy": null,
                      "approvedAt": null,
                      "policyTypeCustomName": null,
                      "previousRequestId": null,
                      "totalCost": 6.5,
                      "startDate": "2025-08-28",
                      "status": "approved",
                      "durations": [
                        {
                          "date": "2025-08-28",
                          "dayDuration": {
                            "dayDurationType": "specificHoursDayDuration",
                            "localStartTime": "09:00:00",
                            "localEndTime": "11:00:00"
                          },
                          "cost": 2
                        },
                        {
                          "date": "2025-08-29",
                          "dayDuration": {
                            "dayDurationType": "portionDayDuration",
                            "portion": "vacant"
                          },
                          "cost": 0
                        },
                        {
                          "date": "2025-08-30",
                          "dayDuration": {
                            "dayDurationType": "specificHoursDayDuration",
                            "localStartTime": "14:00:00",
                            "localEndTime": "16:30:00"
                          },
                          "cost": 2.5
                        },
                        {
                          "date": "2025-08-31",
                          "dayDuration": {
                            "dayDurationType": "portionDayDuration",
                            "portion": "all_day"
                          },
                          "cost": 2
                        }
                      ]
                    }
                  },
                  "GetRequestByIdPercentageOnRange": {
                    "summary": "Percentage-on-range request",
                    "value": {
                      "policyTypeDisplayName": "Holiday",
                      "attachmentLinks": [],
                      "endDate": "2025-08-03",
                      "timeZoneOffset": null,
                      "approvedBy": null,
                      "description": null,
                      "type": "percentageOnRange",
                      "createdOn": "2025-08-17T18:37:16.326675",
                      "declinedAt": null,
                      "approved": true,
                      "hasAttachment": false,
                      "requestId": 42017704,
                      "reasonCode": null,
                      "durationUnit": "days",
                      "declineReason": null,
                      "totalDuration": 0.46,
                      "originalRequestId": null,
                      "visibility": "Public",
                      "percentageOfDay": 23,
                      "employeeId": "2911111434173677987",
                      "declinedBy": null,
                      "approvedAt": null,
                      "policyTypeCustomName": null,
                      "previousRequestId": null,
                      "totalCost": 0.46,
                      "startDate": "2025-08-01",
                      "status": "approved",
                      "durations": [
                        {
                          "date": "2025-08-01",
                          "cost": 0.23
                        },
                        {
                          "date": "2025-08-03",
                          "cost": 0.23
                        }
                      ]
                    }
                  },
                  "GetRequestByIdOpenEnded": {
                    "summary": "Open-ended request",
                    "value": {
                      "policyTypeDisplayName": "Holiday",
                      "attachmentLinks": [],
                      "endDate": null,
                      "timeZone": "Europe/London",
                      "timeZoneOffset": null,
                      "approvedBy": null,
                      "description": null,
                      "type": "openEnded",
                      "createdOn": "2025-08-17T18:37:34.825326",
                      "declinedAt": null,
                      "approved": true,
                      "hasAttachment": false,
                      "requestId": 42017706,
                      "reasonCode": null,
                      "durationUnit": "days",
                      "declineReason": null,
                      "totalDuration": 0.5,
                      "originalRequestId": null,
                      "visibility": "Public",
                      "employeeId": "2911111434173677987",
                      "declinedBy": null,
                      "approvedAt": null,
                      "startPortion": "afternoon",
                      "policyTypeCustomName": null,
                      "previousRequestId": null,
                      "endPortion": null,
                      "totalCost": 0.5,
                      "startDate": "2025-08-31",
                      "status": "approved",
                      "durations": [
                        {
                          "date": "2025-08-31",
                          "cost": 0.5
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "A request with the specified ID is not found for the specified employee.",
            "content": {}
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      },
      "delete": {
        "operationId": "delete_timeoff-employees-id-requests-requestid",
        "tags": [
          "Time off requests"
        ],
        "summary": "Cancel an existing time off request",
        "description": "Cancels an existing time off request.<br /> <br /> **Permissions required**: Please refer to the main <a href=\"https://apidocs.hibob.com/reference/time-off#required-permissions\">Time off API Required Permissions</a> page.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Employee ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestId",
            "in": "path",
            "description": "Request ID.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully canceled",
            "content": {}
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/timeoff/requests/changes": {
      "get": {
        "operationId": "get_timeoff-requests-changes",
        "tags": [
          "Time off requests"
        ],
        "summary": "Get time off requests changes",
        "description": "Returns an array of all changes made to time off requests within a specified date range. Each item in the array includes: the time off request details at the time of the change, and the type of change, such as `created` or `deleted`. Optionally, requests that were changed to status `pending` can also be included.  <br /><br /> **Notes:**  <p> <ul> <li>The results are filtered by **the date the change has occurred** (when the request was created or updated), not the start/end date of the time off request itself. </li>         <li>Each change reflects a snapshot of the time off request's status **at the time of the change**, and may not reflect the current status. </li> </ul></p> <p><strong>Durations and cost:</strong></p> <ul>\n  <li>\n    This endpoint returns daily durations only for requests that use day-by-day duration configurations, including:\n    <code>DifferentDayDurations</code>, <code>specificHoursDayDurations</code>, <code>differentSpecificHoursDayDurations</code>.\n  </li>\n  <li>These durations do not include a daily cost breakdown.</li>\n  <li>\n    All requests return <code>totalCost</code>, which represents the amount deducted from the balance for the whole request.\n  </li>\n  <li>\n    To retrieve the cost per day, use <strong><a href=\"https://apidocs.hibob.com/reference/get_timeoff-employees-id-requests-requestid\">Get the details of an existing time off request.</a></strong> with\n    <code>includeDailyDurations=true</code>.\n  </li>\n</ul> <p><strong>Permissions required</strong>: Please refer to the main <a href=\"https://apidocs.hibob.com/reference/time-off#required-permissions\">Time off API Required Permissions</a> page.</p>",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "description": "The starting date for retrieving time off request changes. If the to parameter is missing, only changes from the last 6 months are included. Requests with a date older than 6 months will return an error. Must be in ISO 8601 format, e.g., 2050-04-05T14:30:24.345Z or 2050-04-05T12:30-02:00.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Defines the end of the date range for retrieving time off request changes. Must be later than the since timestamp and cannot extend more than 6 months beyond it. Requests with a later date range will return an error. If omitted, the date range extends from the since timestamp to the present. Must be in ISO 8601 format, e.g., 2050-04-05T14:30:24.345Z or 2050-04-05T12:30-02:00.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "includePending",
            "in": "query",
            "description": "Optional parameter. Indicates whether to include pending requests in the results.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Array of time off requests and their change type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeOffChangesResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/timeoff/whosout": {
      "get": {
        "operationId": "get_timeoff-whosout",
        "tags": [
          "Time off requests"
        ],
        "summary": "Read a list of who's out of the office.",
        "description": "Returns time off information for a given date range, only for the users the Service User can access.<br /><br /> \n<b>Possible time off request types:</b> <ul>\n  <li><b>days</b>: the request is for X days.</li>\n  <li>\n    <b>hours</b>: the request is for X hours during the requested day\n    (supported only for policy types measured in hours).\n  </li>\n  <li>\n    <b>portionOnRange</b>: the request is for every morning or every afternoon\n    during the requested days.\n  </li>\n  <li>\n    <b>hoursOnRange</b>: the request is for X hours every day during the\n    requested days.\n  </li>\n  <li>\n    <b>differentDayDurations</b>: the request is for a different amount of\n    hours on each requested day.\n  </li>\n  <li>\n    <b>specificHoursDayDurations</b>: the request is for specific hours per day.\n  </li>\n  <li>\n    <b>differentSpecificHoursDayDurations</b>: the request is for different\n    specific hours or portions on each day.\n  </li>\n  <li>\n    <b>percentageOnRange</b>: the request is for X percent of every day during\n    the requested days.\n  </li>\n  <li><b>openEnded</b>: the request does not have an end date yet.</li>\n</ul> Each request type is represented by a separate schema with the relevant fields.\n<p><strong>Durations and cost:</strong></p> <ul>\n  <li>\n    This endpoint returns daily durations only for requests that use day-by-day duration configurations, including:\n    <code>DifferentDayDurations</code>, <code>specificHoursDayDurations</code>, <code>differentSpecificHoursDayDurations</code>.\n  </li>\n  <li>These durations do not include a daily cost breakdown.</li>\n  <li>\n    All requests return <code>totalCost</code>, which represents the amount deducted from the balance for the whole request.\n  </li>\n  <li>\n    To retrieve the cost per day, use <strong><a href=\"https://apidocs.hibob.com/reference/get_timeoff-employees-id-requests-requestid\">Get the details of an existing time off request.</a></strong> with\n    <code>includeDailyDurations=true</code>.\n  </li>\n</ul>\n<p><b>Notes:</b></p> <ul>\n  <li><b>Only active users</b> are included in the response.</li>\n  <li>\n    <b>Permissions</b>: Follow the\n    <a href=\"https://apidocs.hibob.com/reference/time-off#required-permissions\">\n      Time off API Required Permissions\n    </a>\n    instructions to ensure the service user has the required permissions.\n  </li>\n  <li>\n    <b>Parameters</b>: The data returned is subject to the parameters used and\n    the permissions granted to the service user. Make sure the relevant\n    permissions are set when using the <code>includePrivate</code> and\n    <code>includePending</code> flags.\n  </li>\n</ul>",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "description": "Start period date",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "End period date",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "includeHourly",
            "in": "query",
            "description": "Include Hourly Requests",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "includePrivate",
            "in": "query",
            "description": "This flag determines whether to return private requests and which name to display in the policyTypeDisplayName field. <br /> <ul> <li> <b>`false`</b>: <br /> Exclude requests with `private` visibility. <br /> For policies with 'public' visibility, return the 'custom' name in the `policyTypeDisplayName` field.<br /></li> <li> <b>`true`</b> (requires permissions as listed in the endpoint's description): <br /> Include requests with `private` visibility. <br /> Always return the original name (not the 'custom' name) in the `policyTypeDisplayName` field. **Note**: when using the `includePrivate` flag, the original policy name may include sensitive information. <br /> </li> </ul>",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "includePending",
            "in": "query",
            "description": "Include Pending Requests",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "includeWorkingRequests",
            "in": "query",
            "description": "Determines whether to include requests linked to “working” policy types, such as Work From Home (WFH) or business travel. These requests are reported as time off but do not represent actual leave. <br /> <ul> <li> `true` (default): Include all time off requests, including those linked to working policy types (where the policy type's `activity`=`workTime`).</li> <li>`false`: Exclude requests linked to working policy types. Only non-working time off requests (holidays, sick leave, unpaid leave, etc.) will be returned (where the policy type's activity = `paidTimeoff` or `unpaidTimeoff`.<br> To learn more, see <a href=\"https://help.hibob.com/hc/en-us/articles/4409792233489#h_01HSGVRA7M4GTRYEFBYDN1K8E7\">Time off policy type settings</a>.</li> </ul>",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Time off requests as seen by the logged in user for a given date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeOffWhosoutResponse"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/timeoff/outtoday": {
      "get": {
        "operationId": "get_timeoff-outtoday",
        "tags": [
          "Time off requests"
        ],
        "summary": "Read a list of who's out of the office today or on the specified date.",
        "description": "Returns the list of people that have a time off request today or on the specified date, only for the users the Service User can access.<br /><br />\n<b>Possible time off request types (<code>requestRangeType</code>):</b> <ul>\n  <li><b>days</b>: the request is for X full days.</li>\n  <li>\n    <b>hours</b>: the request is for X hours during the requested day\n    (supported only for policy types measured in hours).\n  </li>\n  <li>\n    <b>portionOnRange</b>: the request is for every morning or every afternoon\n    during the requested days.\n  </li>\n  <li>\n    <b>hoursOnRange</b>: the request is for X hours every day during the\n    requested days.\n  </li>\n  <li>\n    <b>differentDayDurations</b>: the request is for a different number of\n    hours on each requested day.\n  </li>\n  <li>\n    <b>specificHoursDayDurations</b>: the request is for specific hours per day.\n  </li>\n  <li>\n    <b>differentSpecificHoursDayDurations</b>: the request is for different\n    specific hours or portions on each day.\n  </li>\n  <li>\n    <b>percentageOnRange</b>: the request is for X percent of every day during\n    the requested days.\n  </li>\n  <li><b>openEnded</b>: the request does not have an end date yet.</li>\n</ul> Each request type is represented by a separate schema with the relevant fields.\n<p><strong>Durations and cost:</strong></p> <ul>\n  <li>\n    This endpoint returns daily durations only for requests that use day-by-day duration configurations, including:\n    <code>DifferentDayDurations</code>, <code>specificHoursDayDurations</code>, <code>differentSpecificHoursDayDurations</code>.\n  </li>\n  <li>These durations do not include a daily cost breakdown.</li>\n  <li>\n    All requests return <code>totalCost</code>, which represents the amount deducted from the balance for the whole request.\n  </li>\n  <li>\n    To retrieve the cost per day, use <strong><a href=\"https://apidocs.hibob.com/reference/get_timeoff-employees-id-requests-requestid\">Get the details of an existing time off request.</a></strong> with\n    <code>includeDailyDurations=true</code>.\n  </li>\n</ul>\n<p><b>Notes:</b></p> <ul> <li><b>Permissions</b>: Follow the <a href=\"https://apidocs.hibob.com/reference/time-off#required-permissions\">Time off API Required Permissions</a> instructions to ensure the service user has the required permissions. </li> <li><b>Parameters</b>: The data returned is also subject to parameters and the permissions granted to the Service User. Make sure you set the relevant permissions when using the 'includePending' flag.</li> </ul>",
        "parameters": [
          {
            "name": "today",
            "in": "query",
            "description": "Date to report out of the office. If not specified, the date at UTC at the time of the request is used.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "includeHourly",
            "in": "query",
            "description": "Include Hourly Requests",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "includePrivate",
            "in": "query",
            "description": "This flag determines whether to return private requests and which name to display in the policyTypeDisplayName field. <br /> <ul> <li> <b>`false`</b>: <br /> Exclude requests with `private` visibility. <br /> For policies with 'public' visibility, return the 'custom' name in the `policyTypeDisplayName` field.<br /></li> <li> <b>`true`</b> (requires permissions as listed in the endpoint's description): Include requests with `private` visibility. <br /> Always return the original name (not the 'custom' name) in the `policyTypeDisplayName` field. **Note**: when using the `includePrivate` flag, the original policy name may include sensitive information. <br /> </li> </ul>",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "siteId",
            "in": "query",
            "description": "The employee's site ID",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The list of people who have taken time off, as seen by the logged in user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeOffOutTodayResponse"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/timeoff/employees/{id}/balance": {
      "get": {
        "operationId": "get_timeoff-employees-id-balance",
        "tags": [
          "Time off balance"
        ],
        "summary": "Get the balance for a given employee",
        "description": "Retrieve the balance for a given employee, for a given policy type, as of a given date.<br /> <br /> **Permissions required**: Please refer to the main <a href=\"https://apidocs.hibob.com/reference/time-off#required-permissions\">Time off API Required Permissions</a> page.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The Employee ID as pulled from the database, or from the URL In Bob when viewing the employee. For example, if the URL in Bob is \"https://app.hibob.com/employee-profile/3332883884017713238\" you should copy the \"3332883884017713238\".",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "policyType",
            "in": "query",
            "description": "Policy type name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "description": "Point in time.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Balance result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceResult"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/timeoff/employees/{id}/adjustments": {
      "post": {
        "operationId": "post_timeoff-employees-id-adjustments",
        "tags": [
          "Time off balance"
        ],
        "summary": "Create a balance adjustment.",
        "description": "Create a balance adjustment for a given employee for a given effective date.<br /> <br /> **Permissions required**: Please refer to the main <a href=\"https://apidocs.hibob.com/reference/time-off#required-permissions\">Time off API Required Permissions</a> page.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The Employee ID as pulled from the database, or from the URL In Bob when viewing the employee. For example, if the URL in Bob is \"https://app.hibob.com/employee-profile/3332883884017713238\" you should copy the \"3332883884017713238\".",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {}
          },
          "default": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ],
        "x-codegen-request-body-name": "body"
      }
    },
    "/timeoff/policy-types/{policyType}/reason-codes": {
      "get": {
        "operationId": "get_timeoff-policy-types-policytype-reason-codes",
        "tags": [
          "Time off policies"
        ],
        "summary": "Get Policy type reason codes",
        "description": "Get list of reason codes for a given policy type.<br /> <br /> **Permissions required**: Please refer to the main <a href=\"https://apidocs.hibob.com/reference/time-off#required-permissions\">Time off API Required Permissions</a> page.",
        "parameters": [
          {
            "name": "policyType",
            "in": "path",
            "description": "Policy Type name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of reason codes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReasonCodes"
                }
              }
            }
          },
          "404": {
            "description": "A policy type with the specified name was not found.",
            "content": {}
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      },
      "post": {
        "operationId": "post_timeoff-policy-types-policytype-reason-codes",
        "tags": [
          "Time off policies"
        ],
        "summary": "Add a list of reason codes for a given policy type.",
        "description": "Add a list of reason codes for a given policy type.<br /><b>Supported user types:</b> Service. <br /> **Permissions required**: Please refer to the main <a href=\"https://apidocs.hibob.com/reference/time-off#required-permissions\">Time off API Required Permissions</a> page.",
        "parameters": [
          {
            "name": "policyType",
            "in": "path",
            "description": "Policy Type name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReasonCodesNames"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Submitted successfully.",
            "content": {}
          },
          "404": {
            "description": "A policy type with the specified name was not found.",
            "content": {}
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ],
        "x-codegen-request-body-name": "body"
      }
    },
    "/timeoff/policy-types/{policyType}": {
      "get": {
        "operationId": "get_timeoff-policy-types-policytype",
        "tags": [
          "Time off policies"
        ],
        "summary": "Get Policy type details",
        "description": "Get details about a given policy type.<br /> <br /> **Permissions required**: Please refer to the main <a href=\"https://apidocs.hibob.com/reference/time-off#required-permissions\">Time off API Required Permissions</a> page.<br /><br />",
        "parameters": [
          {
            "name": "policyType",
            "in": "path",
            "description": "Policy Type name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Policy type details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyType"
                }
              }
            }
          },
          "404": {
            "description": "A policy type with the specified name was not found.",
            "content": {}
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/timeoff/policy-types": {
      "get": {
        "operationId": "get_timeoff-policy-types",
        "tags": [
          "Time off policies"
        ],
        "summary": "Get all policy types names.",
        "description": "Get a list of all policy type names.<br /> <br /> **Permissions required**: Please refer to the main <a href=\"https://apidocs.hibob.com/reference/time-off#required-permissions\">Time off API Required Permissions</a> page.",
        "responses": {
          "200": {
            "description": "List of policy types names.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyTypes"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/timeoff/policies": {
      "get": {
        "operationId": "get_timeoff-policies",
        "tags": [
          "Time off policies"
        ],
        "summary": "Get Policy details.",
        "description": "Get details about a given policy.<br /> <br /> **Permissions required**: Please refer to the main <a href=\"https://apidocs.hibob.com/reference/time-off#required-permissions\">Time off API Required Permissions</a> page.",
        "parameters": [
          {
            "name": "policyName",
            "in": "query",
            "description": "Policy name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Policy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Policy"
                }
              }
            }
          },
          "404": {
            "description": "A policy with the specified name was not found.",
            "content": {}
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    },
    "/timeoff/policies/names": {
      "get": {
        "operationId": "get_timeoff-policies-names",
        "tags": [
          "Time off policies"
        ],
        "summary": "Get a list of policy names for a given policy type.",
        "description": "Get a list of policy names for the user's defined policy type.<br /> <br /> **Permissions required**: Please refer to the main <a href=\"https://apidocs.hibob.com/reference/time-off#required-permissions\">Time off API Required Permissions</a> page.",
        "parameters": [
          {
            "name": "policyTypeName",
            "in": "query",
            "description": "Policy type name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of policy names.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyNames"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "WebhookEvent": {
        "type": "object",
        "description": "Base webhook event structure containing common webhook properties",
        "properties": {
          "companyId": {
            "type": "number",
            "description": "The company ID"
          },
          "type": {
            "type": "string",
            "description": "The event type (e.g., timeoff.request.requested)"
          },
          "triggeredBy": {
            "type": "string",
            "description": "The backend-id of the employee that triggered the event, or 'system' for system-triggered events"
          },
          "triggeredAt": {
            "type": "string",
            "description": "The timestamp when the event occurred (ISO 8601-style string)"
          },
          "version": {
            "type": "string",
            "description": "The webhook version (e.g., v2)"
          },
          "data": {
            "type": "object",
            "description": "Event-specific payload; structure varies by event type"
          }
        },
        "required": [
          "companyId",
          "type",
          "triggeredBy",
          "triggeredAt",
          "version",
          "data"
        ]
      },
      "TimeoffRequestRequestedEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.requested event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestApprovedEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.approved event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestDeclinedEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.declined event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestCancelledEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.cancelled event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          },
          "originalRequestId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The ID of the very first request before any modifications"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestDeletedEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.deleted event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          },
          "originalRequestId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The ID of the very first request before any modifications"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestUpdatedEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.updated event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          },
          "originalRequestId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The ID of the very first request before any modifications"
          },
          "previousRequestId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The ID of the most recently replaced request (for date/time changes)"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestImportedEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.imported event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestSetEndDateEventData": {
        "type": "object",
        "description": "Data payload for timeoff.request.setEndDate event",
        "properties": {
          "timeoffRequestId": {
            "type": "integer",
            "format": "int64",
            "description": "The unique identifier of the time off request"
          },
          "employeeId": {
            "type": "string",
            "description": "The unique identifier of the employee"
          },
          "getApi": {
            "type": "string",
            "description": "URL to retrieve the full time off request details via the API"
          }
        },
        "required": [
          "timeoffRequestId",
          "employeeId",
          "getApi"
        ]
      },
      "TimeoffRequestRequestedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.requested"
                ],
                "description": "Event type for time off request submitted"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestRequestedEventData"
              }
            }
          }
        ]
      },
      "TimeoffRequestApprovedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.approved"
                ],
                "description": "Event type for time off request approved"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestApprovedEventData"
              }
            }
          }
        ]
      },
      "TimeoffRequestDeclinedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.declined"
                ],
                "description": "Event type for time off request declined"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestDeclinedEventData"
              }
            }
          }
        ]
      },
      "TimeoffRequestCancelledEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.cancelled"
                ],
                "description": "Event type for time off request cancelled"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestCancelledEventData"
              }
            }
          }
        ]
      },
      "TimeoffRequestDeletedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.deleted"
                ],
                "description": "Event type for time off request deleted"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestDeletedEventData"
              }
            }
          }
        ]
      },
      "TimeoffRequestUpdatedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.updated"
                ],
                "description": "Event type for time off request updated"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestUpdatedEventData"
              }
            }
          }
        ]
      },
      "TimeoffRequestImportedEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.imported"
                ],
                "description": "Event type for time off request created from import"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestImportedEventData"
              }
            }
          }
        ]
      },
      "TimeoffRequestSetEndDateEvent": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEvent"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "timeoff.request.setEndDate"
                ],
                "description": "Event type for setting the end date of an open-ended time off request"
              },
              "data": {
                "$ref": "#/components/schemas/TimeoffRequestSetEndDateEventData"
              }
            }
          }
        ]
      },
      "TimeOffOutTodayBase": {
        "title": "Out Today item (base)",
        "type": "object",
        "properties": {
          "employeeId": {
            "type": "string",
            "description": "Employee ID.",
            "format": "uuid"
          },
          "employeeDisplayName": {
            "type": "string",
            "description": "Employee display name."
          },
          "employeeEmail": {
            "type": "string",
            "description": "Employee email address."
          },
          "policyTypeDisplayName": {
            "type": "string",
            "description": "Display name of the policy type."
          },
          "startDate": {
            "type": "string",
            "format": "date",
            "description": "Date of the first day of the time off.\n"
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/GetTimeoffRequestBase/properties/visibility"
              }
            ]
          }
        }
      },
      "TimeOffOutTodayDays": {
        "title": "Out Today (days)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffOutTodayBase"
          },
          {
            "type": "object",
            "properties": {
              "endDate": {
                "type": "string",
                "description": "Date of the last day of the time off. May be null for open ended requests.\n",
                "format": "date"
              },
              "startDatePortion": {
                "type": "string",
                "description": "What portion of the first day is included - all_day, morning or afternoon (relevant for request using the days type).\n"
              },
              "endDatePortion": {
                "type": "string",
                "description": "What portion of the last day is included - all_day, morning or afternoon (relevant for request using the days type).\n"
              },
              "startPortion": {
                "type": "string",
                "description": "What portion of the first day is included - all_day, morning or afternoon (relevant for request using the days type).\n"
              },
              "endPortion": {
                "type": "string",
                "description": "What portion of the last day is included - all_day, morning or afternoon (relevant for requests using the days type).\n"
              },
              "requestRangeType": {
                "type": "string",
                "description": "The type of request - <b>days</b> is when the request is for X days.<br> \n",
                "enum": [
                  "days"
                ]
              }
            }
          }
        ]
      },
      "TimeOffOutTodayHours": {
        "title": "Out Today (hours)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffOutTodayBase"
          },
          {
            "type": "object",
            "properties": {
              "hours": {
                "type": "integer",
                "description": "The time off duration in hours for the date (relevant for requests with hours type).\n"
              },
              "minutes": {
                "type": "integer",
                "description": "Relevant for requests using the hours type."
              },
              "requestRangeType": {
                "type": "string",
                "description": "The type of request - <b>hours</b> is when the request is for X hours during the day requested (supported only for policy types measured in hours).<br>\n",
                "enum": [
                  "hours"
                ]
              }
            }
          }
        ]
      },
      "TimeOffOutTodayPortionOnRange": {
        "title": "Out Today (portionOnRange)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffOutTodayBase"
          },
          {
            "type": "object",
            "properties": {
              "endDate": {
                "type": "string",
                "description": "Date of the last day of the time off. May be null for open ended requests.\n",
                "format": "date"
              },
              "dayPortion": {
                "type": "string",
                "description": "What portion of the request's days is included - morning or afternoon (relevant for request using the portionOnRange type).\n"
              },
              "requestRangeType": {
                "type": "string",
                "description": "The type of request - <b>portionOnRange</b> is when the request is for every morning or every afternoon during the days requested.<br>\n",
                "enum": [
                  "portionOnRange"
                ]
              }
            }
          }
        ]
      },
      "TimeOffOutTodayHoursOnRange": {
        "title": "Out Today (hoursOnRange)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffOutTodayBase"
          },
          {
            "type": "object",
            "properties": {
              "endDate": {
                "type": "string",
                "description": "Date of the last day of the time off. May be null for open ended requests.\n",
                "format": "date"
              },
              "dailyHours": {
                "type": "number",
                "description": "The time off duration in hours for every request's days (relevant for requests with hoursOnRange type).\n"
              },
              "requestRangeType": {
                "type": "string",
                "description": "The type of request - <b>hoursOnRange</b> is when the request is for X hours every day during the days requested.<br> \n",
                "enum": [
                  "hoursOnRange"
                ]
              }
            }
          }
        ]
      },
      "TimeOffOutTodayDifferentDayDurations": {
        "title": "Out Today (differentDayDurations)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffOutTodayBase"
          },
          {
            "type": "object",
            "properties": {
              "endDate": {
                "type": "string",
                "description": "Date of the last day of the time off. May be null for open ended requests.\n",
                "format": "date"
              },
              "durations": {
                "type": "array",
                "description": "Array of durations for each day in the request. \n",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "format": "date"
                    },
                    "dayDuration": {
                      "$ref": "#/components/schemas/HoursAndMinutesDayDuration"
                    }
                  }
                }
              },
              "requestRangeType": {
                "type": "string",
                "description": "The type of request - <b>differentDayDurations</b> is when the request is for a different amount of hours on each of the days requested.<br> \n",
                "enum": [
                  "differentDayDurations"
                ]
              }
            }
          }
        ]
      },
      "TimeOffOutTodaySpecificHoursDayDurations": {
        "title": "Out Today (specificHoursDayDurations)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffOutTodayBase"
          },
          {
            "type": "object",
            "properties": {
              "endDate": {
                "type": "string",
                "description": "Date of the last day of the time off. May be null for open ended requests.\n",
                "format": "date"
              },
              "timeZone": {
                "type": "string",
                "description": "The calculated time zone name. The value for this fields is automatically determined based on the time zone of the employee’s assigned site.\n"
              },
              "durations": {
                "type": "array",
                "description": "Array of durations for each day in the request. \n",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "format": "date"
                    },
                    "dayDuration": {
                      "type": "object",
                      "properties": {
                        "localStartTime": {
                          "type": "string"
                        },
                        "localEndTime": {
                          "type": "string"
                        },
                        "dayDurationType": {
                          "type": "string",
                          "enum": [
                            "specificHoursDayDuration"
                          ]
                        }
                      }
                    }
                  }
                }
              },
              "requestRangeType": {
                "type": "string",
                "description": "The type of request - <b>specificHoursDayDurations</b> is when the request is for specific hours per day.<br> \n",
                "enum": [
                  "specificHoursDayDurations"
                ]
              }
            }
          }
        ]
      },
      "TimeOffOutTodayDifferentSpecificHoursDayDurations": {
        "title": "Out Today (differentSpecificHoursDayDurations)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffOutTodayBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off"
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off."
              },
              "timeZone": {
                "type": "string",
                "description": "The time zone for the time off request"
              },
              "durations": {
                "type": "array",
                "description": "Array of day durations for the time off request",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "format": "date",
                      "description": "The date for this duration entry"
                    },
                    "dayDuration": {
                      "description": "The duration for this specific date. Each date must include exactly one of the following types: <ul> <li>SpecificHoursDayDuration</li> <li>PortionDayDuration</li> </ul>\n",
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/SpecificHoursDayDuration"
                        },
                        {
                          "$ref": "#/components/schemas/DiffSpecHoursPortionDayDuration"
                        }
                      ]
                    }
                  },
                  "required": [
                    "date",
                    "dayDuration"
                  ]
                }
              },
              "requestRangeType": {
                "type": "string",
                "enum": [
                  "differentSpecificHoursDayDurations"
                ]
              }
            }
          }
        ]
      },
      "TimeOffOutTodayPercentageOnRange": {
        "title": "Out Today (percentageOnRange)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffOutTodayBase"
          },
          {
            "type": "object",
            "properties": {
              "endDate": {
                "type": "string",
                "description": "Date of the last day of the time off. May be null for open ended requests.\n",
                "format": "date"
              },
              "percentageOfDay": {
                "description": "The percentage of day requested",
                "type": "integer"
              },
              "requestRangeType": {
                "type": "string",
                "description": "The type of request <b>percentageOnRange</b> is when the request is for X percent of every day during the days requested.\n",
                "enum": [
                  "percentageOnRange"
                ]
              }
            }
          }
        ]
      },
      "TimeOffOutTodayOpenEnded": {
        "title": "Out Today (openEnded)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffOutTodayBase"
          },
          {
            "type": "object",
            "properties": {
              "endDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Date of the last day of the time off (may be null for open-ended requests).\n"
              },
              "startDatePortion": {
                "type": "string",
                "description": "What portion of the first day is included - all_day, morning or afternoon (relevant for request using the days type).\n"
              },
              "endDatePortion": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What portion of the last day is included - all_day, morning or afternoon (may be null for open-ended requests).\n"
              },
              "startPortion": {
                "type": "string",
                "description": "What portion of the first day is included - all_day, morning or afternoon (relevant for request using the days type).\n"
              },
              "endPortion": {
                "type": "string",
                "description": "What portion of the last day is included - all_day, morning or afternoon (relevant for requests using the days type).\n"
              },
              "timeZone": {
                "type": "string",
                "description": "The calculated time zone name. The value for this fields is automatically determined based on the time zone of the employee’s assigned site.\n"
              },
              "requestRangeType": {
                "type": "string",
                "description": "The type of request - <b>openEnded</b> is when the request doesn't have an end date yet.\n",
                "enum": [
                  "openEnded"
                ]
              }
            }
          }
        ]
      },
      "TimeOffOutToday": {
        "title": "Out Today item",
        "oneOf": [
          {
            "$ref": "#/components/schemas/TimeOffOutTodayDays"
          },
          {
            "$ref": "#/components/schemas/TimeOffOutTodayHours"
          },
          {
            "$ref": "#/components/schemas/TimeOffOutTodayPortionOnRange"
          },
          {
            "$ref": "#/components/schemas/TimeOffOutTodayHoursOnRange"
          },
          {
            "$ref": "#/components/schemas/TimeOffOutTodayDifferentDayDurations"
          },
          {
            "$ref": "#/components/schemas/TimeOffOutTodaySpecificHoursDayDurations"
          },
          {
            "$ref": "#/components/schemas/TimeOffOutTodayDifferentSpecificHoursDayDurations"
          },
          {
            "$ref": "#/components/schemas/TimeOffOutTodayPercentageOnRange"
          },
          {
            "$ref": "#/components/schemas/TimeOffOutTodayOpenEnded"
          }
        ],
        "discriminator": {
          "propertyName": "requestRangeType",
          "mapping": {
            "days": "#/components/schemas/TimeOffOutTodayDays",
            "hours": "#/components/schemas/TimeOffOutTodayHours",
            "portionOnRange": "#/components/schemas/TimeOffOutTodayPortionOnRange",
            "hoursOnRange": "#/components/schemas/TimeOffOutTodayHoursOnRange",
            "differentDayDurations": "#/components/schemas/TimeOffOutTodayDifferentDayDurations",
            "specificHoursDayDurations": "#/components/schemas/TimeOffOutTodaySpecificHoursDayDurations",
            "differentSpecificHoursDayDurations": "#/components/schemas/TimeOffOutTodayDifferentSpecificHoursDayDurations",
            "percentageOnRange": "#/components/schemas/TimeOffOutTodayPercentageOnRange",
            "openEnded": "#/components/schemas/TimeOffOutTodayOpenEnded"
          }
        }
      },
      "TimeOffOutTodayResponse": {
        "title": "Out Today response",
        "type": "object",
        "properties": {
          "outs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeOffOutToday"
            }
          }
        },
        "required": [
          "outs"
        ],
        "example": {
          "outs": [
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "employeeEmail": "joe.doe@samplebob.com",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "requestRangeType": "hours",
              "startDate": "2025-08-04",
              "hours": 5,
              "minutes": 30
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "employeeEmail": "joe.doe@samplebob.com",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "requestRangeType": "days",
              "startDate": "2025-08-05",
              "endDate": "2025-08-06",
              "startDatePortion": "all_day",
              "endDatePortion": "morning"
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "employeeEmail": "joe.doe@samplebob.com",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "requestRangeType": "differentDayDurations",
              "startDate": "2025-08-11",
              "endDate": "2025-08-12",
              "durations": [
                {
                  "date": "2025-08-11",
                  "dayDuration": {
                    "hours": 5,
                    "minutes": 0,
                    "dayDurationType": "hoursAndMinutesDayDuration"
                  }
                },
                {
                  "date": "2025-08-12",
                  "dayDuration": {
                    "hours": 1,
                    "minutes": 30,
                    "dayDurationType": "hoursAndMinutesDayDuration"
                  }
                }
              ]
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "employeeEmail": "joe.doe@samplebob.com",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "requestRangeType": "portionOnRange",
              "startDate": "2025-08-13",
              "endDate": "2025-08-14",
              "dayPortion": "morning"
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "employeeEmail": "joe.doe@samplebob.com",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "requestRangeType": "hoursOnRange",
              "startDate": "2025-08-18",
              "endDate": "2025-08-19",
              "dailyHours": 2
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "employeeEmail": "joe.doe@samplebob.com",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "requestRangeType": "specificHoursDayDurations",
              "timeZone": "Europe/London",
              "startDate": "2025-08-28",
              "endDate": "2025-08-29",
              "durations": [
                {
                  "date": "2025-08-28",
                  "dayDuration": {
                    "localStartTime": "04:00:00",
                    "localEndTime": "05:00:00",
                    "dayDurationType": "specificHoursDayDuration"
                  }
                },
                {
                  "date": "2025-08-29",
                  "dayDuration": {
                    "localStartTime": "04:00:00",
                    "localEndTime": "05:00:00",
                    "dayDurationType": "specificHoursDayDuration"
                  }
                }
              ]
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "employeeEmail": "joe.doe@samplebob.com",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "requestRangeType": "differentSpecificHoursDayDurations",
              "timeZone": "Europe/London",
              "startDate": "2025-08-28",
              "endDate": "2025-08-31",
              "durations": [
                {
                  "date": "2025-08-28",
                  "dayDuration": {
                    "dayDurationType": "specificHoursDayDuration",
                    "localStartTime": "09:00:00",
                    "localEndTime": "11:00:00"
                  }
                },
                {
                  "date": "2025-08-29",
                  "dayDuration": {
                    "dayDurationType": "portionDayDuration",
                    "portion": "vacant"
                  }
                },
                {
                  "date": "2025-08-30",
                  "dayDuration": {
                    "dayDurationType": "specificHoursDayDuration",
                    "localStartTime": "14:00:00",
                    "localEndTime": "16:30:00"
                  }
                },
                {
                  "date": "2025-08-31",
                  "dayDuration": {
                    "dayDurationType": "portionDayDuration",
                    "portion": "all_day"
                  }
                }
              ]
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "employeeEmail": "joe.doe@samplebob.com",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "requestRangeType": "percentageOnRange",
              "startDate": "2025-08-01",
              "endDate": "2025-08-03",
              "percentageOfDay": 23
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "employeeEmail": "user@example.com",
              "requestRangeType": "openEnded",
              "startDate": "2025-08-31",
              "startPortion": "afternoon",
              "endPortion": null,
              "endDate": null,
              "timeZone": "Europe/London",
              "startDatePortion": "afternoon",
              "endDatePortion": null
            }
          ]
        }
      },
      "TimeOffWhosoutBase": {
        "title": "Who's out item (base)",
        "type": "object",
        "properties": {
          "requestId": {
            "type": "integer",
            "format": "int64",
            "description": "The backend ID of the request."
          },
          "employeeId": {
            "type": "string",
            "description": "Employee ID.",
            "format": "uuid"
          },
          "employeeDisplayName": {
            "type": "string",
            "description": "Employee display name."
          },
          "policyType": {
            "type": "string",
            "description": "Request policy type, e.g. Holiday, Sick or any defined custom type."
          },
          "policyTypeDisplayName": {
            "type": "string",
            "description": "Display name for the policy type. This will be translated based on the locale.\n"
          },
          "status": {
            "type": "string",
            "description": "Request status. This can be either Approved or Pending."
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/GetTimeoffRequestBase/properties/visibility"
              }
            ]
          }
        }
      },
      "TimeOffWhosoutHours": {
        "title": "Who's out (hours)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffWhosoutBase"
          },
          {
            "type": "object",
            "properties": {
              "date": {
                "type": "string",
                "description": "Date of the time off\n",
                "format": "date"
              },
              "hoursOnDate": {
                "type": "number",
                "description": "The time off duration in hours for the date (relevant for request using the hours type).\n"
              },
              "minutes": {
                "type": "integer",
                "description": "Relevant for request using the hours type.\n"
              },
              "type": {
                "type": "string",
                "description": "The type of request - <b>hours</b> is when the request is for X hours during the day requested (supported only for policy types measured in hours).<br> \n",
                "enum": [
                  "hours"
                ]
              }
            }
          }
        ]
      },
      "TimeOffWhosoutDays": {
        "title": "Who's out (days)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffWhosoutBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "description": "Date of the first day of the time off.\n",
                "format": "date"
              },
              "startPortion": {
                "type": "string",
                "description": "What portion of the first day is included - all_day, morning or afternoon (relevant for request using the days type).\n"
              },
              "endDate": {
                "type": "string",
                "description": "Date of the last day of the time off (may be null for open ended requests).\n",
                "format": "date"
              },
              "endPortion": {
                "type": "string",
                "description": "What portion of the last day is included - all_day, morning or afternoon (relevant for requests using the days type).\n"
              },
              "type": {
                "type": "string",
                "description": "The type of request - <b>days</b> is when the request is for X days.<br> \n",
                "enum": [
                  "days"
                ]
              }
            }
          }
        ]
      },
      "TimeOffWhosoutPortionOnRange": {
        "title": "Who's out (portionOnRange)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffWhosoutBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "description": "Date of the first day of the time off.\n",
                "format": "date"
              },
              "endDate": {
                "type": "string",
                "description": "Date of the last day of the time off.\n",
                "format": "date"
              },
              "dayPortion": {
                "type": "string",
                "description": "What portion of the request's days is included - morning or afternoon.\n"
              },
              "type": {
                "type": "string",
                "description": "The type of request - <b>portionOnRange</b> is when the request is for every morning or every afternoon during the days requested.<br>\n",
                "enum": [
                  "portionOnRange"
                ]
              }
            }
          }
        ]
      },
      "TimeOffWhosoutHoursOnRange": {
        "title": "Who's out (hoursOnRange)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffWhosoutBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "description": "Date of the first day of the time off.\n",
                "format": "date"
              },
              "endDate": {
                "type": "string",
                "description": "Date of the last day of the time off (may be null for open ended requests).\n",
                "format": "date"
              },
              "dailyHours": {
                "type": "number",
                "description": "The time off duration in hours for every day in the request.\n"
              },
              "type": {
                "type": "string",
                "description": "The type of request - <b>hoursOnRange</b> is when the request is for X hours every day during the days requested.<br> \n",
                "enum": [
                  "hoursOnRange"
                ]
              }
            }
          }
        ]
      },
      "TimeOffWhosoutDifferentDayDurations": {
        "title": "Who's out (differentDayDurations)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffWhosoutBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "description": "Date of the first day of the time off.\n",
                "format": "date"
              },
              "endDate": {
                "type": "string",
                "description": "Date of the last day of the time off (may be null for open ended requests).\n",
                "format": "date"
              },
              "durations": {
                "type": "array",
                "description": "Array of durations for each day in the request. \n",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "format": "date"
                    },
                    "dayDuration": {
                      "$ref": "#/components/schemas/HoursAndMinutesDayDuration"
                    }
                  }
                }
              },
              "type": {
                "type": "string",
                "description": "The type of request - <b>differentDayDurations</b> is when the request is for a different amount of hours on each of the days requested.<br> \n",
                "enum": [
                  "differentDayDurations"
                ]
              }
            }
          }
        ]
      },
      "TimeOffWhosoutSpecificHoursDayDurations": {
        "title": "Who's out (specificHoursDayDurations)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffWhosoutBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "description": "Date of the first day of the time off.\n",
                "format": "date"
              },
              "endDate": {
                "type": "string",
                "description": "Date of the last day of the time off (may be null for open ended requests).\n",
                "format": "date"
              },
              "timeZone": {
                "type": "string",
                "description": "The calculated time zone name. The value for this fields is automatically determined based on the time zone of the employee’s assigned site.\n"
              },
              "durations": {
                "type": "array",
                "description": "Array of durations for each day in the request. \n",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "format": "date"
                    },
                    "dayDuration": {
                      "type": "object",
                      "properties": {
                        "localStartTime": {
                          "type": "string"
                        },
                        "localEndTime": {
                          "type": "string"
                        },
                        "dayDurationType": {
                          "type": "string",
                          "enum": [
                            "specificHoursDayDuration"
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "date",
                    "dayDuration"
                  ]
                }
              },
              "type": {
                "type": "string",
                "description": "The type of request - <b>specificHoursDayDurations</b> is when the request is for specific hours per day.<br> \n",
                "enum": [
                  "specificHoursDayDurations"
                ]
              }
            }
          }
        ]
      },
      "TimeOffWhosoutDifferentSpecificHoursDayDurations": {
        "title": "Who's out (differentSpecificHoursDayDurations)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffWhosoutBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off"
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off."
              },
              "timeZone": {
                "type": "string",
                "description": "The time zone for the time off request"
              },
              "durations": {
                "type": "array",
                "description": "Array of day durations for the time off request",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "format": "date",
                      "description": "The date for this duration entry"
                    },
                    "dayDuration": {
                      "description": "The duration for this specific date. Each date must include exactly one of the following types: <ul> <li>SpecificHoursDayDuration</li> <li>PortionDayDuration</li> </ul>\n",
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/SpecificHoursDayDuration"
                        },
                        {
                          "$ref": "#/components/schemas/DiffSpecHoursPortionDayDuration"
                        }
                      ]
                    }
                  },
                  "required": [
                    "date",
                    "dayDuration"
                  ]
                }
              },
              "type": {
                "type": "string",
                "enum": [
                  "differentSpecificHoursDayDurations"
                ]
              }
            }
          }
        ]
      },
      "TimeOffWhosoutPercentageOnRange": {
        "title": "Who's out (percentageOnRange)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffWhosoutBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "description": "Date of the first day of the time off.\n",
                "format": "date"
              },
              "endDate": {
                "type": "string",
                "description": "Date of the last day of the time off (may be null for open ended requests).\n",
                "format": "date"
              },
              "percentageOfDay": {
                "type": "integer",
                "description": "The percent of the day requested. \n"
              },
              "type": {
                "type": "string",
                "description": "The type of request  -<b>percentageOnRange</b> is when the request is for X percent of every day during the days requested.\n",
                "enum": [
                  "percentageOnRange"
                ]
              }
            }
          }
        ]
      },
      "TimeOffWhosoutOpenEnded": {
        "title": "Who's out (openEnded)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffWhosoutBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off."
              },
              "endDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Date of the last day of the time off (may be null for open-ended requests)."
              },
              "startPortion": {
                "type": "string",
                "description": "What portion of the first day is included - all_day, morning or afternoon (relevant for requests using the `days`-like types).\n"
              },
              "endPortion": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What portion of the last day is included - all_day, morning or afternoon (may be null for open-ended requests).\n"
              },
              "timeZone": {
                "type": "string",
                "description": "The calculated time zone name. The value for this fields is automatically determined based on the time zone of the employee’s assigned site.\n"
              },
              "type": {
                "type": "string",
                "description": "The type of request - <b>openEnded</b> is when the request doesn't have an end date yet.\n",
                "enum": [
                  "openEnded"
                ]
              }
            }
          }
        ]
      },
      "TimeOffWhosout": {
        "title": "Who's out item",
        "oneOf": [
          {
            "$ref": "#/components/schemas/TimeOffWhosoutDays"
          },
          {
            "$ref": "#/components/schemas/TimeOffWhosoutHours"
          },
          {
            "$ref": "#/components/schemas/TimeOffWhosoutPortionOnRange"
          },
          {
            "$ref": "#/components/schemas/TimeOffWhosoutHoursOnRange"
          },
          {
            "$ref": "#/components/schemas/TimeOffWhosoutDifferentDayDurations"
          },
          {
            "$ref": "#/components/schemas/TimeOffWhosoutSpecificHoursDayDurations"
          },
          {
            "$ref": "#/components/schemas/TimeOffWhosoutDifferentSpecificHoursDayDurations"
          },
          {
            "$ref": "#/components/schemas/TimeOffWhosoutPercentageOnRange"
          },
          {
            "$ref": "#/components/schemas/TimeOffWhosoutOpenEnded"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "days": "#/components/schemas/TimeOffWhosoutDays",
            "hours": "#/components/schemas/TimeOffWhosoutHours",
            "portionOnRange": "#/components/schemas/TimeOffWhosoutPortionOnRange",
            "hoursOnRange": "#/components/schemas/TimeOffWhosoutHoursOnRange",
            "differentDayDurations": "#/components/schemas/TimeOffWhosoutDifferentDayDurations",
            "specificHoursDayDurations": "#/components/schemas/TimeOffWhosoutSpecificHoursDayDurations",
            "differentSpecificHoursDayDurations": "#/components/schemas/TimeOffWhosoutDifferentSpecificHoursDayDurations",
            "percentageOnRange": "#/components/schemas/TimeOffWhosoutPercentageOnRange",
            "openEnded": "#/components/schemas/TimeOffWhosoutOpenEnded"
          }
        }
      },
      "TimeOffWhosoutResponse": {
        "title": "Who's out response",
        "description": "Array of time off requests; each item’s shape depends on its `type`.",
        "type": "object",
        "properties": {
          "outs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeOffWhosout"
            }
          }
        },
        "required": [
          "outs"
        ],
        "example": {
          "outs": [
            {
              "date": "2025-08-04",
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "requestId": 42016823,
              "minutes": 30,
              "policyType": "type6",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "hoursOnDate": 5,
              "type": "hours",
              "status": "approved"
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "endDate": "2025-08-06",
              "requestId": 42016838,
              "policyType": "type43",
              "startPortion": "all_day",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "endPortion": "morning",
              "type": "days",
              "startDate": "2025-08-05",
              "status": "approved"
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "endDate": "2025-08-12",
              "requestId": 42016862,
              "policyType": "type44",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "durations": [
                {
                  "date": "2025-08-11",
                  "dayDuration": {
                    "hours": 5,
                    "minutes": 0,
                    "dayDurationType": "hoursAndMinutesDayDuration"
                  }
                },
                {
                  "date": "2025-08-12",
                  "dayDuration": {
                    "hours": 1,
                    "minutes": 30,
                    "dayDurationType": "hoursAndMinutesDayDuration"
                  }
                }
              ],
              "type": "differentDayDurations",
              "startDate": "2025-08-11",
              "status": "approved"
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "endDate": "2025-08-14",
              "requestId": 42016894,
              "policyType": "type45",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "type": "portionOnRange",
              "startDate": "2025-08-13",
              "dayPortion": "morning",
              "status": "approved"
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "endDate": "2025-08-19",
              "requestId": 42017566,
              "policyType": "type46",
              "dailyHours": 2,
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "type": "hoursOnRange",
              "startDate": "2025-08-18",
              "status": "approved"
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "endDate": "2025-08-29",
              "requestId": 42017666,
              "policyType": "type51",
              "timeZone": "Europe/London",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "durations": [
                {
                  "date": "2025-08-28",
                  "dayDuration": {
                    "localStartTime": "04:00:00",
                    "localEndTime": "05:00:00",
                    "dayDurationType": "specificHoursDayDuration"
                  }
                },
                {
                  "date": "2025-08-29",
                  "dayDuration": {
                    "localStartTime": "04:00:00",
                    "localEndTime": "05:00:00",
                    "dayDurationType": "specificHoursDayDuration"
                  }
                }
              ],
              "type": "specificHoursDayDurations",
              "startDate": "2025-08-28",
              "status": "approved"
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "endDate": "2025-08-31",
              "requestId": 42017707,
              "policyType": "type52",
              "timeZone": "Europe/London",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "type": "differentSpecificHoursDayDurations",
              "startDate": "2025-08-28",
              "status": "approved",
              "durations": [
                {
                  "date": "2025-08-28",
                  "dayDuration": {
                    "dayDurationType": "specificHoursDayDuration",
                    "localStartTime": "09:00:00",
                    "localEndTime": "11:00:00"
                  }
                },
                {
                  "date": "2025-08-29",
                  "dayDuration": {
                    "dayDurationType": "portionDayDuration",
                    "portion": "vacant"
                  }
                },
                {
                  "date": "2025-08-30",
                  "dayDuration": {
                    "dayDurationType": "specificHoursDayDuration",
                    "localStartTime": "14:00:00",
                    "localEndTime": "16:30:00"
                  }
                },
                {
                  "date": "2025-08-31",
                  "dayDuration": {
                    "dayDurationType": "portionDayDuration",
                    "portion": "all_day"
                  }
                }
              ]
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "endDate": "2025-08-03",
              "requestId": 42017704,
              "policyType": "type48",
              "percentageOfDay": 23,
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "type": "percentageOnRange",
              "startDate": "2025-08-01",
              "status": "approved"
            },
            {
              "policyTypeDisplayName": "Holiday",
              "visibility": "Public",
              "requestId": 42017706,
              "policyType": "type48",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "type": "openEnded",
              "startDate": "2025-08-31",
              "endDate": null,
              "timeZone": "Europe/London",
              "startPortion": "afternoon",
              "endPortion": null,
              "status": "approved"
            }
          ]
        }
      },
      "ReasonCode": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "displayName": {
            "type": "string"
          }
        }
      },
      "ReasonCodes": {
        "type": "object",
        "properties": {
          "reasonCodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReasonCode"
            }
          }
        }
      },
      "ReasonCodesNames": {
        "type": "object",
        "properties": {
          "reasonCodes": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "A list of reason codes."
            }
          }
        }
      },
      "PolicyType": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "activity": {
            "type": "string",
            "description": "Defines whether an employee that requests time off would have the leave defined as: <ul> <li>`paidTimeoff ` (Not working, paid): typically for paid vacation, paid sick, and parental leave. </li> <li> `unpaidTimeoff` (Not working, unpaid): typically for when an employees has used all of their paid time off balance, but still needs to take time off. </li> <li> `workTime ` (Working): typically for working from home (WFH) or business travel. </ul> To learn more, see <a href=\"https://help.hibob.com/hc/en-us/articles/4409792233489#h_01HSGVRA7M4GTRYEFBYDN1K8E7\">Time off policy type settings</a>. </li>",
            "enum": [
              "paidTimeoff",
              "unpaidTimeoff",
              "workTime"
            ]
          },
          "unit": {
            "type": "string",
            "enum": [
              "days",
              "hours"
            ]
          }
        }
      },
      "PolicyTypes": {
        "type": "object",
        "properties": {
          "policyTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PolicyNames": {
        "type": "object",
        "properties": {
          "policyNames": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "A list of policy names."
            }
          }
        }
      },
      "Policy": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "allowance": {
            "type": "number",
            "description": "Base annual allowance."
          },
          "maxBalance": {
            "type": "number",
            "description": "Maximum balance at the end of the cycle."
          },
          "minBalance": {
            "type": "number",
            "description": "Minimum balance cap."
          },
          "yosIncrease": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/YearsOfServiceIncrements"
            }
          },
          "minTimeOffRequestDuration": {
            "type": "string",
            "description": "The shortest amount of time employees can request.",
            "enum": [
              "fullDay",
              "halfDay",
              "fullHour",
              "halfHour",
              "quarterHour",
              "tenMinutes"
            ]
          },
          "bookingWorkDaysOnly": {
            "type": "boolean",
            "description": "This property defines whether non-working days such as weekends and bank holidays will be deducted from the balance. <br /><br /> **Change in behavior starting November 20, 2024**: From this date, the `bookingWorkDaysOnly` setting has moved from the **Policy Type** to the **Policy** details. Policies that were created before this date will return the original value from the policy type."
          },
          "approvalRequired": {
            "type": "boolean",
            "description": "Requests require approval."
          },
          "description": {
            "type": "string",
            "description": "Policy description."
          },
          "unit": {
            "type": "string",
            "enum": [
              "days",
              "hours"
            ]
          }
        }
      },
      "YearsOfServiceIncrements": {
        "type": "object",
        "properties": {
          "yearsOfService": {
            "type": "number",
            "description": "Start after this number of years."
          },
          "extraDays": {
            "type": "number",
            "description": "Additional days to add."
          }
        }
      },
      "BalanceResult": {
        "type": "object",
        "properties": {
          "employeeId": {
            "type": "string",
            "description": "Employee ID."
          },
          "totalBalanceAsOfDate": {
            "type": "number",
            "description": "The retrieved balance as of this date."
          },
          "totalRoundedBalanceAsOfDate": {
            "type": "number",
            "description": "The retrieved rounded balance as of this date."
          },
          "pointInTime": {
            "type": "string",
            "description": "The balance date.",
            "format": "date"
          },
          "startingBalance": {
            "type": "number",
            "description": "The balance as of the cycle start date."
          },
          "startingBalanceAsOf": {
            "type": "string",
            "description": "The cycle start date.",
            "format": "date"
          },
          "totalTaken": {
            "type": "number",
            "description": "Total number of days/hours taken."
          },
          "totalAdminAdjustments": {
            "type": "number",
            "description": "Total number of days/hours manually adjusted."
          },
          "totalSystemAdjustments": {
            "type": "number",
            "description": "Total number of days/hours adjusted."
          },
          "annualAllowance": {
            "type": "number",
            "description": "Annual allowance."
          },
          "policy": {
            "type": "string",
            "description": "Policy name."
          },
          "currentAssignment": {
            "type": "string",
            "description": "This field indicates whether the employee is actively assigned to the policy type on the date the balance is requested.  `Unassigned` means the employee is not actively assigned to the policy type on the requested date. Balance values may still reflect amounts accrued while the employee was previously assigned.",
            "enum": [
              "Assigned",
              "Unassigned"
            ]
          }
        }
      },
      "AdjustmentRequest": {
        "type": "object",
        "properties": {
          "adjustmentType": {
            "type": "string",
            "description": "Adjustment type - balance or time used.",
            "enum": [
              "balance",
              "daysUsed"
            ]
          },
          "policyType": {
            "type": "string",
            "description": "Policy type name."
          },
          "effectiveDate": {
            "type": "string",
            "description": "The date this adjustment becomes effective.",
            "format": "date"
          },
          "amount": {
            "type": "number",
            "description": "The amount of days/hours to add/subtract."
          },
          "reason": {
            "type": "string",
            "description": "A reason for this adjustment."
          }
        }
      },
      "TimeOffChangesBase": {
        "title": "Changes item (base)",
        "type": "object",
        "properties": {
          "employeeId": {
            "type": "string",
            "description": "Employee ID",
            "format": "uuid"
          },
          "employeeDisplayName": {
            "type": "string",
            "description": "Employee display name."
          },
          "employeeEmail": {
            "type": "string",
            "description": "Employee email address."
          },
          "policyTypeDisplayName": {
            "type": "string",
            "description": "Display name of the policy type."
          },
          "changeType": {
            "type": "string",
            "description": "Change type - created, canceled or deleted.",
            "enum": [
              "Created",
              "Canceled",
              "Deleted",
              "Pending"
            ]
          },
          "requestId": {
            "type": "integer",
            "format": "int64",
            "description": "The backend-id of the current time-off request, representing the latest version of the request.\n"
          },
          "originalRequestId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The backend-id of the very first time-off request. It remains unchanged regardless of updates that create new time off request records.\n"
          },
          "previousRequestId": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The backend-id of the previous request that was replaced when this new request was created.\n"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time the time off request was created."
          },
          "durationUnit": {
            "type": "string",
            "description": "The unit used for the totalDuration and totalCost - either 'days' or 'hours'\n",
            "enum": [
              "days",
              "hours"
            ]
          },
          "totalDuration": {
            "type": "number",
            "description": "The total amount of time the request covers, including regular days off such as weekends\n"
          },
          "totalCost": {
            "type": "number",
            "description": "The amount that will be deducted from the balance"
          },
          "changeReason": {
            "type": "string",
            "description": "Request change reason"
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/GetTimeoffRequestBase/properties/visibility"
              }
            ]
          }
        }
      },
      "TimeOffChangesDays": {
        "title": "Changes (days)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffChangesBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off.\n"
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off.\n"
              },
              "startPortion": {
                "type": "string",
                "description": "What portion of the first day is included - all_day, morning or afternoon (relevant for the Days type).\n"
              },
              "endPortion": {
                "type": "string",
                "description": "What portion of the last day is included - all_day, morning or afternoon (relevant for the Days type).\n"
              },
              "type": {
                "type": "string",
                "description": "The type of request duration.",
                "enum": [
                  "days"
                ]
              }
            }
          }
        ]
      },
      "TimeOffChangesHours": {
        "title": "Changes (hours)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffChangesBase"
          },
          {
            "type": "object",
            "properties": {
              "date": {
                "type": "string",
                "format": "date",
                "description": "Date of the time off (relevant for requests using the Hours type)"
              },
              "hoursOnDate": {
                "type": "number",
                "description": "The time off duration in hours for the date (relevant for requests using the Hours type).\n"
              },
              "type": {
                "type": "string",
                "description": "The type of request duration.",
                "enum": [
                  "hours"
                ]
              }
            }
          }
        ]
      },
      "TimeOffChangesPortionOnRange": {
        "title": "Changes (portionOnRange)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffChangesBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off.\n"
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off.\n"
              },
              "dayPortion": {
                "type": "string",
                "description": "What portion of the request's days is included - morning or afternoon (portionOnRange type).\n"
              },
              "type": {
                "type": "string",
                "description": "The type of request duration.",
                "enum": [
                  "portionOnRange"
                ]
              }
            }
          }
        ]
      },
      "TimeOffChangesHoursOnRange": {
        "title": "Changes (hoursOnRange)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffChangesBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off.\n"
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off.\n"
              },
              "dailyHours": {
                "type": "number",
                "description": "The time off duration in hours for every day in the request (hoursOnRange type)\n"
              },
              "type": {
                "type": "string",
                "description": "The type of request duration.",
                "enum": [
                  "hoursOnRange"
                ]
              }
            }
          }
        ]
      },
      "TimeOffChangesDifferentDayDurations": {
        "title": "Changes (differentDayDurations)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffChangesBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off.\n"
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off.\n"
              },
              "durations": {
                "type": "array",
                "description": "Array of durations for each day in the request.\n",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "format": "date"
                    },
                    "dayDuration": {
                      "$ref": "#/components/schemas/HoursAndMinutesDayDuration"
                    }
                  }
                }
              },
              "type": {
                "type": "string",
                "description": "The type of request duration.",
                "enum": [
                  "differentDayDurations"
                ]
              }
            }
          }
        ]
      },
      "TimeOffChangesSpecificHoursDayDurations": {
        "title": "Changes (specificHoursDayDurations)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffChangesBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off.\n"
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off.\n"
              },
              "timeZone": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The calculated time zone name. The value for this field is automatically determined based on the time zone of the employee’s assigned site.\n"
              },
              "durations": {
                "type": "array",
                "description": "Array of durations for each day in the request.\n",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "format": "date"
                    },
                    "dayDuration": {
                      "type": "object",
                      "properties": {
                        "localStartTime": {
                          "type": "string"
                        },
                        "localEndTime": {
                          "type": "string"
                        },
                        "dayDurationType": {
                          "type": "string",
                          "enum": [
                            "specificHoursDayDuration"
                          ]
                        }
                      }
                    }
                  }
                }
              },
              "type": {
                "type": "string",
                "description": "The type of request duration.",
                "enum": [
                  "specificHoursDayDurations"
                ]
              }
            }
          }
        ]
      },
      "TimeOffChangesDifferentSpecificHoursDayDurations": {
        "title": "Changes (differentSpecificHoursDayDurations)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffChangesBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off"
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off."
              },
              "timeZone": {
                "type": "string",
                "description": "The time zone for the time off request"
              },
              "durations": {
                "type": "array",
                "description": "Array of day durations for the time off request",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "format": "date",
                      "description": "The date for this duration entry"
                    },
                    "dayDuration": {
                      "description": "The duration for this specific date. Each date must include exactly one of the following types: <ul> <li>SpecificHoursDayDuration</li> <li>PortionDayDuration</li> </ul>\n",
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/SpecificHoursDayDuration"
                        },
                        {
                          "$ref": "#/components/schemas/DiffSpecHoursPortionDayDuration"
                        }
                      ]
                    }
                  },
                  "required": [
                    "date",
                    "dayDuration"
                  ]
                }
              },
              "type": {
                "type": "string",
                "description": "The type of request duration.",
                "enum": [
                  "differentSpecificHoursDayDurations"
                ]
              }
            }
          }
        ]
      },
      "TimeOffChangesPercentageOnRange": {
        "title": "Changes (percentageOnRange)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffChangesBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off.\n"
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off.\n"
              },
              "percentageOfDay": {
                "type": "integer",
                "description": "The percentage of day requested"
              },
              "type": {
                "type": "string",
                "description": "The type of request duration.",
                "enum": [
                  "percentageOnRange"
                ]
              }
            }
          }
        ]
      },
      "TimeOffChangesOpenEnded": {
        "title": "Changes (openEnded)",
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeOffChangesBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off.\n"
              },
              "endDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Date of the last day of the time off.\n"
              },
              "startPortion": {
                "type": "string",
                "description": "What portion of the first day is included - all_day, morning or afternoon.\n"
              },
              "endPortion": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What portion of the last day is included - all_day, morning or afternoon (may be null while open).\n"
              },
              "timeZone": {
                "type": "string",
                "description": "The calculated time zone name. The value for this field is automatically determined based on the time zone of the employee’s assigned site.\n"
              },
              "type": {
                "type": "string",
                "description": "The type of request duration.",
                "enum": [
                  "openEnded"
                ]
              }
            }
          }
        ]
      },
      "TimeOffChange": {
        "title": "Changes item",
        "oneOf": [
          {
            "$ref": "#/components/schemas/TimeOffChangesDays"
          },
          {
            "$ref": "#/components/schemas/TimeOffChangesHours"
          },
          {
            "$ref": "#/components/schemas/TimeOffChangesPortionOnRange"
          },
          {
            "$ref": "#/components/schemas/TimeOffChangesHoursOnRange"
          },
          {
            "$ref": "#/components/schemas/TimeOffChangesDifferentDayDurations"
          },
          {
            "$ref": "#/components/schemas/TimeOffChangesSpecificHoursDayDurations"
          },
          {
            "$ref": "#/components/schemas/TimeOffChangesDifferentSpecificHoursDayDurations"
          },
          {
            "$ref": "#/components/schemas/TimeOffChangesPercentageOnRange"
          },
          {
            "$ref": "#/components/schemas/TimeOffChangesOpenEnded"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "days": "#/components/schemas/TimeOffChangesDays",
            "hours": "#/components/schemas/TimeOffChangesHours",
            "portionOnRange": "#/components/schemas/TimeOffChangesPortionOnRange",
            "hoursOnRange": "#/components/schemas/TimeOffChangesHoursOnRange",
            "differentDayDurations": "#/components/schemas/TimeOffChangesDifferentDayDurations",
            "specificHoursDayDurations": "#/components/schemas/TimeOffChangesSpecificHoursDayDurations",
            "differentSpecificHoursDayDurations": "#/components/schemas/TimeOffChangesDifferentSpecificHoursDayDurations",
            "percentageOnRange": "#/components/schemas/TimeOffChangesPercentageOnRange",
            "openEnded": "#/components/schemas/TimeOffChangesOpenEnded"
          }
        }
      },
      "TimeOffChangesResponse": {
        "title": "Changes response",
        "type": "object",
        "properties": {
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeOffChange"
            }
          }
        },
        "required": [
          "changes"
        ],
        "example": {
          "changes": [
            {
              "changeType": "Pending",
              "employeeId": "2834366722494955760",
              "employeeDisplayName": "Niall Finley",
              "employeeEmail": "niall.finley_572290@samplebob.com",
              "requestId": 42017629,
              "originalRequestId": null,
              "previousRequestId": null,
              "policyTypeDisplayName": "Holiday",
              "type": "specificHoursDayDurations",
              "createdOn": "2025-08-17T18:29:10.408597",
              "durationUnit": "hours",
              "totalDuration": 0.333,
              "totalCost": 0.333,
              "changeReason": "",
              "visibility": "Public",
              "startDate": "2025-08-06",
              "endDate": "2025-08-07",
              "timeZone": "America/New_York",
              "durations": [
                {
                  "date": "2025-08-06",
                  "dayDuration": {
                    "localStartTime": "00:50:00",
                    "localEndTime": "01:00:00",
                    "dayDurationType": "specificHoursDayDuration"
                  }
                },
                {
                  "date": "2025-08-07",
                  "dayDuration": {
                    "localStartTime": "00:50:00",
                    "localEndTime": "01:00:00",
                    "dayDurationType": "specificHoursDayDuration"
                  }
                }
              ]
            },
            {
              "changeType": "Created",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "employeeEmail": "joe.doe@samplecompany.com",
              "requestId": 42017707,
              "originalRequestId": null,
              "previousRequestId": null,
              "policyTypeDisplayName": "Holiday",
              "type": "differentSpecificHoursDayDurations",
              "createdOn": "2025-08-17T18:45:12.123456",
              "durationUnit": "hours",
              "totalDuration": 6.5,
              "totalCost": 6.5,
              "changeReason": "",
              "visibility": "Public",
              "startDate": "2025-08-28",
              "endDate": "2025-08-31",
              "timeZone": "Europe/London",
              "durations": [
                {
                  "date": "2025-08-28",
                  "dayDuration": {
                    "dayDurationType": "specificHoursDayDuration",
                    "localStartTime": "09:00:00",
                    "localEndTime": "11:00:00"
                  }
                },
                {
                  "date": "2025-08-29",
                  "dayDuration": {
                    "dayDurationType": "portionDayDuration",
                    "portion": "vacant"
                  }
                },
                {
                  "date": "2025-08-30",
                  "dayDuration": {
                    "dayDurationType": "specificHoursDayDuration",
                    "localStartTime": "14:00:00",
                    "localEndTime": "16:30:00"
                  }
                },
                {
                  "date": "2025-08-31",
                  "dayDuration": {
                    "dayDurationType": "portionDayDuration",
                    "portion": "all_day"
                  }
                }
              ]
            },
            {
              "changeType": "Created",
              "employeeId": "2834366722494955760",
              "employeeDisplayName": "Niall Finley",
              "employeeEmail": "niall.finley_572290@samplebob.com",
              "requestId": 42190369,
              "originalRequestId": null,
              "previousRequestId": null,
              "policyTypeDisplayName": "Holiday",
              "type": "portionOnRange",
              "createdOn": "2025-08-21T08:17:30.735453",
              "durationUnit": "hours",
              "totalDuration": 8.8,
              "totalCost": 8.8,
              "changeReason": "",
              "visibility": "Public",
              "startDate": "2025-08-22",
              "endDate": "2025-08-25",
              "dayPortion": "morning"
            },
            {
              "changeType": "Created",
              "employeeId": "2834366723786801393",
              "employeeDisplayName": "Darren Lavery",
              "employeeEmail": "darren.lavery_572290@samplebob.com",
              "requestId": 41474961,
              "originalRequestId": null,
              "previousRequestId": null,
              "policyTypeDisplayName": "Sick",
              "type": "days",
              "createdOn": "2025-08-03T13:34:10.012118",
              "durationUnit": "days",
              "totalDuration": 1,
              "totalCost": 1,
              "changeReason": "",
              "visibility": "Public",
              "startDate": "2025-08-03",
              "endDate": "2025-08-03",
              "startPortion": "all_day",
              "endPortion": "all_day"
            },
            {
              "changeType": "Created",
              "employeeId": "2834366753381810438",
              "employeeDisplayName": "Amy Miles",
              "employeeEmail": "amy.miles_572290@samplebob.com",
              "requestId": 41812663,
              "originalRequestId": 41812424,
              "previousRequestId": 41812424,
              "policyTypeDisplayName": "Holiday",
              "type": "differentDayDurations",
              "createdOn": "2025-08-11T12:56:35.889667",
              "durationUnit": "hours",
              "totalDuration": 6.667,
              "totalCost": 6.667,
              "changeReason": "",
              "visibility": "Public",
              "startDate": "2025-08-08",
              "endDate": "2025-08-11",
              "durations": [
                {
                  "date": "2025-08-08",
                  "dayDuration": {
                    "hours": 1,
                    "minutes": 30,
                    "dayDurationType": "hoursAndMinutesDayDuration"
                  }
                },
                {
                  "date": "2025-08-11",
                  "dayDuration": {
                    "hours": 5,
                    "minutes": 10,
                    "dayDurationType": "hoursAndMinutesDayDuration"
                  }
                }
              ]
            },
            {
              "changeType": "Created",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "employeeEmail": "joe.doe@samplecompany.com",
              "requestId": 42017566,
              "originalRequestId": null,
              "previousRequestId": null,
              "policyTypeDisplayName": "Holiday",
              "type": "hoursOnRange",
              "createdOn": "2025-08-17T18:22:03.338909",
              "durationUnit": "hours",
              "totalDuration": 4,
              "totalCost": 4,
              "changeReason": "",
              "visibility": "Public",
              "startDate": "2025-08-18",
              "endDate": "2025-08-19",
              "dailyHours": 2
            },
            {
              "changeType": "Created",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "employeeEmail": "joe.doe@samplecompany.com",
              "requestId": 42016823,
              "originalRequestId": null,
              "previousRequestId": null,
              "policyTypeDisplayName": "Holiday",
              "type": "hours",
              "createdOn": "2025-08-17T17:06:04.415477",
              "durationUnit": "hours",
              "totalDuration": 5.5,
              "totalCost": 5.5,
              "changeReason": "",
              "visibility": "Public",
              "date": "2025-08-04",
              "hoursOnDate": 5.5
            },
            {
              "changeType": "Created",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "employeeEmail": "joe.doe@samplecompany.com",
              "requestId": 42017704,
              "originalRequestId": null,
              "previousRequestId": null,
              "policyTypeDisplayName": "Holiday",
              "type": "percentageOnRange",
              "createdOn": "2025-08-17T18:37:16.326675",
              "durationUnit": "days",
              "totalDuration": 0.46,
              "totalCost": 0.46,
              "changeReason": "",
              "visibility": "Public",
              "startDate": "2025-08-01",
              "endDate": "2025-08-03",
              "percentageOfDay": 23
            },
            {
              "changeType": "Created",
              "employeeId": "2911111434173677987",
              "employeeDisplayName": "TestRequest User",
              "employeeEmail": "joe.doe@samplecompany.com",
              "requestId": 42017706,
              "originalRequestId": null,
              "previousRequestId": null,
              "policyTypeDisplayName": "Holiday",
              "type": "openEnded",
              "createdOn": "2025-08-17T18:37:34.825326",
              "durationUnit": "days",
              "totalDuration": 0.5,
              "totalCost": 0.5,
              "changeReason": "",
              "visibility": "Public",
              "startDate": "2025-08-31",
              "endDate": null,
              "startPortion": "afternoon",
              "endPortion": null,
              "timeZone": "Europe/London"
            }
          ]
        }
      },
      "SubmitTimeoffRequestDays": {
        "title": "Time off request in days",
        "required": [
          "requestRangeType",
          "policyType",
          "startDate",
          "startDatePortion",
          "endDate",
          "endDatePortion"
        ],
        "type": "object",
        "properties": {
          "requestRangeType": {
            "type": "string",
            "description": "The type of request duration. This request is for X days. Value must be 'days'."
          },
          "policyType": {
            "type": "string",
            "description": "Request policy type, e.g. Holiday, Sick or any custom type defined."
          },
          "startDate": {
            "type": "string",
            "description": "Date of the first day of the time off.",
            "format": "date"
          },
          "startDatePortion": {
            "type": "string",
            "description": "What portion of the first day is included - <b>'all_day'</b> or <b>'afternoon'</b> (relevant for requests using the Days type)."
          },
          "endDate": {
            "type": "string",
            "description": "Date of the last day of the time off .",
            "format": "date"
          },
          "endDatePortion": {
            "type": "string",
            "description": "What portion of the last day is included - <b>'all_day'</b> or <b>'morning'</b> (relevant for requests using the Days type)."
          },
          "skipManagerApproval": {
            "type": "boolean",
            "description": "Admins only can skip the approval policy. Setting this field to true will create an approved request."
          },
          "approver": {
            "type": "string",
            "description": "The employee ID of the user to be set as the approver for this request. This is relevant if 'skipManagerApproval' is set to true.<br>Please note that the user calling the API with this param must have permission to import time off requests."
          },
          "description": {
            "type": "string",
            "description": "Request reason."
          },
          "reasonCode": {
            "type": "integer",
            "description": "The reason code ID taken from the policy type's reason codes list. The list is available in GET /timeoff/policy-types/{policyType}/reason-codes"
          }
        }
      },
      "SubmitTimeoffRequestHours": {
        "title": "Time off request in hours",
        "required": [
          "requestRangeType",
          "policyType",
          "startDate",
          "endDate",
          "hours",
          "minutes"
        ],
        "type": "object",
        "properties": {
          "requestRangeType": {
            "type": "string",
            "description": "The type of request duration. This request is for X hours during the day requested (This is supported only for policy types measured in hours). Value must be 'hours'."
          },
          "policyType": {
            "type": "string",
            "description": "Request policy type, e.g. Holiday, Sick or any custom type defined."
          },
          "startDate": {
            "type": "string",
            "description": "Date of the first day of the time off.",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "Date of the last day of the time off (must be the same as startDate).",
            "format": "date"
          },
          "hours": {
            "type": "integer",
            "description": "This field is mandatory if the requestRangeType is set to 'hours'."
          },
          "minutes": {
            "type": "integer",
            "description": "Relevant if requestRangeType is set to 'hours'."
          },
          "skipManagerApproval": {
            "type": "boolean",
            "description": "Admins only can skip the approval policy. Setting this field to true will create an approved request."
          },
          "approver": {
            "type": "string",
            "description": "The employee ID of the user to be set as the approver for this request. This is relevant if 'skipManagerApproval' is set to true.<br>Please note that the user calling the API with this param must have permission to import time off requests."
          },
          "description": {
            "type": "string",
            "description": "Request reason."
          },
          "reasonCode": {
            "type": "integer",
            "description": "The reason code ID taken from the policy type's reason codes list. The list is available in GET /timeoff/policy-types/{policyType}/reason-codes"
          }
        }
      },
      "SubmitTimeoffRequestDiffHoursPerDay": {
        "title": "Time off request of different hours per day",
        "required": [
          "requestRangeType",
          "policyType",
          "startDate",
          "endDate",
          "durations"
        ],
        "type": "object",
        "properties": {
          "requestRangeType": {
            "type": "string",
            "description": "The type of request duration. This request is for different hours per day. Value must be 'differentDayDurations'."
          },
          "policyType": {
            "type": "string",
            "description": "Request policy type, e.g. Holiday, Sick or any custom type defined."
          },
          "startDate": {
            "type": "string",
            "description": "Date of the first day of the time off",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "Date of the last day of the time off.",
            "format": "date"
          },
          "durations": {
            "type": "array",
            "description": "Array of durations for each day in the request.",
            "items": {
              "required": [
                "date",
                "hours",
                "minutes"
              ],
              "type": "object",
              "properties": {
                "date": {
                  "type": "string",
                  "description": "Date of the duration.",
                  "format": "date"
                },
                "hours": {
                  "type": "integer",
                  "description": "The number of hours in the duration."
                },
                "minutes": {
                  "type": "integer",
                  "description": "The number of minutes in the duration."
                }
              }
            }
          },
          "skipManagerApproval": {
            "type": "boolean",
            "description": "Admins only can skip the approval policy. Setting this field to true will create an approved request."
          },
          "approver": {
            "type": "string",
            "description": "The employee ID of the user to be set as the approver for this request. This is relevant if 'skipManagerApproval' is set to true.<br>Please note that the user calling the API with this param must have permission to import time off requests."
          },
          "description": {
            "type": "string",
            "description": "Request reason."
          },
          "reasonCode": {
            "type": "integer",
            "description": "The reason code ID taken from the policy type's reason codes list. The list is available in GET /timeoff/policy-types/{policyType}/reason-codes"
          }
        }
      },
      "SubmitTimeoffRequestPortionOnRange": {
        "title": "Time off request of same portion per day",
        "required": [
          "requestRangeType",
          "policyType",
          "startDate",
          "endDate",
          "dayPortion"
        ],
        "type": "object",
        "properties": {
          "requestRangeType": {
            "type": "string",
            "description": "The type of request duration. This request is for every morning or every afternoon during the days requested. Value must be 'portionOnRange'."
          },
          "policyType": {
            "type": "string",
            "description": "Request policy type, e.g. Holiday, Sick or any custom type defined."
          },
          "startDate": {
            "type": "string",
            "description": "Date of the first day of the time off.",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "Date of the last day of the time off.",
            "format": "date"
          },
          "dayPortion": {
            "type": "string",
            "description": "Select <b>morning</b> when the request is for mornings on the days requested. Select <b>afternoon</b> when the request is for afternoons on the days requested."
          },
          "skipManagerApproval": {
            "type": "boolean",
            "description": "Admins only can skip the approval policy. Setting this field to true will create an approved request."
          },
          "approver": {
            "type": "string",
            "description": "The employee ID of the user to be set as the approver for this request. This is relevant if 'skipManagerApproval' is set to true.<br>Please note that the user calling the API with this param must have permission to import time off requests."
          },
          "description": {
            "type": "string",
            "description": "Request reason."
          },
          "reasonCode": {
            "type": "integer",
            "description": "The reason code ID taken from the policy type's reason codes list. The list is available in GET /timeoff/policy-types/{policyType}/reason-codes"
          }
        }
      },
      "SubmitTimeoffRequestHoursOnRange": {
        "title": "Time off request of same hours per day",
        "required": [
          "requestRangeType",
          "policyType",
          "startDate",
          "endDate",
          "dailyHours",
          "dailyMinutes"
        ],
        "type": "object",
        "properties": {
          "requestRangeType": {
            "type": "string",
            "description": "The type of request duration. This request is for X hours every day during the days requested (This is supported only for policy types measured in hours). Value must be 'hoursOnRange'."
          },
          "policyType": {
            "type": "string",
            "description": "Request policy type, e.g. Holiday, Sick or any custom type defined."
          },
          "startDate": {
            "type": "string",
            "description": "Date of the first day of the time off.",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "Date of the last day of the time off.",
            "format": "date"
          },
          "dailyHours": {
            "type": "integer",
            "description": "Enter the number of hours when the request is for X hours on the days requested.<br> This is mandatory when the <b>requestRangeType</b> is <b>hoursOnRange</b>."
          },
          "dailyMinutes": {
            "type": "integer",
            "description": "Enter the number of minutes when the request is for X hours and X minutes on the days requested.<br> This is relevant when the <b>requestRangeType</b> is <b>hoursOnRange</b> and the amount requested is not a full hour or hours."
          },
          "skipManagerApproval": {
            "type": "boolean",
            "description": "Admins only can skip the approval policy. Setting this field to true will create an approved request."
          },
          "approver": {
            "type": "string",
            "description": "The employee ID of the user to be set as the approver for this request. This is relevant if 'skipManagerApproval' is set to true.<br>Please note that the user calling the API with this param must have permission to import time off requests."
          },
          "description": {
            "type": "string",
            "description": "Request reason."
          },
          "reasonCode": {
            "type": "integer",
            "description": "The reason code ID taken from the policy type's reason codes list. The list is available in GET /timeoff/policy-types/{policyType}/reason-codes"
          }
        }
      },
      "SubmitTimeoffRequestSpecificHoursOnRange": {
        "title": "Time off request of specific hours per day",
        "required": [
          "requestRangeType",
          "policyType",
          "startDate",
          "endDate",
          "localStartTime",
          "localEndTime"
        ],
        "type": "object",
        "properties": {
          "requestRangeType": {
            "type": "string",
            "description": "The type of request duration. This request is for specific hours per day. Value must be 'specificHoursDayDurations'."
          },
          "policyType": {
            "type": "string",
            "description": "Request policy type, e.g. Holiday, Sick or any custom type defined."
          },
          "startDate": {
            "type": "string",
            "description": "Date of the first day of the time off",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "Date of the last day of the time off.",
            "format": "date"
          },
          "localStartTime": {
            "type": "string",
            "description": "Start time of the duration",
            "format": "time"
          },
          "localEndTime": {
            "type": "string",
            "description": "End time of the duration",
            "format": "time"
          },
          "skipManagerApproval": {
            "type": "boolean",
            "description": "Admins only can skip the approval policy. Setting this field to true will create an approved request."
          },
          "approver": {
            "type": "string",
            "description": "The employee ID of the user to be set as the approver for this request. This is relevant if 'skipManagerApproval' is set to true.<br>Please note that the user calling the API with this param must have permission to import time off requests."
          },
          "description": {
            "type": "string",
            "description": "Request reason."
          },
          "reasonCode": {
            "type": "integer",
            "description": "The reason code ID taken from the policy type's reason codes list. The list is available in GET /timeoff/policy-types/{policyType}/reason-codes"
          }
        }
      },
      "SubmitTimeoffRequestDifferentSpecificHoursOnRange": {
        "title": "Time off request of different specific hours per day",
        "required": [
          "requestRangeType",
          "policyType",
          "startDate",
          "endDate",
          "durations"
        ],
        "type": "object",
        "properties": {
          "requestRangeType": {
            "type": "string",
            "description": "The type of request duration. This request is for different specific hours per day. Value must be 'differentSpecificHoursDayDurations'."
          },
          "policyType": {
            "type": "string",
            "description": "Request policy type, e.g. Holiday, Sick or any custom type defined."
          },
          "startDate": {
            "type": "string",
            "description": "Date of the first day of the time off",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "Date of the last day of the time off.",
            "format": "date"
          },
          "durations": {
            "type": "array",
            "description": "Array of day durations for each date in the range",
            "items": {
              "type": "object",
              "required": [
                "date",
                "dayDuration"
              ],
              "properties": {
                "date": {
                  "type": "string",
                  "format": "date",
                  "description": "The date for this duration entry"
                },
                "dayDuration": {
                  "description": "The duration for this specific date. Each date must include exactly one of the following types: <ul> <li>SpecificHoursDayDuration</li> <li>PortionDayDuration</li> </ul>\n",
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SpecificHoursDayDuration"
                    },
                    {
                      "$ref": "#/components/schemas/DiffSpecHoursPortionDayDuration"
                    }
                  ]
                }
              }
            }
          },
          "skipManagerApproval": {
            "type": "boolean",
            "description": "Admins only can skip the approval policy. Setting this field to true will create an approved request."
          },
          "approver": {
            "type": "string",
            "description": "The employee ID of the user to be set as the approver for this request. This is relevant if 'skipManagerApproval' is set to true.<br>Please note that the user calling the API with this param must have permission to import time off requests."
          },
          "description": {
            "type": "string",
            "description": "Request reason."
          },
          "reasonCode": {
            "type": "integer",
            "description": "The reason code ID taken from the policy type's reason codes list. The list is available in GET /timeoff/policy-types/{policyType}/reason-codes"
          }
        }
      },
      "HoursAndMinutesDayDuration": {
        "type": "object",
        "description": "Duration in hours and minutes for a day (relevant for `differentDayDurations` type)",
        "required": [
          "hours",
          "minutes",
          "dayDurationType"
        ],
        "properties": {
          "hours": {
            "type": "integer",
            "description": "Number of hours"
          },
          "minutes": {
            "type": "integer",
            "description": "Number of minutes (must match the minimal amount of minutes in the time off policy)\n"
          },
          "dayDurationType": {
            "type": "string",
            "enum": [
              "hoursAndMinutesDayDuration"
            ],
            "description": "Type of day duration"
          }
        }
      },
      "DailyDurationsEntry": {
        "type": "object",
        "description": "Daily durations entry with date and cost.",
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "description": "The date in the time off request range."
          },
          "cost": {
            "type": "number",
            "description": "The cost deducted from balance for this day."
          }
        }
      },
      "DailyDurationsEntryWithDayDuration": {
        "type": "object",
        "description": "Daily durations entry with date, cost, and day duration.",
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "description": "The date in the time off request range."
          },
          "dayDuration": {
            "$ref": "#/components/schemas/HoursAndMinutesDayDuration"
          },
          "cost": {
            "type": "number",
            "description": "The cost deducted from balance for this day."
          }
        }
      },
      "SpecificHoursDayDuration": {
        "title": "Specific hours day duration",
        "description": "Defines the request by exact working hours (for example, 10:00-12:00).\n",
        "required": [
          "dayDurationType",
          "localStartTime",
          "localEndTime"
        ],
        "type": "object",
        "properties": {
          "dayDurationType": {
            "type": "string",
            "enum": [
              "specificHoursDayDuration"
            ],
            "description": "The type of day duration"
          },
          "localStartTime": {
            "type": "string",
            "format": "time",
            "description": "Start time of the duration"
          },
          "localEndTime": {
            "type": "string",
            "format": "time",
            "description": "End time of the duration"
          }
        }
      },
      "DiffSpecHoursPortionDayDuration": {
        "title": "PortionDayDuration",
        "description": "Defines the request as either the entire day (all_day) or no hours at all (vacant).\n",
        "required": [
          "dayDurationType",
          "portion"
        ],
        "type": "object",
        "properties": {
          "dayDurationType": {
            "type": "string",
            "enum": [
              "portionDayDuration"
            ],
            "description": "The type of day duration"
          },
          "portion": {
            "type": "string",
            "enum": [
              "all_day",
              "vacant"
            ],
            "description": "The portion of the day"
          }
        }
      },
      "GetTimeoffRequestBase": {
        "title": "Time off request (base)",
        "type": "object",
        "properties": {
          "employeeId": {
            "type": "string",
            "format": "string",
            "description": "Employee ID."
          },
          "requestId": {
            "type": "integer",
            "description": "Time Off Request ID."
          },
          "policyTypeDisplayName": {
            "type": "string",
            "description": "The policy type name returned for this request. May contain sensitive information, such as the original policy type name for `Private` policies or when the caller has permission on `Custom name` policies. When `policyTypeCustomName` is not null and differs from this value, this field contains the original policy type name, meaning the caller has permission to see it. <a href=\"https://apidocs.hibob.com/docs/explore-time-off-api#policy-type-names-in-api-responses\">Learn more about policy type names and visibility.</a>"
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time the time off request was created."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The request description."
          },
          "durationUnit": {
            "type": "string",
            "enum": [
              "days",
              "hours"
            ],
            "description": "The unit used for the totalDuration and totalCost - either 'days' or 'hours'\n"
          },
          "totalDuration": {
            "type": "number",
            "description": "The total amount of time the request covers, including regular days off such as weekends\n"
          },
          "totalCost": {
            "type": "number",
            "description": "The amount that will be deducted from the balance"
          },
          "status": {
            "type": "string",
            "description": "Request status. This can be approved, pending, canceled, etc."
          },
          "hasAttachment": {
            "type": "boolean",
            "description": "Whether the request has attachments"
          },
          "attachmentLinks": {
            "type": "array",
            "description": "Attachments with download links",
            "items": {
              "type": "object",
              "properties": {
                "filename": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "mimeType": {
                  "type": "string"
                }
              }
            }
          },
          "reasonCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "The reason code taken from the policy type's reason codes list. The list is available in GET /timeoff/policy-types/{policyType}/reason-codes\n"
          },
          "policyTypeCustomName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The custom public-facing label when the policy's `visibility` is `Custom name`; `null` for Public and Private policies. Never contains sensitive information. Always returned regardless of caller permissions. <a href=\"https://apidocs.hibob.com/docs/explore-time-off-api#policy-type-names-in-api-responses\">Learn more about policy type names and visibility.</a>"
          },
          "previousRequestId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The backend-id of the previous request that was replaced when this new request was created. This occurs when the request's date or time is updated, resulting in a new time off request record.\n"
          },
          "originalRequestId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The backend-id of the very first time-off request. It remains unchanged regardless of updates that create new time off request records. It serves as the anchor for tracing the request's entire history back to its initial submission.\n"
          },
          "approved": {
            "type": "boolean",
            "description": "Whether the request is approved (and hence publicly visible)."
          },
          "approvedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who approved the request"
          },
          "approvedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the request was approved"
          },
          "declinedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who declined the request"
          },
          "declinedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the request was declined"
          },
          "declineReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the request was declined"
          },
          "visibility": {
            "type": "string",
            "description": "The request visibility either 'Public', 'Private' or 'Custom name'",
            "enum": [
              "Public",
              "Private",
              "Custom name"
            ]
          },
          "timeZoneOffset": {
            "type": [
              "string",
              "null"
            ],
            "description": "Calculated time zone offset from GMT in ±HH:MM format (e.g., \"GMT -5:00\"). This field is relevant only for time-off requests which allow specifying exact start and end times (e.g., 09:00–18:00). The value is automatically calculated based on the employee's assigned site time zone.\n"
          }
        }
      },
      "GetTimeoffRequestDays": {
        "title": "Time off request (days)",
        "allOf": [
          {
            "$ref": "#/components/schemas/GetTimeoffRequestBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off."
              },
              "startPortion": {
                "type": "string",
                "description": "What portion of the first day is included - all_day, morning or afternoon (relevant for requests using the `days` type).\n"
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off."
              },
              "endPortion": {
                "type": "string",
                "description": "What portion of the last day is included - all_day, morning or afternoon (relevant for requests using the `days` type).\n"
              },
              "durations": {
                "type": "array",
                "description": "Daily durations of the time off request with cost per day.",
                "items": {
                  "$ref": "#/components/schemas/DailyDurationsEntry"
                }
              },
              "type": {
                "type": "string",
                "description": "The type of request - <b>days</b> is when the request is for X days.<br> \n",
                "enum": [
                  "days"
                ]
              }
            }
          }
        ]
      },
      "GetTimeoffRequestHours": {
        "title": "Time off request (hours)",
        "allOf": [
          {
            "$ref": "#/components/schemas/GetTimeoffRequestBase"
          },
          {
            "type": "object",
            "properties": {
              "date": {
                "type": "string",
                "format": "date",
                "description": "Date of the time off (relevant for requests using the `hours` type)."
              },
              "hoursOnDate": {
                "type": "number",
                "description": "The time off duration in hours for the date (relevant for requests using the `hours` type)\n"
              },
              "durations": {
                "type": "array",
                "description": "Daily durations of the time off request with cost per day.",
                "items": {
                  "$ref": "#/components/schemas/DailyDurationsEntryWithDayDuration"
                }
              },
              "type": {
                "type": "string",
                "description": "The type of request - <b>hours</b> is when the request is for X hours during the day requested (supported only for policy types measured in hours).<br> \n",
                "enum": [
                  "hours"
                ]
              }
            }
          }
        ]
      },
      "GetTimeoffRequestPortionOnRange": {
        "title": "Time off request (portionOnRange)",
        "allOf": [
          {
            "$ref": "#/components/schemas/GetTimeoffRequestBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off."
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off."
              },
              "dayPortion": {
                "type": "string",
                "description": "What portion of the request's days is included - morning or afternoon (relevant for requests using the `portionOnRange` type).\n"
              },
              "durations": {
                "type": "array",
                "description": "Daily durations of the time off request with cost per day.",
                "items": {
                  "$ref": "#/components/schemas/DailyDurationsEntry"
                }
              },
              "type": {
                "type": "string",
                "description": "The type of request - <b>portionOnRange</b> is when the request is for every morning or every afternoon during the days requested.<br>\n",
                "enum": [
                  "portionOnRange"
                ]
              }
            }
          }
        ]
      },
      "GetTimeoffRequestHoursOnRange": {
        "title": "Time off request (hoursOnRange)",
        "allOf": [
          {
            "$ref": "#/components/schemas/GetTimeoffRequestBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off."
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off."
              },
              "dailyHours": {
                "type": "number",
                "description": "The time off duration in hours for every day in the request (relevant for `hoursOnRange`).\n"
              },
              "durations": {
                "type": "array",
                "description": "Daily durations of the time off request with cost per day.",
                "items": {
                  "$ref": "#/components/schemas/DailyDurationsEntryWithDayDuration"
                }
              },
              "type": {
                "type": "string",
                "description": "The type of request - <b>hoursOnRange</b> is when the request is for X hours every day during the days requested.<br> \n",
                "enum": [
                  "hoursOnRange"
                ]
              }
            }
          }
        ]
      },
      "GetTimeoffRequestDifferentDayDurations": {
        "title": "Time off request (differentDayDurations)",
        "allOf": [
          {
            "$ref": "#/components/schemas/GetTimeoffRequestBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off."
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off."
              },
              "durations": {
                "type": "array",
                "description": "Array of durations for each day in the request. \n",
                "items": {
                  "$ref": "#/components/schemas/DailyDurationsEntryWithDayDuration"
                }
              },
              "type": {
                "type": "string",
                "description": "The type of request - <b>differentDayDurations</b> is when the request is for a different amount of hours on each of the days requested.<br> \n",
                "enum": [
                  "differentDayDurations"
                ]
              }
            }
          }
        ]
      },
      "GetTimeoffRequestSpecificHoursDayDurations": {
        "title": "Time off request (specificHoursDayDurations)",
        "allOf": [
          {
            "$ref": "#/components/schemas/GetTimeoffRequestBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off."
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off."
              },
              "timeZone": {
                "type": "string",
                "description": "The calculated time zone name. This field applies only to time-off requests, where employees specify start and end times (e.g., 09:00–18:00). The value is automatically determined based on the time zone of the employee’s assigned site.\n"
              },
              "durations": {
                "type": "array",
                "description": "Array of durations for each day in the request. This field is relevant for `specificHoursDayDurations` requests.\n",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "format": "date",
                      "description": "The date in the time off request range"
                    },
                    "dayDuration": {
                      "type": "object",
                      "description": "Duration for specific hours in a day (specificHoursDayDurations)",
                      "properties": {
                        "localStartTime": {
                          "type": "string",
                          "description": "Start time in HH:mm:ss format"
                        },
                        "localEndTime": {
                          "type": "string",
                          "description": "End time in HH:mm:ss format"
                        },
                        "dayDurationType": {
                          "type": "string",
                          "enum": [
                            "specificHoursDayDuration"
                          ],
                          "description": "Type of day duration"
                        }
                      }
                    },
                    "cost": {
                      "type": "number",
                      "description": "The cost deducted from balance for this day."
                    }
                  }
                }
              },
              "type": {
                "type": "string",
                "description": "The type of request - <b>specificHoursDayDurations</b> is when the request is for specific hours per day.<br> \n",
                "enum": [
                  "specificHoursDayDurations"
                ]
              }
            }
          }
        ]
      },
      "GetTimeoffRequestDifferentSpecificHoursDayDurations": {
        "title": "Time off request (differentSpecificHoursDayDurations)",
        "allOf": [
          {
            "$ref": "#/components/schemas/GetTimeoffRequestBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off."
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off."
              },
              "timeZone": {
                "type": "string",
                "description": "The calculated time zone name. This field applies only to time-off requests, where employees specify start and end times (e.g., 09:00–18:00). The value is automatically determined based on the time zone of the employee's assigned site.\n"
              },
              "durations": {
                "type": "array",
                "description": "Array of durations for each day in the request. This field is relevant for `differentSpecificHoursDayDurations` requests.\n",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "format": "date",
                      "description": "The date in the time off request range"
                    },
                    "dayDuration": {
                      "description": "The duration for this specific date. Each date must include exactly one of the following types: <ul> <li>SpecificHoursDayDuration.</li> <li>PortionDayDuration.</li> </ul>\n",
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/SpecificHoursDayDuration"
                        },
                        {
                          "$ref": "#/components/schemas/DiffSpecHoursPortionDayDuration"
                        }
                      ]
                    },
                    "cost": {
                      "type": "number",
                      "description": "The cost deducted from balance for this day."
                    }
                  }
                }
              },
              "type": {
                "type": "string",
                "description": "The type of request - <b>differentSpecificHoursDayDurations</b> is when the request is for different specific hours on each of the days requested.<br> \n",
                "enum": [
                  "differentSpecificHoursDayDurations"
                ]
              }
            }
          }
        ]
      },
      "GetTimeoffRequestPercentageOnRange": {
        "title": "Time off request (percentageOnRange)",
        "allOf": [
          {
            "$ref": "#/components/schemas/GetTimeoffRequestBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off."
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the last day of the time off."
              },
              "percentageOfDay": {
                "type": "integer",
                "description": "The percent of the day requested. \n"
              },
              "durations": {
                "type": "array",
                "description": "Daily durations of the time off request with cost per day.",
                "items": {
                  "$ref": "#/components/schemas/DailyDurationsEntry"
                }
              },
              "type": {
                "type": "string",
                "description": "The type of request  -<b>percentageOnRange</b> is when the request is for X percent of every day during the days requested.\n",
                "enum": [
                  "percentageOnRange"
                ]
              }
            }
          }
        ]
      },
      "GetTimeoffRequestOpenEnded": {
        "title": "Time off request (openEnded)",
        "allOf": [
          {
            "$ref": "#/components/schemas/GetTimeoffRequestBase"
          },
          {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "format": "date",
                "description": "Date of the first day of the time off."
              },
              "endDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Date of the last day of the time off (may be null for open-ended requests)."
              },
              "timeZone": {
                "type": "string",
                "description": "The calculated time zone name. This field applies only to time-off requests, where employees specify start and end times (e.g., 09:00–18:00). The value is automatically determined based on the time zone of the employee’s assigned site.\n"
              },
              "startPortion": {
                "type": "string",
                "description": "What portion of the first day is included - all_day, morning or afternoon (relevant for requests using the `days`-like types).\n"
              },
              "endPortion": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What portion of the last day is included - all_day, morning or afternoon (may be null for open-ended requests).\n"
              },
              "durations": {
                "type": "array",
                "description": "Daily durations of the time off request with cost per day.",
                "items": {
                  "$ref": "#/components/schemas/DailyDurationsEntry"
                }
              },
              "type": {
                "type": "string",
                "description": "The type of request - <b>openEnded</b> is when the request doesn't have an end date yet.\n",
                "enum": [
                  "openEnded"
                ]
              }
            }
          }
        ]
      },
      "GetTimeoffRequest": {
        "title": "Time off request",
        "oneOf": [
          {
            "$ref": "#/components/schemas/GetTimeoffRequestDays"
          },
          {
            "$ref": "#/components/schemas/GetTimeoffRequestHours"
          },
          {
            "$ref": "#/components/schemas/GetTimeoffRequestPortionOnRange"
          },
          {
            "$ref": "#/components/schemas/GetTimeoffRequestHoursOnRange"
          },
          {
            "$ref": "#/components/schemas/GetTimeoffRequestDifferentDayDurations"
          },
          {
            "$ref": "#/components/schemas/GetTimeoffRequestSpecificHoursDayDurations"
          },
          {
            "$ref": "#/components/schemas/GetTimeoffRequestDifferentSpecificHoursDayDurations"
          },
          {
            "$ref": "#/components/schemas/GetTimeoffRequestPercentageOnRange"
          },
          {
            "$ref": "#/components/schemas/GetTimeoffRequestOpenEnded"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "days": "#/components/schemas/GetTimeoffRequestDays",
            "hours": "#/components/schemas/GetTimeoffRequestHours",
            "portionOnRange": "#/components/schemas/GetTimeoffRequestPortionOnRange",
            "hoursOnRange": "#/components/schemas/GetTimeoffRequestHoursOnRange",
            "differentDayDurations": "#/components/schemas/GetTimeoffRequestDifferentDayDurations",
            "specificHoursDayDurations": "#/components/schemas/GetTimeoffRequestSpecificHoursDayDurations",
            "differentSpecificHoursDayDurations": "#/components/schemas/GetTimeoffRequestDifferentSpecificHoursDayDurations",
            "percentageOnRange": "#/components/schemas/GetTimeoffRequestPercentageOnRange",
            "openEnded": "#/components/schemas/GetTimeoffRequestOpenEnded"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The unique identifier of the error."
          },
          "error": {
            "type": "string",
            "description": "A human readable error message."
          }
        }
      }
    },
    "securitySchemes": {
      "Basic": {
        "type": "http",
        "scheme": "basic"
      },
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "OAuth 2.0",
        "description": "OAuth 2.0 authentication using an Access Token is available for registered partners only.  Try It! does not support the full HiBob OAuth flow. You can follow <a href=\"https://apidocs.hibob.com/reference/oauth-20#testing-from-the-public-api-reference\" target=\"_blank\">these steps</a> to complete the OAuth 2.0 flow in Postman and then paste the token here."
      }
    }
  }
}
```