Skip to main content
PATCH
Update an allowance rule

Authorizations

X-API-KEY
string
header
required

Path Parameters

id
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$

Body

application/json
name
string
Minimum string length: 1
accrual_month
integer
Required range: 0 <= x <= 11
rule_amount
number

Allowance amount per accrual cycle, must be greater than 0. For hour-based allowance types the value is in MINUTES (e.g. 480 = 8 hours). Omit to leave a stored 0-amount (manual) rule unchanged.

Required range: x <= 100000
accrual_cycle
enum<string>
Available options:
month,
year,
biweek
accrual_anchor_date
string | null
Pattern: ^\d{4}-\d{2}-\d{2}$
cycle_on_employment_start
boolean
rule_duration
integer | null

Per-accrual rolling expiry in months (each accrual valid this many months from its accrual date). 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
proration_basis
enum<string>

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; full_month = only whole months count 1/12 each, a started month counts nothing; none = a rule year in which employment starts or ends grants the full yearly amount; every other partial year, such as a switch to another rule or an assignment that starts or ends during the year while employed, counts its months. Ignored for monthly and biweekly cycles.

Available options:
month,
day,
full_month,
none
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) = months after fiscal year end.

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

Amount surviving permanently after the expiry deadline. Requires carry_forward_expiry_months; must be lower than max_carry_forward when both are set.

Required range: 0 <= x <= 100000
reason
string

Why this rule is being changed — stored in the rule audit log.

Required string length: 3 - 500

Response

Successful response

count
number
required