Add Staff Salary Structure
Starts a new salary structure for a staff member on from_date. This changes what the staff member is paid. Shared rules: see Writing data. Needs Payroll on your plan.
- Saving a structure recalculates that staff member’s unfinalised payroll from
from_date. Read existing structures withGET /payroll/staff-ctc. from_dateisYYYY-MM-DDand the first day of a month. It is not before the joining month and not in a finalised month.ctc_amountmust equalbasic_amountplus the allowances plus the employer contributions that are part of CTC, within 1. Otherwise400onnon_field_errorswith the app’s message, for example “ctc_amount provided is not correct, should be 25000.0”.allowancesanddeductions: left out means the same as the current structure; sent means the list replaces all of them. Removing an allowance also removes it from what PF and ESI are worked out on.- PF, ESI, PT and LWF cannot be set through this endpoint. They carry over from the staff member’s current structure (the one in force on
from_date, else their earliest). A staff member with no structure gets none of them; they are set up in the SalaryBox app. - A structure set by hand no longer follows a template.
- A second structure on the same
from_dateis refused with400, which is harmless. UsePUT /payroll/ctcto change it.
Authentication
AuthorizationApi-Key
Format: “Api-Key {api-key}”
Request
This endpoint expects an object.
salarybox_id
SalaryBox ID of an active staff member.
from_date
YYYY-MM-DD, the first day of a month (otherwise 400, “Must be the first day of a month.”). Not before the joining month and not in a finalised month.
pay_cycle_type
Allowed values:
ctc_amount
JSON number with up to 2 decimals. Must equal basic plus allowances plus the employer contributions that are part of CTC, within 1.
basic_amount
JSON number with up to 2 decimals, at most ctc_amount.
allowances
Optional. Left out means the same as the current structure; sent means the list replaces all of them. Names do not repeat.
deductions
Optional. Left out means the same as the current structure; sent means the list replaces all of them. Names do not repeat.
Response
The salary structure was saved.
message
status
data
Errors
400
Bad Request Error
403
Forbidden Error
404
Not Found Error
