Skip to main content
POST
Create a new allowance rule

Authorizations

X-API-KEY
string
header
required

Path Parameters

allowance_type_id
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Body

application/json
name
string
required
Minimum string length: 1
accrual_month
integer
required

0 = January, 11 = December

Required range: 0 <= x <= 11
rule_amount
number
required

Allowance amount per accrual cycle. For day-based allowance types the value is in days; for hour-based allowance types the value is in MINUTES (e.g. 480 = 8 hours).

Required range: -100000 <= x <= 100000
accrual_cycle
enum<string>
required
Available options:
month,
year,
biweek
accrual_anchor_date
string | null

Bi-weekly cycle anchor (YYYY-MM-DD); null = count from each member's start date

Pattern: ^\d{4}-\d{2}-\d{2}$
cycle_on_employment_start
boolean
default:false
rule_duration
integer | null

Per-accrual rolling expiry: each accrual is valid for this many months from its accrual date, then expires automatically (like time off in lieu). Min 1; null = off. Cannot be combined with any carry-forward setting, and is not allowed on a 0-amount (manual) rule.

Required range: 1 <= x <= 1200
upfront_allocation
boolean
default:true

If true, full allowance is granted at start of cycle

proration_basis
enum<string>
default:month

How partial yearly rules are prorated. month = whole months count fully, the partial start or end month is prorated by day; day = calendar-day exact. Ignored for monthly and biweekly cycles. Defaults to month.

Available options:
month,
day
max_carry_forward
number | null

Hard cap on the amount carried into the next fiscal year, applied at the year boundary. null = unlimited (everything carries), 0 = nothing carries. For hour-based allowance types the value is in MINUTES.

Required range: 0 <= x <= 100000
carry_forward_expiry_months
integer | null

How long carried-forward allowance stays usable in the new fiscal year. null = it never expires; N (>= 1) = usable until the last day of the Nth month after the fiscal year end, then forfeited (except carry_forward_kept_after_expiry).

Required range: 1 <= x <= 1200
carry_forward_kept_after_expiry
number | null

Amount of the carried-forward allowance that survives permanently after the expiry deadline. Only allowed when carry_forward_expiry_months is set; must be lower than max_carry_forward when both are set. null/0 = nothing survives. For hour-based allowance types the value is in MINUTES.

Required range: 0 <= x <= 100000

Response

Successful response

id
string
required