v1

latestOpenAPI 3.1.02026-07-14801408.6 KB

/timeoff/requests

Creates a new time off request. Required scope: w_timeoff. Supports both user and account level tokens.

post/timeoff/requests

Request body

employee_idstring

SPI key of the employee. Required for account tokens, optional for user tokens.

member_idstring

Identifies the member context for the request. Required for account tokens, optional for user tokens.

category_idstring required

The hex id retrieved by /timeoff/categories endpoint

from_datestring required

ISO 8601 date-time without timezone, with milliseconds — format YYYY-MM-DDTHH:mm:ss.SSS. A trailing Z or ±HH:mm offset is not accepted. Must be on or after the employee's start date (truncated to the start of day).

to_datestring required

ISO 8601 date-time without timezone, with milliseconds — format YYYY-MM-DDTHH:mm:ss.SSS. Must be on or after from_date (same day is allowed) and within less than 3 calendar years of it.

notestring

Note string max 140

Example request

{
  "from_date": "2024-04-15T00:00:00.000",
  "to_date": "2024-04-20T00:00:00.000",
  "half_days": [
    {
      "date": "2024-04-15T00:00:00.000"
    }
  ]
}

Response

200

idstring
employee_idstring

SPI key of the employee the request belongs to

from_datestring
to_datestring
formatted_periodstring
statestring
requesting_totalinteger
timeoff_tracking_unit'full_days' | 'half_days' | 'hours'
updated_bystring
updated_atstring
category_namestring

Example response

{
  "id": "1374",
  "employee_id": "4d3",
  "from_date": "2024-04-15T00:00:00.000",
  "to_date": "2024-04-20T00:00:00.000",
  "formatted_period": "15 April 2024 - 20 April 2024",
  "state": "approved",
  "requesting_total": 5,
  "timeoff_tracking_unit": "half_days",
  "updated_by": "Nikolaos Dimos",
  "updated_at": "2024-04-09T10:02:57.424Z",
  "category_name": "Paid time off ",
  "pending_approvals": [
    {
      "id": "4d3",
      "approver_id": "1839d70f-7caa-4f02-9e3f-c46cced76f5b"
    }
  ]
}