Time off events

The following events can be used to create Time off request Webhooks.

Explore our guide Getting started with Bob webhooks.

Time off Events

Time off Request EventTypeDescription
requestedtimeoff.request.requestedTriggered when submitting a time off request.
approvedtimeoff.request.approvedTriggered when approving a time off request.
declinedtimeoff.request.declinedTriggered when declining a time off request.
cancelledtimeoff.request.cancelledTriggered when cancelling a time off request.
deletedtimeoff.request.deletedTriggered when deleting a time off request.
updatedtimeoff.request.updatedTriggered when updating a time off request.
created from importtimeoff.request.importedTriggered when importing a time off request.

How to handle Time off Events

  1. Receive the Event Notification:
    The Webhook sends a notification to your endpoint whenever a time off event is triggered. The payload includes the request id, employee id and a ready-to-use getAPI URL.
  2. Retrieve the Time off request data:
    Use the employee ID and request ID from the payload to perform the API call and retrieve the complete data relevant for this Time off request. To learn more, see API call for Time off events.

To learn more, see Time off requests in Bob.

Time off request requested

{
 "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"
 }
}

📘

Note

When using the getApi URL to retrieve details of a time off request that has just been submitted, the status in the response will be either:

  • approved: if the request was approved automatically
  • pending: if the request is pending approval. Once it will be approved or declined, an additional event will be sent.

Time off request approved

{
 "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"
 }
}

📘

Note

For requests that are approved automatically, two events are sent one after the other: requested then approved.

Time off request declined

{
 "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"
 }
}

📘

Note

When using the getApi URL to retrieve details of a declined time off request, the status in the response will be disapproved (not declined).

Time off request cancelled

{
  "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
  }
}

Time off request deleted

{
  "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
  }
}

Time off request updated

🚧

Update notification:

We enhanced the timeoff.request.updated event payload in the February release. For additional details, see Time off API: Improved modification history tracking

{
  "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
  }
}

📘

Notes:

  • In case of a date or time change to a request, this is consideref a hard-update that triggers a new request to replace the existing one, and the payload will include:
    • originalRequestId: The ID of the very first request before any modifications were made.
    • previousRequestId: The ID of the most recently replaced request.

Time off request created from import

{
 "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"
 }
}

📘

Note

When using the getApi URL to retrieve details of a time off request that has just been created via import, the status in the response will be approved, because imported requests are always approved by default.