Skip to navigation

Update Staff Employment History

Changes one past job in a staff member’s employment history. Shared rules: see Writing data.

  • salarybox_id goes in the URL path, not the body.
  • You never send ids. Name the entry by its current company_name (matched trimmed and case-insensitively). If the staff member has more than one entry with that company, also send its current joining_date.
  • Send the values you want in the new_ fields. This is a PUT that sets values: a new_ field that is null or left out keeps its current value, and nothing is ever cleared.
  • Send at least one non-null new_ field, or you get 400 “Send at least one new_ field to change.”
  • Dates are checked against what the entry will hold once saved: a new joining date against the stored leaving date, and the other way round. Errors are reported under the new_ field you sent.
  • salary is returned as a string with 2 decimals, or null.
  • As in the app, changing an entry cancels the staff member’s past-employment verification result, and a staff member who was marked verified shows “Details changed” in Staff Verification.
  • Repeating the same request is safe. Use List Staff Employment History to read entries back.

Authentication

AuthorizationApi-Key

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

Path parameters

salarybox_idstringRequired
SalaryBox ID of the staff member.

Request

This endpoint expects an object.
company_namestringRequired1-255 characters

The entry’s CURRENT company name. Matched trimmed and case-insensitively.

joining_datedateOptional

The entry’s CURRENT joining date, YYYY-MM-DD. Only needed when the staff member has more than one entry with that company.

new_company_namestring or nullOptional1-255 characters

New company name (trimmed). null or left out keeps the current value.

new_designationstring or nullOptional1-100 characters

New job title (trimmed). null or left out keeps the current value.

new_joining_datedate or nullOptional

YYYY-MM-DD; not in the future. null or left out keeps the current value.

new_leaving_datedate or nullOptional

YYYY-MM-DD; not in the future. null or left out keeps the current value.

new_salarydouble or nullOptional>=0

A number (not text), 0 or more, up to 2 decimal places and 12 digits in total. null or left out keeps the current value.

new_company_gststring or nullOptional

A valid GSTIN (upper-cased for you); otherwise 400 “Invalid GSTIN.” null or left out keeps the current value.

new_currencyenum or nullOptional

null or left out keeps the current value.

Response

The employment history entry was updated. data has the same shape as Add Staff Employment History.

messagestring
statusboolean
dataobject

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error