Skip to content

Deel: Update a shift — time Tracking Shifts update Shift

Deel timeTrackingShifts.updateShift: arguments, response, policy and SDK examples.

← Time tracking shifts operations · Get started

Operation deel.timetrackingshifts_updateshift_v2026_11_13

Provider route: PATCH /time-tracking/shifts/{shift_id}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/deel with npm, or alter-sdk-deel with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { DeelIntegration } from "@alter-ai/deel";
async function execute(input: Parameters<DeelIntegration["timeTrackingShifts"]["updateShift"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new DeelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.timeTrackingShifts.updateShift(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_deel import DeelIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = DeelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.time_tracking_shifts.update_shift(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.shift_idstringRequired within parentFormat: uuid
headersobjectRequired within parentAdditional keys: not allowed
headers.Idempotency-KeystringOptionalMaximum length: 64
headers.X-BetastringRequired within parentDefault: true
One of: true
bodyobjectOptional
body.dataModelRequired within parentExpand Update a shift — time Tracking Shifts update Shift — request body — body data
Fields to change. Fields not sent keep their value; breaks and call_outs, when sent, replace the whole list.

Referenced models: Update a shift — time Tracking Shifts update Shift — request body — body data

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Get a shift by ID — 201 response body

Referenced models: Get a shift by ID — 201 response body

1 more schema is linked from the tables above, on the schema pages.

Get a shift by ID — 201 response body
FieldTypePresenceDescription and constraints
$objectRoot
dataModelRequired within parentExpand Get a shift by ID — 201 response body — data
A shift recorded on a contract.

Referenced models: Get a shift by ID — 201 response body — data

Update a shift — time Tracking Shifts update Shift — request body — body data
FieldTypePresenceDescription and constraints
$objectRootFields to change. Fields not sent keep their value; breaks and call_outs, when sent, replace the whole list.
breaksarrayOptionalBreaks inside the shift, without overlaps. Not accepted on duration-only shifts.
breaks[]ModelEach itemExpand Create a shift for a contract — request body — body data breaks item
call_outsarrayOptionalCall-outs inside an ON_CALL shift, without overlaps. Accepted only on ON_CALL shifts.
call_outs[]ModelEach itemExpand Get a shift by ID — 201 response body — data call outs item
datestringOptionalShift day, the local date the shift belongs to. Required for duration-only and DAY_TRACKING shifts; taken from start when omitted otherwise.
Format: date
descriptionstring or nullOptionalWhat the worker did. Required when the time tracking policy requires a work description.
Maximum length: 30000
endstring or nullOptionalShift end as the local clock time where the work happened, without a UTC offset. Send with start; after start.
Pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
is_half_daybooleanOptionalWhether a DAY_TRACKING shift counts as half a day. Accepted only on DAY_TRACKING shifts.
is_meal_break_waivedbooleanOptionalWhether the worker waived the meal break. Accepted only when the time tracking policy allows waiving.
project_idstring or nullOptionalProject the time was spent on. Must belong to the contract.
Format: uuid
startstring or nullOptionalShift start as the local clock time where the work happened, without a UTC offset (not UTC). Send with end; null or omitted for duration-only and DAY_TRACKING shifts. Stored as sent.
Pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
statusstringOptionalApproval status to set. PENDING sends the shift to approval. APPROVED is accepted from organization tokens only; worker tokens get 403.
One of: PENDING, APPROVED
timezonestring or nullOptionalIANA time zone the shift was worked in, stored as sent and not checked. When omitted or null, it is filled from the requester's profile, as in the app. Start and end are never converted to it.
Maximum length: 255
typestringOptionalKind of time the shift records. Which types a contract accepts depends on its time tracking policy.
One of: REGULAR, OVERTIME, ON_CALL, KEEP_IN_TOUCH, DAY_TRACKING
worked_hoursnumberOptionalHours worked. Required for duration-only shifts (no start or end); not accepted when start and end are sent, as Deel calculates it.
Greater than: 0
Format: double
Maximum: 24

Referenced models: Get a shift by ID — 201 response body — data call outs item, Create a shift for a contract — request body — body data breaks item

Get a shift by ID — 201 response body — data
FieldTypePresenceDescription and constraints
$objectRootA shift recorded on a contract.
break_hoursJSONRequired within parent
break_hours (anyOf 1)numberAlternativeHours spent on breaks.
Format: double
break_hours (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
breaksarrayRequired within parentBreaks inside the shift; empty when there are none.
breaks[]ModelEach itemExpand Get a shift by ID — 201 response body — data breaks item
call_outsarrayRequired within parentCall-outs inside an ON_CALL shift; empty for other types.
call_outs[]ModelEach itemExpand Get a shift by ID — 201 response body — data call outs item
contract_idstringRequired within parentDeel contract the shift is recorded on.
created_atstringRequired within parentWhen the shift was created, in UTC.
Format: date-time
datestringRequired within parentShift day, the local date the shift belongs to.
Format: date
descriptionJSONRequired within parent
description (anyOf 1)stringAlternativeWhat the worker did; null when none.
description (anyOf 2)nullAlternativeWhat the worker did; null when none.
endJSONRequired within parent
end (anyOf 1)stringAlternativeShift end as local clock time, without a UTC offset; null for duration-only and DAY_TRACKING shifts.
Pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
end (anyOf 2)nullAlternativeShift end as local clock time, without a UTC offset; null for duration-only and DAY_TRACKING shifts.
Pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
idstringRequired within parentDeel ID of the shift; the shift_id path parameter.
Format: uuid
is_half_daybooleanOptionalWhether a DAY_TRACKING shift counts as half a day. Present only on DAY_TRACKING shifts.
is_meal_break_waivedbooleanRequired within parentWhether the worker waived the meal break.
originstringRequired within parentChannel the shift was entered through. PLATFORM is the Deel web app, ADMIN is Deel staff, AUTO_SUBMIT is automatic submission, INTERNAL_INTEGRATION is another Deel product, EXTERNAL_INTEGRATION is this API; null when the channel was not recorded.
Known values: PLATFORM, MOBILE, ADMIN, AUTO_SUBMIT, INTERNAL_INTEGRATION, EXTERNAL_INTEGRATION, SLACK
project_idJSONRequired within parent
project_id (anyOf 1)stringAlternativeProject the time was spent on; null when none.
Format: uuid
project_id (anyOf 2)nullAlternativeProject the time was spent on; null when none.
Format: uuid
startJSONRequired within parent
start (anyOf 1)stringAlternativeShift start as local clock time, without a UTC offset; null for duration-only and DAY_TRACKING shifts.
Pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
start (anyOf 2)nullAlternativeShift start as local clock time, without a UTC offset; null for duration-only and DAY_TRACKING shifts.
Pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
statusstringRequired within parentApproval status of the shift. On a pay-as-you-go contract it follows the hourly report: APPROVED also covers hourly reports being processed, paid or marked not payable.
Known values: PENDING, APPROVED, REJECTED
timezoneJSONRequired within parent
timezone (anyOf 1)stringAlternativeIANA time zone the shift was worked in: as sent, or filled from the requester's profile when it was not sent; null when neither had one.
timezone (anyOf 2)nullAlternativeIANA time zone the shift was worked in: as sent, or filled from the requester's profile when it was not sent; null when neither had one.
total_hoursJSONRequired within parent
total_hours (anyOf 1)numberAlternativeHours from start to end, breaks included.
Format: double
total_hours (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
typestringRequired within parentKind of time the shift records. Which types a contract accepts depends on its time tracking policy.
Known values: REGULAR, OVERTIME, ON_CALL, KEEP_IN_TOUCH, DAY_TRACKING
updated_atstringRequired within parentWhen the shift last changed, in UTC.
Format: date-time
worked_hoursJSONRequired within parent
worked_hours (anyOf 1)numberAlternativeHours worked, total hours minus break hours.
Format: double
worked_hours (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Get a shift by ID — 201 response body — data breaks item, Get a shift by ID — 201 response body — data call outs item

Get a shift by ID — 201 response body — data call outs item
FieldTypePresenceDescription and constraints
$objectRootA period inside an on-call shift when the worker was called out to work.
endstringRequired within parentCall-out end, local time (no UTC offset). After start and not after the shift end.
Pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
startstringRequired within parentCall-out start, local time where the work happened (no UTC offset).
Pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
Create a shift for a contract — request body — body data breaks item
FieldTypePresenceDescription and constraints
$objectRootA break taken inside the shift.
endstringRequired within parentBreak end, local time (no UTC offset). After start and not after the shift end.
Pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
startstringRequired within parentBreak start, local time where the work happened (no UTC offset).
Pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
typestringRequired within parentKind of break. BREAK is a generic break; use MEAL_BREAK or REST_BREAK when known, and LACTATION_BREAK where the time tracking policy offers it.
One of: BREAK, MEAL_BREAK, REST_BREAK, LACTATION_BREAK

SDK function policy ID: deel.timetrackingshifts_updateshift_v2026_11_13. Catalog operation: timetrackingshifts_updateshift_v2026_11_13. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["time-tracking:write", "worker:write"]

Pinned headers: {"X-Version": "2026-11-13"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.