List organization time off policies
/v2/organizations/{organization_id}/time_off_policiesReturns a collection of time off policies for the given organization.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organization_idrequired | path | integer (int32) | |
page_start_id | query | integer (int32) | The page start ID. |
page_limit | query | integer (int32) | The default page size |
status | query | string | Policy status Possible values activearchivedall |
Responses
200A list of time off policies
- time_off_policiesarrayarray<object>itemsobject
TimeOffPolicy model
- idinteger required
Time off 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
Time off policy name
- created_by_idinteger
User ID who created the policy
- auto_add_new_usersboolean required
Automatically add new members to this policy
- allow_negative_balancesboolean required
Member can request time off before having the balance for it.
- requires_approvalboolean required
When false time off requests are automatically approved.
- balance_rolls_over_annuallyboolean required
balance rolls over annually
- paidboolean required
When true members will be paid for time off taken.
- statusstring required
Policy status
- policy_typestring required
Type of policy
- policy_configobject requiredobject
- starting_balancenumber
Starting balance (hours)
- hours_perinteger
Hours per at amount accrued
- hours_workedinteger
Hours worked at amount accrued
- maximum_to_accrueinteger
Maximum amount of time off that can be accrued per year. (hours)
- hours_per_yearinteger
Hours per year
- hours_per_monthnumber
Hours per month
- accrual_periodstring
Accrual period. If set to "month", hours_per_month is required. If set to "year", hours_per_year is required
- accrual_daystring
Day of the month when accrual happens
- prorate_on_startboolean
Whether to prorate time based on start date
- membership_rulesobjectobject
- countriesArray[String] required
ISO 3166-1 alpha-2 country codes
- employment_typesArray[String] required
Employment type filters
{
"time_off_policies": [
{
"id": 0,
"organization_id": 0,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"name": "string",
"created_by_id": 0,
"auto_add_new_users": false,
"allow_negative_balances": false,
"requires_approval": false,
"balance_rolls_over_annually": false,
"paid": false,
"status": "string",
"policy_type": "string",
"policy_config": {
"starting_balance": 0,
"hours_per": 0,
"hours_worked": 0,
"maximum_to_accrue": 0,
"hours_per_year": 0,
"hours_per_month": 0,
"accrual_period": "month",
"accrual_day": "first_day_of_month",
"prorate_on_start": false
},
"membership_rules": {
"countries": null,
"employment_types": null
}
}
]
}400Invalid parameters
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.
itemsstring
{
"code": "string",
"error_code": 0,
"error": "string",
"details": [
"string"
]
}401Unauthorized
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.
itemsstring
{
"code": "string",
"error_code": 0,
"error": "string",
"details": [
"string"
]
}403API access is only for organizations on an active plan
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.
itemsstring
{
"code": "string",
"error_code": 0,
"error": "string",
"details": [
"string"
]
}404Could not find record
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.
itemsstring
{
"code": "string",
"error_code": 0,
"error": "string",
"details": [
"string"
]
}429Rate limit exceeded
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.
itemsstring
{
"code": "string",
"error_code": 0,
"error": "string",
"details": [
"string"
]
}