Deel: Get a shift by ID
Deel timeTrackingShifts.getShift: arguments, response, policy and SDK examples.
← Time tracking shifts operations · Get started
Operation deel.timetrackingshifts_getshift_v2026_11_13
Provider route: GET /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"]["getShift"]>[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.getShift(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.get_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.X-Beta | string | Required within parent | Default: true One of: true |
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”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
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 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. Known values: BREAK, MEAL_BREAK, REST_BREAK, LACTATION_BREAK |
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}$ |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.timetrackingshifts_getshift_v2026_11_13. Catalog operation: timetrackingshifts_getshift_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:read", "worker:read"]
Pinned headers: {"X-Version": "2026-11-13"}