Deel: Get Shift details
Deel timeTrackingShifts.getTimeTrackingShiftByExternalId: arguments, response, policy and SDK examples.
← Time tracking shifts operations · Get started
Operation deel.timetrackingshifts_gettimetrackingshiftbyexternalid
Provider route: GET /time_tracking/shifts/{external_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"]["getTimeTrackingShiftByExternalId"]>[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.getTimeTrackingShiftByExternalId(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_time_tracking_shift_by_external_id(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.external_id | string | Required within parent |
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 Update a shift — 200 response body |
Referenced models: Update a shift — 200 response body
Schemas
Section titled “Schemas”Update a shift — 200 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Shift response wrapper |
data | Model | Required within parent | Expand Update a shift — 200 response body — data |
Referenced models: Update a shift — 200 response body — data
Update a shift — 200 response body — data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
contract_id | string | Required within parent | Associated contract ID for the shift |
created_at | string | Required within parent | Date when the shift was created Format: date-time |
date_of_work | string | Required within parent | Date when the shift takes place, in YYYY-MM-DD format |
description | string | Required within parent | Description of the shift |
external_id | string | Required within parent | ID specified by the client for uniquely identifying the shift |
meta | Model | Optional | Expand Update a shift — 200 response body — data meta |
payroll_cycle_ref | Model | Optional | Expand Update a shift — 200 response body — data payroll cycle ref Payroll cycle reference |
shift_reference_id | string | Optional | External ID of the original shift this one references (set on correction shifts). Maximum length: 48 Minimum length: 8 |
shift_type | string | Required within parent | Type of the shift Known values: REGULAR, CORRECTION_ABSOLUTE, CORRECTION_DELTA, TIME_OFF_QUALIFYING |
summary | Model | Optional | Expand Update a shift — 200 response body — data summary |
updated_at | string | Required within parent | Date when the shift was last updated Format: date-time |
Referenced models: Update a shift — 200 response body — data meta, Update a shift — 200 response body — data payroll cycle ref, Update a shift — 200 response body — data summary
Update a shift — 200 response body — data meta
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
approval_date | string | Optional | Approval date for the shift, in ISO format |
breaks | array | Optional | |
breaks[] | Model | Each item | Expand Update a shift — 200 response body — data meta breaks item |
end | Model | Required within parent | Expand Update a shift — 200 response body — data meta end |
start | Model | Required within parent | Expand Update a shift — 200 response body — data meta start |
Referenced models: Update a shift — 200 response body — data meta breaks item, Update a shift — 200 response body — data meta end, Update a shift — 200 response body — data meta start
Update a shift — 200 response body — data payroll cycle ref
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Payroll cycle reference |
date | string | Required within parent | date in ISO Format: date-time |
Update a shift — 200 response body — data summary
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
payable_break_hours | JSON | Optional | |
payable_break_hours (anyOf 1) | number | Alternative | Break hours that are payable Format: double |
payable_break_hours (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
shift_duration_hours | JSON | Optional | |
shift_duration_hours (anyOf 1) | number | Alternative | Total duration of the shift in hours Format: double |
shift_duration_hours (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
shift_rate_external_id | string | Required within parent | External ID of the shift rate associated with this shift |
time_amount | JSON | Optional | |
time_amount (anyOf 1) | number | Alternative | The amount of time for the shift Format: double Minimum: 0 |
time_amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
time_unit | string | Optional | The unit of time for the shift (DAY, HOUR, MONTH, WEEK) Known values: DAY, HOUR, MONTH, WEEK |
total_break_hours | JSON | Optional | |
total_break_hours (anyOf 1) | number | Alternative | Total break duration in hours Format: double |
total_break_hours (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
total_payable_hours | JSON | Optional | |
total_payable_hours (anyOf 1) | number | Alternative | Total payable working hours after break deductions Format: double |
total_payable_hours (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Update a shift — 200 response body — data meta breaks item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
end | Model | Required within parent | Expand Update a shift — 200 response body — data meta breaks item end |
is_paid | boolean | Optional | Indicates if the break is paid |
start | Model | Required within parent | Expand Update a shift — 200 response body — data meta breaks item start |
Referenced models: Update a shift — 200 response body — data meta breaks item end, Update a shift — 200 response body — data meta breaks item start
Update a shift — 200 response body — data meta end
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
date | string | Required within parent | Shift end date |
is_public_holiday | boolean | Required within parent | Indicates if it is a public holiday |
is_rest_day | boolean | Required within parent | Indicates if it is a rest day |
time | string | Required within parent | Shift end time in HH:mm format |
Update a shift — 200 response body — data meta start
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
date | string | Required within parent | Shift start date |
is_public_holiday | boolean | Required within parent | Indicates if it is a public holiday |
is_rest_day | boolean | Required within parent | Indicates if it is a rest day |
time | string | Required within parent | Shift start time in HH:mm format |
Update a shift — 200 response body — data meta breaks item end
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
date | string | Required within parent | Break end date |
time | string | Required within parent | Break end time in HH:mm format |
Update a shift — 200 response body — data meta breaks item start
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
date | string | Required within parent | Break start date |
time | string | Required within parent | Break start time in HH:mm format |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.timetrackingshifts_gettimetrackingshiftbyexternalid. Catalog operation: timetrackingshifts_gettimetrackingshiftbyexternalid. 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"]
Pinned headers: {"X-Version": "2026-01-01"}