HubstaffDeveloper Portal

Overtime policies

Create, read, edit and archive overtime policies and their member assignments

Recent changes (1)
  1. New endpoint

    Overtime policies API

    List, create, read, edit, archive, and restore overtime policies and their member assignments.

    A new overtime_policy entity exposes the policy type (weekly/daily), threshold, pay rate multiplier, notification settings, and assigned members. Notes: threshold is in hours; edits take effect at the start of the next week; policy_type cannot be changed after creation; archived policies cannot be edited. When assigning members (on create or edit), pass override: true to move members that already belong to another active policy of the same type; otherwise the request is rejected. daily policies require the flexible overtime feature.

List organization overtime policies

GET/v2/organizations/{organization_id}/overtime_policies

Returns a collection of overtime policies for the given organization.

Only organization Owners and Managers may use this endpoint.

Parameters

NameInTypeDescription
organization_idrequired
pathinteger (int32)
page_start_id
queryinteger (int32)
The page start ID.
page_limit
queryinteger (int32)
The default page size
status
querystring
Filter by lifecycle group: active (not past), archived (past), or all. Note the returned per-policy status may also be pending or expiring.
Possible valuesactivearchivedall

Responses

200A list of overtime policies
object
  • overtime_policiesarray
    array<object>
    items
    object

    OvertimePolicy model

    • idinteger required

      Overtime policy ID

    • organization_idinteger required

      Organization ID

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

    • namestring required

      Policy name

    • policy_typestring required

      How the threshold is evaluated: weekly or daily

    • statusstring required

      Policy status: active, pending, expiring or archived

    • thresholdnumber required

      Hours per period before time counts as overtime

    • pay_rate_multiplierstring required

      Pay rate multiplier after the threshold

    • bill_rate_multiplierstring required

      Bill rate multiplier after the threshold

    • sincestring required

      When the policy becomes effective

    • untilstring required

      When the policy expires (null while open)

    • auto_add_new_usersboolean required

      Automatically add new members to this policy

    • notification_enabledboolean required

      Whether overtime notifications are sent

    • notification_role_idsArray[String] required

      Roles notified about overtime

    • superseded_by_idinteger

      ID of the policy that replaced this one

    • editableboolean required

      Whether the policy can still be edited

    • lockedboolean required

      Whether the policy is in use and read-only

    • user_idsArray[long] required

      User IDs assigned to this policy

Example response
json
{
  "overtime_policies": [
    {
      "id": 0,
      "organization_id": 0,
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z",
      "name": "string",
      "policy_type": "string",
      "status": "string",
      "threshold": 0,
      "pay_rate_multiplier": "string",
      "bill_rate_multiplier": "string",
      "since": "2024-01-15T10:30:00Z",
      "until": "2024-01-15T10:30:00Z",
      "auto_add_new_users": false,
      "notification_enabled": false,
      "notification_role_ids": null,
      "superseded_by_id": 0,
      "editable": false,
      "locked": false,
      "user_ids": null
    }
  ]
}
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 overtime policy

POST/v2/organizations/{organization_id}/overtime_policies

Creates a new overtime policy for the given organization and assigns the given members.

threshold is the number of hours worked per period (week for weekly, day for daily) before tracked time is considered overtime. pay_rate_multiplier is applied to the member’s pay rate after the threshold is reached.

At least one member (user_ids) is required, and every assigned member must have a pay rate set. daily policies require the flexible overtime feature.

A member can only belong to one policy of a given type at a time. If any member in user_ids is already assigned to another active policy of the same type, the request fails unless override is true, in which case those members are moved into this policy.

Notifications are enabled by default but go to no one unless notification_role_ids is provided.

The policy becomes effective at the start of the organization’s next week (for weekly policies) or the next day (for daily policies). Pass starts_on to schedule a later start aligned to that boundary.

Only organization Owners and Managers may use this endpoint.

Parameters

NameInTypeDescription
organization_idrequired
pathinteger (int32)

Request body

object

Create overtime policy

  • namestring required

    Policy name (2-50 characters)

  • policy_typestring

    How the threshold is evaluated

  • thresholdnumber required

    Hours worked per period before overtime applies

  • pay_rate_multipliernumber required

    Pay rate multiplier after the threshold

  • user_idsarray required

    User IDs to assign to the policy

    array<integer>

    User IDs to assign to the policy

    items
    integer(int32)
  • auto_add_new_usersboolean

    Automatically add new members to this policy

  • notification_enabledboolean

    Whether overtime notifications are sent

  • notification_role_idsarray

    Roles notified about overtime

    array<string>

    Roles notified about overtime

    items
    string
  • starts_onstring

    Scheduled start date (period-aligned)

  • overrideboolean

    Move members already on another active policy of the same type into this one. Without it, the request fails if any assigned member is already on such a policy.

Responses

201An overtime policy
object
  • overtime_policyobject
    object

    OvertimePolicy model

    • idinteger required

      Overtime policy ID

    • organization_idinteger required

      Organization ID

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

    • namestring required

      Policy name

    • policy_typestring required

      How the threshold is evaluated: weekly or daily

    • statusstring required

      Policy status: active, pending, expiring or archived

    • thresholdnumber required

      Hours per period before time counts as overtime

    • pay_rate_multiplierstring required

      Pay rate multiplier after the threshold

    • bill_rate_multiplierstring required

      Bill rate multiplier after the threshold

    • sincestring required

      When the policy becomes effective

    • untilstring required

      When the policy expires (null while open)

    • auto_add_new_usersboolean required

      Automatically add new members to this policy

    • notification_enabledboolean required

      Whether overtime notifications are sent

    • notification_role_idsArray[String] required

      Roles notified about overtime

    • superseded_by_idinteger

      ID of the policy that replaced this one

    • editableboolean required

      Whether the policy can still be edited

    • lockedboolean required

      Whether the policy is in use and read-only

    • user_idsArray[long] required

      User IDs assigned to this policy

Example response
json
{
  "overtime_policy": {
    "id": 0,
    "organization_id": 0,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "name": "string",
    "policy_type": "string",
    "status": "string",
    "threshold": 0,
    "pay_rate_multiplier": "string",
    "bill_rate_multiplier": "string",
    "since": "2024-01-15T10:30:00Z",
    "until": "2024-01-15T10:30:00Z",
    "auto_add_new_users": false,
    "notification_enabled": false,
    "notification_role_ids": null,
    "superseded_by_id": 0,
    "editable": false,
    "locked": false,
    "user_ids": null
  }
}
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 overtime policy

GET/v2/overtime_policies/{overtime_policy_id}

Returns the overtime policy with the given ID.

Only organization Owners and Managers may use this endpoint.

Parameters

NameInTypeDescription
overtime_policy_idrequired
pathinteger (int32)
Overtime policy ID

Responses

200An overtime policy
object
  • overtime_policyobject
    object

    OvertimePolicy model

    • idinteger required

      Overtime policy ID

    • organization_idinteger required

      Organization ID

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

    • namestring required

      Policy name

    • policy_typestring required

      How the threshold is evaluated: weekly or daily

    • statusstring required

      Policy status: active, pending, expiring or archived

    • thresholdnumber required

      Hours per period before time counts as overtime

    • pay_rate_multiplierstring required

      Pay rate multiplier after the threshold

    • bill_rate_multiplierstring required

      Bill rate multiplier after the threshold

    • sincestring required

      When the policy becomes effective

    • untilstring required

      When the policy expires (null while open)

    • auto_add_new_usersboolean required

      Automatically add new members to this policy

    • notification_enabledboolean required

      Whether overtime notifications are sent

    • notification_role_idsArray[String] required

      Roles notified about overtime

    • superseded_by_idinteger

      ID of the policy that replaced this one

    • editableboolean required

      Whether the policy can still be edited

    • lockedboolean required

      Whether the policy is in use and read-only

    • user_idsArray[long] required

      User IDs assigned to this policy

Example response
json
{
  "overtime_policy": {
    "id": 0,
    "organization_id": 0,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "name": "string",
    "policy_type": "string",
    "status": "string",
    "threshold": 0,
    "pay_rate_multiplier": "string",
    "bill_rate_multiplier": "string",
    "since": "2024-01-15T10:30:00Z",
    "until": "2024-01-15T10:30:00Z",
    "auto_add_new_users": false,
    "notification_enabled": false,
    "notification_role_ids": null,
    "superseded_by_id": 0,
    "editable": false,
    "locked": false,
    "user_ids": null
  }
}
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 overtime policy

PUT/v2/overtime_policies/{overtime_policy_id}

Updates an overtime policy. Only pass in the fields you want to change.

Updatable fields: name, threshold, pay_rate_multiplier, auto_add_new_users, notification_enabled, notification_role_ids, and user_ids (member assignments).

Immutable after creation: policy_type. Editing an archived policy is not allowed.

Changes apply at the start of the organization’s next week (for weekly policies) or the next day (for daily policies). A policy that is already in use is not edited in place — a new version is created and the current one is archived.

A member can only belong to one policy of a given type at a time. If any member in user_ids is already assigned to another active policy of the same type, the request fails unless override is true, in which case those members are moved into this policy.

Only organization Owners and Managers may use this endpoint.

Parameters

NameInTypeDescription
overtime_policy_idrequired
pathinteger (int32)
Overtime policy ID

Request body

object

Update overtime policy

  • namestring

    Policy name (2-50 characters)

  • policy_typestring

    Cannot be changed once the policy is created

  • thresholdnumber

    Hours worked per period before overtime applies

  • pay_rate_multipliernumber

    Pay rate multiplier after the threshold

  • user_idsarray

    User IDs to set as the policy members

    array<integer>

    User IDs to set as the policy members

    items
    integer(int32)
  • auto_add_new_usersboolean

    Automatically add new members to this policy

  • notification_enabledboolean

    Whether overtime notifications are sent

  • notification_role_idsarray

    Roles notified about overtime

    array<string>

    Roles notified about overtime

    items
    string
  • starts_onstring

    Scheduled start date (period-aligned)

  • overrideboolean

    When assigning members, move any who are already on another active policy of the same type into this one. Without it, the request fails if any assigned member is already on such a policy.

Responses

200An overtime policy
object
  • overtime_policyobject
    object

    OvertimePolicy model

    • idinteger required

      Overtime policy ID

    • organization_idinteger required

      Organization ID

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

    • namestring required

      Policy name

    • policy_typestring required

      How the threshold is evaluated: weekly or daily

    • statusstring required

      Policy status: active, pending, expiring or archived

    • thresholdnumber required

      Hours per period before time counts as overtime

    • pay_rate_multiplierstring required

      Pay rate multiplier after the threshold

    • bill_rate_multiplierstring required

      Bill rate multiplier after the threshold

    • sincestring required

      When the policy becomes effective

    • untilstring required

      When the policy expires (null while open)

    • auto_add_new_usersboolean required

      Automatically add new members to this policy

    • notification_enabledboolean required

      Whether overtime notifications are sent

    • notification_role_idsArray[String] required

      Roles notified about overtime

    • superseded_by_idinteger

      ID of the policy that replaced this one

    • editableboolean required

      Whether the policy can still be edited

    • lockedboolean required

      Whether the policy is in use and read-only

    • user_idsArray[long] required

      User IDs assigned to this policy

Example response
json
{
  "overtime_policy": {
    "id": 0,
    "organization_id": 0,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "name": "string",
    "policy_type": "string",
    "status": "string",
    "threshold": 0,
    "pay_rate_multiplier": "string",
    "bill_rate_multiplier": "string",
    "since": "2024-01-15T10:30:00Z",
    "until": "2024-01-15T10:30:00Z",
    "auto_add_new_users": false,
    "notification_enabled": false,
    "notification_role_ids": null,
    "superseded_by_id": 0,
    "editable": false,
    "locked": false,
    "user_ids": null
  }
}
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"
  ]
}

Archive overtime policy

POST/v2/overtime_policies/{overtime_policy_id}/archive

Archives the overtime policy by closing it. A policy that is in use is closed at the start of the organization’s next week; an unused policy is closed immediately. Overtime policies are never deleted, only archived.

Only organization Owners and Managers may use this endpoint.

Parameters

NameInTypeDescription
overtime_policy_idrequired
pathinteger (int32)
Overtime policy ID

Responses

200An overtime policy
object
  • overtime_policyobject
    object

    OvertimePolicy model

    • idinteger required

      Overtime policy ID

    • organization_idinteger required

      Organization ID

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

    • namestring required

      Policy name

    • policy_typestring required

      How the threshold is evaluated: weekly or daily

    • statusstring required

      Policy status: active, pending, expiring or archived

    • thresholdnumber required

      Hours per period before time counts as overtime

    • pay_rate_multiplierstring required

      Pay rate multiplier after the threshold

    • bill_rate_multiplierstring required

      Bill rate multiplier after the threshold

    • sincestring required

      When the policy becomes effective

    • untilstring required

      When the policy expires (null while open)

    • auto_add_new_usersboolean required

      Automatically add new members to this policy

    • notification_enabledboolean required

      Whether overtime notifications are sent

    • notification_role_idsArray[String] required

      Roles notified about overtime

    • superseded_by_idinteger

      ID of the policy that replaced this one

    • editableboolean required

      Whether the policy can still be edited

    • lockedboolean required

      Whether the policy is in use and read-only

    • user_idsArray[long] required

      User IDs assigned to this policy

Example response
json
{
  "overtime_policy": {
    "id": 0,
    "organization_id": 0,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "name": "string",
    "policy_type": "string",
    "status": "string",
    "threshold": 0,
    "pay_rate_multiplier": "string",
    "bill_rate_multiplier": "string",
    "since": "2024-01-15T10:30:00Z",
    "until": "2024-01-15T10:30:00Z",
    "auto_add_new_users": false,
    "notification_enabled": false,
    "notification_role_ids": null,
    "superseded_by_id": 0,
    "editable": false,
    "locked": false,
    "user_ids": null
  }
}
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"
  ]
}

Restore overtime policy

POST/v2/overtime_policies/{overtime_policy_id}/restore

Restores an archived overtime policy. A policy that was used is restored as a new copy effective at the start of the organization’s next week (the original stays archived); an unused policy is reopened in place.

Restoring fails if any of its members are already assigned to another active policy of the same type.

Only organization Owners and Managers may use this endpoint.

Parameters

NameInTypeDescription
overtime_policy_idrequired
pathinteger (int32)
Overtime policy ID

Responses

200An overtime policy
object
  • overtime_policyobject
    object

    OvertimePolicy model

    • idinteger required

      Overtime policy ID

    • organization_idinteger required

      Organization ID

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

    • namestring required

      Policy name

    • policy_typestring required

      How the threshold is evaluated: weekly or daily

    • statusstring required

      Policy status: active, pending, expiring or archived

    • thresholdnumber required

      Hours per period before time counts as overtime

    • pay_rate_multiplierstring required

      Pay rate multiplier after the threshold

    • bill_rate_multiplierstring required

      Bill rate multiplier after the threshold

    • sincestring required

      When the policy becomes effective

    • untilstring required

      When the policy expires (null while open)

    • auto_add_new_usersboolean required

      Automatically add new members to this policy

    • notification_enabledboolean required

      Whether overtime notifications are sent

    • notification_role_idsArray[String] required

      Roles notified about overtime

    • superseded_by_idinteger

      ID of the policy that replaced this one

    • editableboolean required

      Whether the policy can still be edited

    • lockedboolean required

      Whether the policy is in use and read-only

    • user_idsArray[long] required

      User IDs assigned to this policy

Example response
json
{
  "overtime_policy": {
    "id": 0,
    "organization_id": 0,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "name": "string",
    "policy_type": "string",
    "status": "string",
    "threshold": 0,
    "pay_rate_multiplier": "string",
    "bill_rate_multiplier": "string",
    "since": "2024-01-15T10:30:00Z",
    "until": "2024-01-15T10:30:00Z",
    "auto_add_new_users": false,
    "notification_enabled": false,
    "notification_role_ids": null,
    "superseded_by_id": 0,
    "editable": false,
    "locked": false,
    "user_ids": null
  }
}
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"
  ]
}