Add Staff Leave Policy
Sets how much leave one staff member is given, per leave type. It does not change their current balance (use PUT /leave/balance for that). Only the leave types sent change. Shared rules: see Writing data.
salarybox_idis an active staff member of the company.policieshas at max 50 items, each leave type at most once.leave_typeis the exact leave type name (case-sensitive) fromGET /leave/balanceorGET /leave/policy; system leave types are refused.allocation_cycleisMONTHLYorANNUAL.total_allotted_leavesis 0-366 with up to 3 decimals; at most 31 whenMONTHLY.carry_forward_leavesis optional, 0-366 with up to 3 decimals. Left out, it stays as it is (0 for a new policy).- Every policy write needs the Leave Carry Forward plan feature, as in the app; otherwise
403with the plan’s upgrade message. - Numbers must be JSON numbers, not strings. Repeating the request is safe: it sets the same values.
Authentication
AuthorizationApi-Key
Format: “Api-Key {api-key}”
Request
This endpoint expects an object.
salarybox_id
SalaryBox ID of an active staff member.
policies
One item per leave type, each leave type at most once.
Response
The leave policy was saved.
message
status
data
Errors
400
Bad Request Error
403
Forbidden Error
404
Not Found Error
