Skip to navigation

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 from from_date. Read existing structures with GET /payroll/staff-ctc.
  • from_date is YYYY-MM-DD and the first day of a month. If no structure starts on that date the result is 404 “Salary structure not found.”
  • ctc_amount must equal basic_amount plus the allowances plus the employer contributions that are part of CTC, within 1. Otherwise 400 on non_field_errors with the app’s message, for example “ctc_amount provided is not correct, should be 25000.0”.
  • allowances and deductions: 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_idstringRequired1-50 characters
SalaryBox ID of an active staff member.
from_datedateRequired

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_typeenumRequired
Allowed values:
ctc_amountdoubleRequired0.01-100000000
JSON number with up to 2 decimals. Must equal basic plus allowances plus the employer contributions that are part of CTC, within 1.
basic_amountdoubleRequired0-100000000

JSON number with up to 2 decimals, at most ctc_amount.

allowanceslist of objectsOptional

Optional. Left out means the same as the current structure; sent means the list replaces all of them. Names do not repeat.

deductionslist of objectsOptional

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.
messagestringOptional
statusbooleanOptional
dataobjectOptional

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error