Added `reversal_payroll.uuids` to Get all payrolls for a company
What changed
We added a new field reversal_payroll_uuids: []
to the GET all payrolls for a company endpoint. Use an include
param to configure whether to include reversal_payroll_uuids
in the response.
This new field is an array that contains reversed payroll uuids, which can then be retrieved with GET a single payroll for more information. If a payroll was not reversed, the reversal_payroll_uuids
array will be empty.
What problem this solves
Previously, the only way for partners to retrieve information on reversed payrolls was via GET approved payroll reversals.
However, it's useful to surface in payroll history views any payrolls that have been reversed since the payroll was submitted. A partner could only implement this previously by joining the responses of GET approved payroll reversals and GET all payrolls for a company, which is a non-performant and unnecessarily complex build.