Correct a processed shift
Submit a correction shift to add or subtract time on a Global Payroll (GP) shift whose payroll cycle has closed. For the rules corrections follow, see Correction shifts.
Prerequisites
- An organization token with the
contracts:read,time-tracking:read, andtime-tracking:writescopes. See Authentication. - The ID of the worker’s GP contract. Get it from
GET /contractswithtypes=global_payroll. - The
external_idof the processed categorized shift: the ID you chose at submission, or find it withGET /v2/time_tracking/shifts.
Correct the shift
Check the original shift
Retrieve the shift and confirm its amount and shift rate. See GET /time_tracking/shifts/{external_id}.
If the shift’s payroll cycle hasn’t closed, update it with PATCH /time_tracking/shifts/{external_id} instead.
Submit the correction
A correction changes the worker’s pay in the next payroll cycle.
Submit a shift with its own external_id, shift_type set to CORRECTION_DELTA, shift_reference_id set to the original shift’s external_id, and one entry in corrections. See POST /v2/time_tracking/shifts for every field.
A corrections entry also takes the hours fields, such as total_payable_hours, to add or subtract hours. To state the corrected total instead of the difference, set shift_type to CORRECTION_ABSOLUTE and send the new total in summary.
Save the correction’s external_id. You need it to verify or delete the correction.
Verify the result
Retrieve the correction by its external_id.
shift_type is CORRECTION_DELTA, shift_reference_id is the original shift’s external_id, and summary.time_amount is -2.5.
Handle errors
A missing required field returns a validation error that names it: