Skip to navigation

Apply Staff Salary Template

Works out each staff member’s salary from a salary template and saves it. This is not a preview, and it changes what the staff are paid. Shared rules: see Writing data. Needs Payroll on your plan.

  • template_name is the exact name of a salary template, either the company’s own or a built-in one, as listed by the salary templates endpoint under payroll config (/payroll/config/templates).
  • salarybox_ids has at max 50 SalaryBox IDs of active staff with no repeats. If any is unknown the result is 400 and nothing changes.
  • 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 is the same for every staff member in the call.
  • The template sets PF, ESI and allowances, replacing the staff member’s for that structure. A structure already on from_date is overwritten, otherwise a new one starts. PT and LWF carry over from the staff member’s current structure.
  • Saving recalculates each staff member’s unfinalised payroll from from_date.
  • A 200 does not mean everyone changed. Always check each entry in data.staff: result is applied or skipped, and a skipped entry carries reason “Invalid Data” and errors. Each staff member is saved separately, so one skip does not undo the others.
  • Repeating the request sets the same values.

Authentication

AuthorizationApi-Key

Format: “Api-Key {api-key}”

Request

This endpoint expects an object.
template_namestringRequired

Exact name of a salary template, the company’s own or a built-in one, as listed by /payroll/config/templates.

salarybox_idslist of stringsRequired

SalaryBox IDs of active staff. If any is unknown the result is 400 and nothing changes.

from_datedateRequired

YYYY-MM-DD, the first day of a month. Not before the joining month and not in a finalised month.

pay_cycle_typeenumRequired
Allowed values:
ctc_amountdoubleRequired
Same for all staff in the call.

Response

The request was processed. Check result for each staff member.

messagestringOptional
statusbooleanOptional
dataobjectOptional

Errors

400
Bad Request Error
403
Forbidden Error