---
updatedAt: 2026-01-21T12:15:58.000Z
---

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

# Get the details of an existing time off request.

Retrieve the detailed info about an existing time off request.<br> <br> 
<b>Possible time off request types:</b> <ul>
  <li><b>days</b>: the request is for X days.</li>
  <li>
    <b>hours</b>: the request is for X hours during the requested day
    (supported only for policy types measured in hours).
  </li>
  <li>
    <b>portionOnRange</b>: the request is for every morning or every afternoon
    during the requested days.
  </li>
  <li>
    <b>hoursOnRange</b>: the request is for X hours every day during the
    requested days.
  </li>
  <li>
    <b>differentDayDurations</b>: the request is for a different amount of
    hours on each requested day.
  </li>
  <li>
    <b>specificHoursDayDurations</b>: the request is for specific hours per day.
  </li>
  <li>
    <b>differentSpecificHoursDayDurations</b>: the request is for different
    specific hours or portions on each day.
  </li>
  <li>
    <b>percentageOnRange</b>: the request is for X percent of every day during
    the requested days.
  </li>
  <li><b>openEnded</b>: the request does not have an end date yet.</li>
</ul> Each request type is represented by a separate schema with the relevant fields.
<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>
<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>

# 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 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/{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": []
          }
        ]
      }
    }
  },
  "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"
              }
            }
          }
        ]
      },
      "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."
      }
    }
  }
}
```