time_off_policies
Create time off policy
Creates a new time off policy for the given organization.
accrual_policy fields by accrual_type:
maximum_to_accrue is required for hours_worked, annual, and joined_date.
- none — starting_balance (optional)
- hours_worked — hours_per (required), hours_worked (required), maximum_to_accrue (required)
- annual — hours_per_year (required), maximum_to_accrue (required)
- joined_date — hours_per_year (required), maximum_to_accrue (required)
- monthly — accrual_period (required: month or year), accrual_day (required: first_day_of_month, monthly_anniversary, or last_day_of_month), prorate_on_start (optional); plus hours_per_month (required when accrual_period=month) or hours_per_year (required when accrual_period=year)
When membership_rules are provided, they take precedence over time_off_policy_user_ids. Additionally, auto_add_new_users defaults to true when membership_rules are provided.
Returns the created time off policy.
post/v2/organizations/{organization_id}/time_off_policies
Request
- Base URLhttps://api.hubstaff.com
- AuthOAuth 2Authorization codehttps://account.hubstaff.com/authorizations/newToken URLhttps://account.hubstaff.com/access_tokensScopeshubstaff:read, hubstaff:write
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
organization_idinteger required
Request body
Response
A time off policy
Changes
No recorded changes to this operation across all 1 revision of this API.