Skip to main content
POST
Create a new allowance rule

Autorisierungen

X-API-KEY
string
header
erforderlich

Pfadparameter

allowance_type_id
string<uuid>
erforderlich
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
erforderlich
Minimum string length: 1
accrual_month
integer
erforderlich

0 = January, 11 = December

Erforderlicher Bereich: 0 <= x <= 11
rule_amount
number
erforderlich

Allowance amount per accrual cycle, must be greater than 0. 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). A 0-amount (manual) rule is created by assigning a member to manage manually, not through this endpoint.

Erforderlicher Bereich: x <= 100000
accrual_cycle
enum<string>
erforderlich
Verfügbare Optionen:
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
Standard: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.

Erforderlicher Bereich: 1 <= x <= 1200
upfront_allocation
boolean
Standard:true

If true, full allowance is granted at start of cycle

proration_basis
enum<string>
Standard: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; full_month = only whole months count 1/12 each, a started month counts nothing. Ignored for monthly and biweekly cycles. Defaults to month.

Verfügbare Optionen:
month,
day,
full_month
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.

Erforderlicher Bereich: 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).

Erforderlicher Bereich: 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.

Erforderlicher Bereich: 0 <= x <= 100000

Antwort

Successful response

id
string
erforderlich