Skip to navigation

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 with GET /payroll/staff-ctc.
  • from_date is YYYY-MM-DD and the first day of a month. It is not before the joining month and not in a finalised month.
  • 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.
  • A second structure on the same from_date is refused with 400, which is harmless. Use PUT /payroll/ctc to change it.

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

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error