Update Staff Advance
Changes one existing advance entry of a staff member in payroll. It corrects the saved record and moves no money. Shared rules: see Writing data. Needs Payroll on your plan.
- There are no entry ids. Find the entry with
GET /payroll/advanceand send its current values (salarybox_id,dateandamount) exactly as listed, plusnew_fields for what changes. Anything left out stays as it is. - At least one
new_field is required; otherwise400undernon_field_errors: “Send at least one new_ field to change.” - No entry matches:
404“Entry not found.” with the error underamount. - More than one entry matches (identical entries on one day):
400underamount: “More than one entry matches. Edit it in the SalaryBox app.” salarybox_idis an active staff member of the company.dateis the entry’s current date,YYYY-MM-DD.new_dateis optional,YYYY-MM-DDand not in the future.amountis the entry’s current amount, a JSON number, 0 or more with up to 6 decimals; send it as the list returned it.new_amountis optional, a JSON number from 0.01 to 10000000 with up to 2 decimals.new_notesis optional, at max 500 characters, trimmed. Notes can be changed but not cleared.new_paid_onis optional,YYYY-MM-DDand not in the future; otherwise400on it “Date cannot be in the future.”new_payment_modeis optional:CASH,CHEQUE,DEBIT_CARD,IMPS,NEFT,NET_BANKING,RTGSorUPI. Online is not one of them.dateis the month the advance counts in;paid_onis when it was handed over.- It is refused if the month of
date,new_date, the entry’s currentpaid_onornew_paid_onis finalised:400ondate(current date or currentpaid_on),new_dateornew_paid_on. - Moving it to another month updates both months’ paid totals.
- An online payout can’t be edited:
400onamount“Cannot update online payments.” The list shows these aspaid_online: true. - The staff member gets an in-app notification that it was updated, and no SMS.
- Changing
new_amountor any value used to find the entry means a repeat of the same request finds nothing and gets404, so nothing changes twice. If only other fields changed, a repeat sets the same values.
Authentication
AuthorizationApi-Key
Format: “Api-Key {api-key}”
Request
This endpoint expects an object.
salarybox_id
SalaryBox ID of an active staff member.
date
The entry’s current date, YYYY-MM-DD.
amount
The entry's current amount, up to 6 decimals. Must be a JSON number.
new_amount
Up to 2 decimals. Must be a JSON number.
new_date
YYYY-MM-DD. Not in the future. Neither month involved may be finalised.
new_notes
Notes can be changed but not cleared.
new_paid_on
YYYY-MM-DD. Not in the future.
new_payment_mode
Response
The advance was updated. data holds the new values.
message
status
data
Errors
400
Bad Request Error
403
Forbidden Error
404
Not Found Error
