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.
Call through Alter
Section titled “Call through Alter”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 osfrom alter_sdk import Appfrom 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()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.shift_id | string | Required within parent | Format: uuid |
headers | object | Required within parent | Additional keys: not allowed |
headers.Idempotency-Key | string | Optional | Maximum length: 64 |
headers.X-Beta | string | Required within parent | Default: true One of: true |
body | object | Optional | |
body.data | Model | Required within parent | Expand 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
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Get a shift by ID — 201 response body |
Referenced models: Get a shift by ID — 201 response body
Schemas
Section titled “Schemas”1 more schema is linked from the tables above, on the schema pages.
Get a shift by ID — 201 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | Model | Required within parent | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Fields to change. Fields not sent keep their value; breaks and call_outs, when sent, replace the whole list. |
breaks | array | Optional | Breaks inside the shift, without overlaps. Not accepted on duration-only shifts. |
breaks[] | Model | Each item | Expand Create a shift for a contract — request body — body data breaks item |
call_outs | array | Optional | Call-outs inside an ON_CALL shift, without overlaps. Accepted only on ON_CALL shifts. |
call_outs[] | Model | Each item | Expand Get a shift by ID — 201 response body — data call outs item |
date | string | Optional | Shift day, the local date the shift belongs to. Required for duration-only and DAY_TRACKING shifts; taken from start when omitted otherwise. Format: date |
description | string or null | Optional | What the worker did. Required when the time tracking policy requires a work description. Maximum length: 30000 |
end | string or null | Optional | Shift 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_day | boolean | Optional | Whether a DAY_TRACKING shift counts as half a day. Accepted only on DAY_TRACKING shifts. |
is_meal_break_waived | boolean | Optional | Whether the worker waived the meal break. Accepted only when the time tracking policy allows waiving. |
project_id | string or null | Optional | Project the time was spent on. Must belong to the contract. Format: uuid |
start | string or null | Optional | Shift 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}$ |
status | string | Optional | Approval status to set. PENDING sends the shift to approval. APPROVED is accepted from organization tokens only; worker tokens get 403. One of: PENDING, APPROVED |
timezone | string or null | Optional | IANA 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 |
type | string | Optional | Kind 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_hours | number | Optional | Hours 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A shift recorded on a contract. |
break_hours | JSON | Required within parent | |
break_hours (anyOf 1) | number | Alternative | Hours spent on breaks. Format: double |
break_hours (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
breaks | array | Required within parent | Breaks inside the shift; empty when there are none. |
breaks[] | Model | Each item | Expand Get a shift by ID — 201 response body — data breaks item |
call_outs | array | Required within parent | Call-outs inside an ON_CALL shift; empty for other types. |
call_outs[] | Model | Each item | Expand Get a shift by ID — 201 response body — data call outs item |
contract_id | string | Required within parent | Deel contract the shift is recorded on. |
created_at | string | Required within parent | When the shift was created, in UTC. Format: date-time |
date | string | Required within parent | Shift day, the local date the shift belongs to. Format: date |
description | JSON | Required within parent | |
description (anyOf 1) | string | Alternative | What the worker did; null when none. |
description (anyOf 2) | null | Alternative | What the worker did; null when none. |
end | JSON | Required within parent | |
end (anyOf 1) | string | Alternative | Shift 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) | null | Alternative | Shift 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}$ |
id | string | Required within parent | Deel ID of the shift; the shift_id path parameter. Format: uuid |
is_half_day | boolean | Optional | Whether a DAY_TRACKING shift counts as half a day. Present only on DAY_TRACKING shifts. |
is_meal_break_waived | boolean | Required within parent | Whether the worker waived the meal break. |
origin | string | Required within parent | Channel 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_id | JSON | Required within parent | |
project_id (anyOf 1) | string | Alternative | Project the time was spent on; null when none. Format: uuid |
project_id (anyOf 2) | null | Alternative | Project the time was spent on; null when none. Format: uuid |
start | JSON | Required within parent | |
start (anyOf 1) | string | Alternative | Shift 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) | null | Alternative | Shift 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}$ |
status | string | Required within parent | Approval 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 |
timezone | JSON | Required within parent | |
timezone (anyOf 1) | string | Alternative | IANA 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) | null | Alternative | IANA 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_hours | JSON | Required within parent | |
total_hours (anyOf 1) | number | Alternative | Hours from start to end, breaks included. Format: double |
total_hours (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
type | string | Required within parent | Kind 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_at | string | Required within parent | When the shift last changed, in UTC. Format: date-time |
worked_hours | JSON | Required within parent | |
worked_hours (anyOf 1) | number | Alternative | Hours worked, total hours minus break hours. Format: double |
worked_hours (anyOf 2) | string | Alternative | Pattern: ^-?[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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A period inside an on-call shift when the worker was called out to work. |
end | string | Required within parent | Call-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}$ |
start | string | Required within parent | Call-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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A break taken inside the shift. |
end | string | Required within parent | Break 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}$ |
start | string | Required within parent | Break start, local time where the work happened (no UTC offset). Pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$ |
type | string | Required within parent | Kind 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 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”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"}