Skip to navigation

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, and time-tracking:write scopes. See Authentication.
  • The ID of the worker’s GP contract. Get it from GET /contracts with types=global_payroll.
  • The external_id of the processed categorized shift: the ID you chose at submission, or find it with GET /v2/time_tracking/shifts.

Correct the shift

1

Check the original shift

Retrieve the shift and confirm its amount and shift rate. See GET /time_tracking/shifts/{external_id}.

curl --request GET 'https://api.letsdeel.com/rest/time_tracking/shifts/{external_id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN'

If the shift’s payroll cycle hasn’t closed, update it with PATCH /time_tracking/shifts/{external_id} instead.

2

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.

curl --request POST 'https://api.letsdeel.com/rest/v2/time_tracking/shifts' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"data": {
"contract_id": "3j5z2e6",
"shifts": [
{
"external_id": "correction-jane-2026-10-05-1",
"description": "Correction: 2.5 fewer overtime hours than reported",
"shift_type": "CORRECTION_DELTA",
"shift_reference_id": "shift-jane-2026-10-05",
"corrections": [
{
"type": "SUBTRACTION",
"time_amount": 2.5
}
]
}
]
}
}'

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.

curl --request GET 'https://api.letsdeel.com/rest/time_tracking/shifts/{external_id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN'

shift_type is CORRECTION_DELTA, shift_reference_id is the original shift’s external_id, and summary.time_amount is -2.5.

Handle errors

StatusCauseFix
400: Cannot apply correction to shift {id}. Correction can only be applied to a regular shift that has been exported.The original shift hasn’t been processed yet, or it’s a correction itself.Before the cutoff, update the original shift. To undo a correction, delete it.
400: Cannot apply correction to shift {id}. Only summary shifts can be corrected.The original shift is an uncategorized (raw) shift.Submit categorized shifts. See Your integration submits uncategorized (raw) shifts.
400: Cannot apply {type} correction to shift {id}. {otherType} corrections have already been applied to this shift.The shift already has a correction in the other direction.Keep all corrections to one shift in the same direction.
400: Cannot apply correction to shift {id}. Subtraction correction would result in an overall negative valueThe SUBTRACTION is larger than the shift’s total.Subtract at most the shift’s total.
400: Cannot submit multiple corrections for the same shift reference ID: {ids}The request holds two corrections for the same original shift.Combine them into one correction.
403 ForbiddenThe token is missing the time-tracking:write scope.Create a token with that scope. See Authentication.

A missing required field returns a validation error that names it:

Response (400 Bad Request)
{
"errors": [
{
"code": "bad_request",
"path": "data.shifts.0.external_id",
"message": "Required"
}
]
}

Next steps