HubstaffDeveloper Portal

Time off requests

Manage time off requests

List organization time off requests

GET/v2/organizations/{organization_id}/time_off_requests

Returns a collection of time off requests for the given organization.

Results can be filtered by created[start]/[stop], starts_at[start]/[stop], approved_at[start]/[stop], and user_ids[].

Use include[] to sideload related users and time_off_policies.

Parameters

NameInTypeDescription
organization_idrequired
pathinteger (int32)
page_start_id
queryinteger (int32)
The page start ID.
page_limit
queryinteger (int32)
The default page size
created[start]
querystring (date-time)
Start time (ISO 8601)
created[stop]
querystring (date-time)
Stop time (ISO 8601, Exclusive)
starts_at[start]
querystring (date-time)
Start time (ISO 8601)
starts_at[stop]
querystring (date-time)
Stop time (ISO 8601, Exclusive)
approved_at[start]
querystring (date-time)
Approved start time (ISO 8601)
approved_at[stop]
querystring (date-time)
Approved stop time (ISO 8601, Exclusive)
user_ids
queryarray integer[]
List of user IDs
include
queryarray string[]
Specify related data to side load.
Possible valuesuserstime_off_policies

Responses

200A list of time off requests
object
  • time_off_requestsarray
    array<object>
    items
    object

    TimeOffRequest model

    • idinteger required

      Time edit log ID

    • user_idinteger required

      User ID

    • time_off_policy_idinteger required

      Time off request ID

    • statusstring required

      Status

    • all_dayboolean required

      Time off request for all day (User's time zone)

    • starts_atstring required

      Time off request start time

    • stops_atstring required

      Time off request stop time

    • submitted_atstring

      Time off request submission time

    • approved_atstring

      Time off request approving time

    • denied_atstring

      Time off request denial time

    • paidboolean required

      If the time off request has been paid

    • amount_usedinteger required

      Time off request amount used

    • messagestring

      message

    • responsestring

      response

    • created_by_idinteger required

      User ID from creator

    • approved_by_idinteger

      Approving User ID

    • denied_by_idinteger

      Denying User ID

    • team_payment_detail_idinteger

      Team payment detail ID

    • team_payment_idinteger

      Team payment ID

    • time_off_request_daysobject required

      Individual work days covered by this time off request

      object
      • datestring required

        Date of the time off day

      • amount_usedinteger required

        Amount of time used in seconds for this day

      • starts_atstring required

        Start time for this specific day

      • stops_atstring required

        Stop time for this specific day

      • holidayboolean required

        Whether this day is a holiday

      • paidboolean required

        Whether this day has been paid

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

Example response
json
{
  "time_off_requests": [
    {
      "id": 0,
      "user_id": 0,
      "time_off_policy_id": 0,
      "status": "string",
      "all_day": false,
      "starts_at": "2024-01-15T10:30:00Z",
      "stops_at": "2024-01-15T10:30:00Z",
      "submitted_at": "2024-01-15T10:30:00Z",
      "approved_at": "2024-01-15T10:30:00Z",
      "denied_at": "2024-01-15T10:30:00Z",
      "paid": false,
      "amount_used": 0,
      "message": "string",
      "response": "string",
      "created_by_id": 0,
      "approved_by_id": 0,
      "denied_by_id": 0,
      "team_payment_detail_id": 0,
      "team_payment_id": 0,
      "time_off_request_days": {
        "date": "2024-01-15",
        "amount_used": 0,
        "starts_at": "2024-01-15T10:30:00Z",
        "stops_at": "2024-01-15T10:30:00Z",
        "holiday": false,
        "paid": false
      },
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    }
  ]
}
400Invalid parameters
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
401Unauthorized
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
403API access is only for organizations on an active plan
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
404Could not find record
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
429Rate limit exceeded
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}

Create time off request

POST/v2/organizations/{organization_id}/time_off_requests

Creates a new time off request.

Returns the created time off request with a balance_preview showing the policy balance impact.

time_off_request_days must include one entry for every date from starts_at to stops_at. Each entry requires a date and amount_used in seconds (typically 28800 for an 8-hour day). Set amount_used to 0 for excluded weekend or holiday days.

Set require_no_shift_overlap to true to reject the request if it overlaps with scheduled attendance shifts.

remove_shifts deletes overlapping attendance shifts only when the policy does not require approval (the request is auto-approved on creation). When the policy requires approval, this field is ignored — use the status endpoint to remove shifts at approval time instead.

Note: starts_at and stops_at are interpreted as wall-clock times in the target user’s configured timezone (any timezone offset in the value is ignored). When all_day is true, times are normalized to 09:00–17:00.

Parameters

NameInTypeDescription
organization_idrequired
pathinteger (int32)

Request body

object

Create time off request

  • user_idinteger required

    User ID

  • time_off_policy_idinteger required

    Time off policy ID

  • starts_atstring required

    Start time (ISO 8601)

  • stops_atstring required

    Stop time (ISO 8601)

  • messagestring required

    Reason for time off

  • all_dayboolean

    Full day request

  • exclude_weekendsboolean
  • exclude_holidaysboolean
  • require_no_shift_overlapboolean

    Reject if overlapping shifts exist

  • remove_shiftsboolean

    Remove overlapping attendance shifts. Only honored when the policy does not require approval (auto-approved requests). For policies that require approval, use the status endpoint to remove shifts upon approval.

  • time_off_request_daysarray required

    Day allocations

    array<object>

    Day allocations

    items
    object
    • datestring required
    • amount_usedinteger required

      Seconds

Responses

201A time off request
object
  • time_off_requestobject
    object

    TimeOffRequest model

    • idinteger required

      Time edit log ID

    • user_idinteger required

      User ID

    • time_off_policy_idinteger required

      Time off request ID

    • statusstring required

      Status

    • all_dayboolean required

      Time off request for all day (User's time zone)

    • starts_atstring required

      Time off request start time

    • stops_atstring required

      Time off request stop time

    • submitted_atstring

      Time off request submission time

    • approved_atstring

      Time off request approving time

    • denied_atstring

      Time off request denial time

    • paidboolean required

      If the time off request has been paid

    • amount_usedinteger required

      Time off request amount used

    • messagestring

      message

    • responsestring

      response

    • created_by_idinteger required

      User ID from creator

    • approved_by_idinteger

      Approving User ID

    • denied_by_idinteger

      Denying User ID

    • team_payment_detail_idinteger

      Team payment detail ID

    • team_payment_idinteger

      Team payment ID

    • time_off_request_daysobject required

      Individual work days covered by this time off request

      object
      • datestring required

        Date of the time off day

      • amount_usedinteger required

        Amount of time used in seconds for this day

      • starts_atstring required

        Start time for this specific day

      • stops_atstring required

        Stop time for this specific day

      • holidayboolean required

        Whether this day is a holiday

      • paidboolean required

        Whether this day has been paid

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

Example response
json
{
  "time_off_request": {
    "id": 0,
    "user_id": 0,
    "time_off_policy_id": 0,
    "status": "string",
    "all_day": false,
    "starts_at": "2024-01-15T10:30:00Z",
    "stops_at": "2024-01-15T10:30:00Z",
    "submitted_at": "2024-01-15T10:30:00Z",
    "approved_at": "2024-01-15T10:30:00Z",
    "denied_at": "2024-01-15T10:30:00Z",
    "paid": false,
    "amount_used": 0,
    "message": "string",
    "response": "string",
    "created_by_id": 0,
    "approved_by_id": 0,
    "denied_by_id": 0,
    "team_payment_detail_id": 0,
    "team_payment_id": 0,
    "time_off_request_days": {
      "date": "2024-01-15",
      "amount_used": 0,
      "starts_at": "2024-01-15T10:30:00Z",
      "stops_at": "2024-01-15T10:30:00Z",
      "holiday": false,
      "paid": false
    },
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
400Invalid parameters
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
401Unauthorized
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
403API access is only for organizations on an active plan
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
404Could not find record
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
429Rate limit exceeded
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}

Get time off request

GET/v2/time_off_requests/{time_off_request_id}

Returns the time off request with the given ID.

Includes time_off_request_days with per-day breakdown of dates, amounts, and holiday/paid status.

Also includes balance_preview showing the policy balance impact.

Parameters

NameInTypeDescription
time_off_request_idrequired
pathinteger (int32)
Time off request ID

Responses

200A time off request
object
  • time_off_requestobject
    object

    TimeOffRequest model

    • idinteger required

      Time edit log ID

    • user_idinteger required

      User ID

    • time_off_policy_idinteger required

      Time off request ID

    • statusstring required

      Status

    • all_dayboolean required

      Time off request for all day (User's time zone)

    • starts_atstring required

      Time off request start time

    • stops_atstring required

      Time off request stop time

    • submitted_atstring

      Time off request submission time

    • approved_atstring

      Time off request approving time

    • denied_atstring

      Time off request denial time

    • paidboolean required

      If the time off request has been paid

    • amount_usedinteger required

      Time off request amount used

    • messagestring

      message

    • responsestring

      response

    • created_by_idinteger required

      User ID from creator

    • approved_by_idinteger

      Approving User ID

    • denied_by_idinteger

      Denying User ID

    • team_payment_detail_idinteger

      Team payment detail ID

    • team_payment_idinteger

      Team payment ID

    • time_off_request_daysobject required

      Individual work days covered by this time off request

      object
      • datestring required

        Date of the time off day

      • amount_usedinteger required

        Amount of time used in seconds for this day

      • starts_atstring required

        Start time for this specific day

      • stops_atstring required

        Stop time for this specific day

      • holidayboolean required

        Whether this day is a holiday

      • paidboolean required

        Whether this day has been paid

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

Example response
json
{
  "time_off_request": {
    "id": 0,
    "user_id": 0,
    "time_off_policy_id": 0,
    "status": "string",
    "all_day": false,
    "starts_at": "2024-01-15T10:30:00Z",
    "stops_at": "2024-01-15T10:30:00Z",
    "submitted_at": "2024-01-15T10:30:00Z",
    "approved_at": "2024-01-15T10:30:00Z",
    "denied_at": "2024-01-15T10:30:00Z",
    "paid": false,
    "amount_used": 0,
    "message": "string",
    "response": "string",
    "created_by_id": 0,
    "approved_by_id": 0,
    "denied_by_id": 0,
    "team_payment_detail_id": 0,
    "team_payment_id": 0,
    "time_off_request_days": {
      "date": "2024-01-15",
      "amount_used": 0,
      "starts_at": "2024-01-15T10:30:00Z",
      "stops_at": "2024-01-15T10:30:00Z",
      "holiday": false,
      "paid": false
    },
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
400Invalid parameters
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
401Unauthorized
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
403API access is only for organizations on an active plan
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
404Could not find record
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
429Rate limit exceeded
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}

Update time off request

PUT/v2/time_off_requests/{time_off_request_id}

Updates a time off request’s details (dates, message, days, policy).

This is a full replacement — all fields must be provided, including time_off_request_days with one entry per date (amount_used in seconds, typically 28800 for an 8-hour day).

Approved, paid, or partially paid requests cannot be edited.

If the request was denied, updating it automatically resubmits it (status → submitted).

If the policy does not require approval, the request is auto-approved on update.

Set require_no_shift_overlap to true to reject the update if it overlaps with scheduled attendance shifts.

remove_shifts deletes overlapping attendance shifts only when the policy does not require approval (the request is auto-approved on update). When the policy requires approval, this field is ignored — use the status endpoint to remove shifts at approval time instead.

Note: starts_at and stops_at are interpreted as wall-clock times in the user’s configured timezone (any timezone offset in the value is ignored). When all_day is true, times are normalized to 09:00–17:00.

Parameters

NameInTypeDescription
time_off_request_idrequired
pathinteger (int32)
Time off request ID

Request body

object

Update time off request

  • time_off_policy_idinteger required

    Time off policy ID

  • starts_atstring required

    Start time (ISO 8601)

  • stops_atstring required

    Stop time (ISO 8601)

  • messagestring required

    Reason for time off

  • all_dayboolean

    Full day request

  • exclude_weekendsboolean
  • exclude_holidaysboolean
  • require_no_shift_overlapboolean

    Reject if overlapping shifts exist

  • remove_shiftsboolean

    Remove overlapping attendance shifts. Only honored when the policy does not require approval (auto-approved requests). For policies that require approval, use the status endpoint to remove shifts upon approval.

  • time_off_request_daysarray required

    Day allocations

    array<object>

    Day allocations

    items
    object
    • datestring required
    • amount_usedinteger required

      Seconds

Responses

200The updated time off request
object
  • time_off_requestobject
    object

    TimeOffRequest model

    • idinteger required

      Time edit log ID

    • user_idinteger required

      User ID

    • time_off_policy_idinteger required

      Time off request ID

    • statusstring required

      Status

    • all_dayboolean required

      Time off request for all day (User's time zone)

    • starts_atstring required

      Time off request start time

    • stops_atstring required

      Time off request stop time

    • submitted_atstring

      Time off request submission time

    • approved_atstring

      Time off request approving time

    • denied_atstring

      Time off request denial time

    • paidboolean required

      If the time off request has been paid

    • amount_usedinteger required

      Time off request amount used

    • messagestring

      message

    • responsestring

      response

    • created_by_idinteger required

      User ID from creator

    • approved_by_idinteger

      Approving User ID

    • denied_by_idinteger

      Denying User ID

    • team_payment_detail_idinteger

      Team payment detail ID

    • team_payment_idinteger

      Team payment ID

    • time_off_request_daysobject required

      Individual work days covered by this time off request

      object
      • datestring required

        Date of the time off day

      • amount_usedinteger required

        Amount of time used in seconds for this day

      • starts_atstring required

        Start time for this specific day

      • stops_atstring required

        Stop time for this specific day

      • holidayboolean required

        Whether this day is a holiday

      • paidboolean required

        Whether this day has been paid

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

Example response
json
{
  "time_off_request": {
    "id": 0,
    "user_id": 0,
    "time_off_policy_id": 0,
    "status": "string",
    "all_day": false,
    "starts_at": "2024-01-15T10:30:00Z",
    "stops_at": "2024-01-15T10:30:00Z",
    "submitted_at": "2024-01-15T10:30:00Z",
    "approved_at": "2024-01-15T10:30:00Z",
    "denied_at": "2024-01-15T10:30:00Z",
    "paid": false,
    "amount_used": 0,
    "message": "string",
    "response": "string",
    "created_by_id": 0,
    "approved_by_id": 0,
    "denied_by_id": 0,
    "team_payment_detail_id": 0,
    "team_payment_id": 0,
    "time_off_request_days": {
      "date": "2024-01-15",
      "amount_used": 0,
      "starts_at": "2024-01-15T10:30:00Z",
      "stops_at": "2024-01-15T10:30:00Z",
      "holiday": false,
      "paid": false
    },
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
400Invalid parameters
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
401Unauthorized
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
403API access is only for organizations on an active plan
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
404Could not find record
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
429Rate limit exceeded
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}

Delete time off request

DELETE/v2/time_off_requests/{time_off_request_id}

Deletes the time off request.

Approved or paid time off requests cannot be deleted.

Parameters

NameInTypeDescription
time_off_request_idrequired
pathinteger (int32)
Time off request ID

Responses

204Deletion successful
object
  • time_off_requestobject
    object

    TimeOffRequest model

    • idinteger required

      Time edit log ID

    • user_idinteger required

      User ID

    • time_off_policy_idinteger required

      Time off request ID

    • statusstring required

      Status

    • all_dayboolean required

      Time off request for all day (User's time zone)

    • starts_atstring required

      Time off request start time

    • stops_atstring required

      Time off request stop time

    • submitted_atstring

      Time off request submission time

    • approved_atstring

      Time off request approving time

    • denied_atstring

      Time off request denial time

    • paidboolean required

      If the time off request has been paid

    • amount_usedinteger required

      Time off request amount used

    • messagestring

      message

    • responsestring

      response

    • created_by_idinteger required

      User ID from creator

    • approved_by_idinteger

      Approving User ID

    • denied_by_idinteger

      Denying User ID

    • team_payment_detail_idinteger

      Team payment detail ID

    • team_payment_idinteger

      Team payment ID

    • time_off_request_daysobject required

      Individual work days covered by this time off request

      object
      • datestring required

        Date of the time off day

      • amount_usedinteger required

        Amount of time used in seconds for this day

      • starts_atstring required

        Start time for this specific day

      • stops_atstring required

        Stop time for this specific day

      • holidayboolean required

        Whether this day is a holiday

      • paidboolean required

        Whether this day has been paid

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

Example response
json
{
  "time_off_request": {
    "id": 0,
    "user_id": 0,
    "time_off_policy_id": 0,
    "status": "string",
    "all_day": false,
    "starts_at": "2024-01-15T10:30:00Z",
    "stops_at": "2024-01-15T10:30:00Z",
    "submitted_at": "2024-01-15T10:30:00Z",
    "approved_at": "2024-01-15T10:30:00Z",
    "denied_at": "2024-01-15T10:30:00Z",
    "paid": false,
    "amount_used": 0,
    "message": "string",
    "response": "string",
    "created_by_id": 0,
    "approved_by_id": 0,
    "denied_by_id": 0,
    "team_payment_detail_id": 0,
    "team_payment_id": 0,
    "time_off_request_days": {
      "date": "2024-01-15",
      "amount_used": 0,
      "starts_at": "2024-01-15T10:30:00Z",
      "stops_at": "2024-01-15T10:30:00Z",
      "holiday": false,
      "paid": false
    },
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
400Invalid parameters
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
401Unauthorized
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
403API access is only for organizations on an active plan
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
404Could not find record
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
429Rate limit exceeded
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}

Update time off request status

PUT/v2/time_off_requests/{time_off_request_id}/status

Approves or denies the time off request.

Allowed transitions: submitted → approved, submitted → denied, approved → denied, denied → approved.

Paid or partially paid time off requests cannot be modified through this endpoint.

When approving, use remove_shifts to automatically remove overlapping attendance shifts. This parameter is ignored when denying.

A response (reason) is required when denying a request.

Parameters

NameInTypeDescription
time_off_request_idrequired
pathinteger (int32)
Time off request ID

Request body

object

Update time off request status

  • statusstring required

    New status

  • responsestring

    Denial reason (required when denying)

  • remove_shiftsboolean

    Remove overlapping shifts (used when approving)

Responses

200The updated time off request
object
  • time_off_requestobject
    object

    TimeOffRequest model

    • idinteger required

      Time edit log ID

    • user_idinteger required

      User ID

    • time_off_policy_idinteger required

      Time off request ID

    • statusstring required

      Status

    • all_dayboolean required

      Time off request for all day (User's time zone)

    • starts_atstring required

      Time off request start time

    • stops_atstring required

      Time off request stop time

    • submitted_atstring

      Time off request submission time

    • approved_atstring

      Time off request approving time

    • denied_atstring

      Time off request denial time

    • paidboolean required

      If the time off request has been paid

    • amount_usedinteger required

      Time off request amount used

    • messagestring

      message

    • responsestring

      response

    • created_by_idinteger required

      User ID from creator

    • approved_by_idinteger

      Approving User ID

    • denied_by_idinteger

      Denying User ID

    • team_payment_detail_idinteger

      Team payment detail ID

    • team_payment_idinteger

      Team payment ID

    • time_off_request_daysobject required

      Individual work days covered by this time off request

      object
      • datestring required

        Date of the time off day

      • amount_usedinteger required

        Amount of time used in seconds for this day

      • starts_atstring required

        Start time for this specific day

      • stops_atstring required

        Stop time for this specific day

      • holidayboolean required

        Whether this day is a holiday

      • paidboolean required

        Whether this day has been paid

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

Example response
json
{
  "time_off_request": {
    "id": 0,
    "user_id": 0,
    "time_off_policy_id": 0,
    "status": "string",
    "all_day": false,
    "starts_at": "2024-01-15T10:30:00Z",
    "stops_at": "2024-01-15T10:30:00Z",
    "submitted_at": "2024-01-15T10:30:00Z",
    "approved_at": "2024-01-15T10:30:00Z",
    "denied_at": "2024-01-15T10:30:00Z",
    "paid": false,
    "amount_used": 0,
    "message": "string",
    "response": "string",
    "created_by_id": 0,
    "approved_by_id": 0,
    "denied_by_id": 0,
    "team_payment_detail_id": 0,
    "team_payment_id": 0,
    "time_off_request_days": {
      "date": "2024-01-15",
      "amount_used": 0,
      "starts_at": "2024-01-15T10:30:00Z",
      "stops_at": "2024-01-15T10:30:00Z",
      "holiday": false,
      "paid": false
    },
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
400Invalid parameters
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
401Unauthorized
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
403API access is only for organizations on an active plan
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
404Could not find record
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
429Rate limit exceeded
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}