v1

latestOpenAPI 3.1.02026-07-2414339465.7 KB

Create Accrual Policy

post/accrualPolicy

Request body

companyIDstring required

ID of the company

policy_codestring required

Unique code to assign to this policy

policy_typestring required

Type of the accrual policy (accepts: pto, sick_leave, or custom)

policy_namestring

Custom name that can be assigned for the policy

policy_effective_datestring date

The effective start date of the policy

accrual_rate_hoursnumber float required

The rate at which employees will accrue hours

accrual_period_hoursnumber float required

The number of hours employees need to work to accrue accrual_rate_hours

immediate_balancenumber float

The initial or immediate hour balance of policy

include_doubletimeboolean required

Include if doubletime work is eligible for hour accrual

include_overtimeboolean required

Include if overtime work is eligible for hour accrual

accrual_waiting_periodnumber float

The number of hours the employees need to work before they are eligible to begin accruing time for policy

accrual_capnumber float

The maximum number of hours an employee can accrue within a policy year. Once this limit is reached, no additional hours will accrue until the next accrual period or rollover_date.

rollover_capnumber float

The maximum number of unused hours an employee is allowed to carry over from one policy year to the next on the specified rollover date.

rollover_datestring date

Required if user passes a value for rollover_cap or accrual_cap

balance_capnumber float

The maximum balance an employee is allowed to hold under this policy

Response

200

successboolean

Example response

{
  "success": true,
  "data": {
    "companyID": "123er534efrerwwe3444e",
    "policy_type": "pto",
    "policy_name": "test name",
    "policy_code": "001",
    "policy_effective_date": "2023-03-20",
    "accrual_rate_hours": 0.5,
    "accrual_period_hours": 10,
    "immediate_balance": 10,
    "accrual_waiting_period": 28,
    "accrual_cap": 50,
    "rollover_cap": 20,
    "rollover_date": "05-01",
    "policy_status": "live"
  }
}