Update Staff Salary Structure
Changes the salary structure that already starts on from_date. This changes what the staff member is paid. Shared rules: see Writing data. Needs Payroll on your plan.
- Same body as
POST /payroll/ctc. Saving recalculates that staff member’s unfinalised payroll fromfrom_date. Read existing structures withGET /payroll/staff-ctc. from_dateisYYYY-MM-DDand the first day of a month. If no structure starts on that date the result is404“Salary structure not found.”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.
- Repeating the request is safe.
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 updated.
message
status
data
Errors
400
Bad Request Error
403
Forbidden Error
404
Not Found Error
