Skip to content

Deel: Create raw time tracking shifts

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

← Time tracking shifts operations · Get started

Operation deel.timetrackingshifts_createtimetrackingshiftsraw

Provider route: POST /v2/time_tracking/shifts/raw. 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"]["createTimeTrackingShiftsRaw"]>[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.createTimeTrackingShiftsRaw(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.create_time_tracking_shifts_raw(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyobjectOptional
body.dataModelRequired within parentExpand Create raw time tracking shifts — request body — body data

Referenced models: Create raw time tracking shifts — 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 Create raw time tracking shifts — 201 response body

Referenced models: Create raw time tracking shifts — 201 response body

9 more schemas are linked from the tables above, on the schema pages.

Create raw time tracking shifts — 201 response body
FieldTypePresenceDescription and constraints
$objectRoot
dataarrayRequired within parent
data[]ModelEach itemExpand Create raw time tracking shifts — 201 response body — data item

Referenced models: Create raw time tracking shifts — 201 response body — data item

Create raw time tracking shifts — request body — body data
FieldTypePresenceDescription and constraints
$objectRoot
contract_idstringRequired within parentThe unique identifier of the employee contract.
shiftsarrayRequired within parent
shifts[]ModelEach itemExpand Create raw time tracking shifts — request body — body data shifts item

Referenced models: Create raw time tracking shifts — request body — body data shifts item

Create raw time tracking shifts — 201 response body — data item
FieldTypePresenceDescription and constraints
$objectRoot
contract_idstringRequired within parentAssociated contract ID for the shift
created_atstringRequired within parentDate when the shift was created
Format: date-time
date_of_workstringRequired within parentDate when the shift takes place, in YYYY-MM-DD format
descriptionstringRequired within parentDescription of the shift
external_idstringRequired within parentID specified by the client for uniquely identifying the shift
metaModelOptionalExpand Update a shift — 200 response body — data meta
payroll_cycle_refModelOptionalExpand Update a shift — 200 response body — data payroll cycle ref
Payroll cycle reference
shift_reference_idstringOptionalExternal ID of the original shift this one references (set on correction shifts).
Maximum length: 48
Minimum length: 8
shift_typestringRequired within parentType of the shift
Known values: REGULAR
summaryModelOptionalExpand Create raw time tracking shifts — 201 response body — data item summary
updated_atstringRequired within parentDate 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, Create raw time tracking shifts — 201 response body — data item summary

Create raw time tracking shifts — request body — body data shifts item
FieldTypePresenceDescription and constraints
$objectRoot
date_of_workstringRequired within parentDate of the shift, in YYYY-MM-DD format.
Pattern: ^\d{4}-\d{2}-\d{2}$
descriptionstringRequired within parentDescription of the shift.
Maximum length: 30000
Minimum length: 1
external_idstringRequired within parentID specified by the client for uniquely identifying the shift.
Maximum length: 48
Minimum length: 8
metaModelRequired within parentExpand Create raw time tracking shifts — request body — body data shifts item meta
payroll_cycle_refModelOptionalExpand Update a shift — 200 response body — data payroll cycle ref
Payroll cycle reference

Referenced models: Update a shift — 200 response body — data payroll cycle ref, Create raw time tracking shifts — request body — body data shifts item meta

Update a shift — 200 response body — data meta
FieldTypePresenceDescription and constraints
$objectRoot
approval_datestringOptionalApproval date for the shift, in ISO format
breaksarrayOptional
breaks[]ModelEach itemExpand Update a shift — 200 response body — data meta breaks item
endModelRequired within parentExpand Update a shift — 200 response body — data meta end
startModelRequired within parentExpand 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
FieldTypePresenceDescription and constraints
$objectRootPayroll cycle reference
datestringRequired within parentdate in ISO
Format: date-time
Create raw time tracking shifts — 201 response body — data item summary
FieldTypePresenceDescription and constraints
$objectRoot
payable_break_hoursJSONOptional
payable_break_hours (anyOf 1)numberAlternativeBreak hours that are payable
Format: double
payable_break_hours (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
shift_duration_hoursJSONOptional
shift_duration_hours (anyOf 1)numberAlternativeTotal duration of the shift in hours
Format: double
shift_duration_hours (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
shift_rate_external_idstringRequired within parentExternal ID of the shift rate associated with this shift
time_amountJSONOptional
time_amount (anyOf 1)numberAlternativeThe amount of time for the shift
Greater than: 0
Format: double
time_amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
time_unitstringOptionalThe unit of time for the shift (DAY, HOUR, MONTH, WEEK)
Known values: DAY, HOUR, MONTH, WEEK
total_break_hoursJSONOptional
total_break_hours (anyOf 1)numberAlternativeTotal break duration in hours
Format: double
total_break_hours (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
total_payable_hoursJSONOptional
total_payable_hours (anyOf 1)numberAlternativeTotal payable working hours after break deductions
Format: double
total_payable_hours (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
Create raw time tracking shifts — request body — body data shifts item meta
FieldTypePresenceDescription and constraints
$objectRoot
approval_datestringOptionalApproval date for the shift
Pattern: ^\d{4}-\d{2}-\d{2}$
breaksarrayOptional
breaks[]ModelEach itemExpand Create raw time tracking shifts — request body — body data shifts item meta breaks item
endModelRequired within parentExpand Create raw time tracking shifts — request body — body data shifts item meta end
Shift end date and time
startModelRequired within parentExpand Create raw time tracking shifts — request body — body data shifts item meta start
Shift start date and time

Referenced models: Create raw time tracking shifts — request body — body data shifts item meta breaks item, Create raw time tracking shifts — request body — body data shifts item meta end, Create raw time tracking shifts — request body — body data shifts item meta start

Update a shift — 200 response body — data meta breaks item
FieldTypePresenceDescription and constraints
$objectRoot
endModelRequired within parentExpand Update a shift — 200 response body — data meta breaks item end
is_paidbooleanOptionalIndicates if the break is paid
startModelRequired within parentExpand 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

SDK function policy ID: deel.timetrackingshifts_createtimetrackingshiftsraw. Catalog operation: timetrackingshifts_createtimetrackingshiftsraw. 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"]

Pinned headers: {"X-Version": "2026-01-01"}

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 which product and documentation features are useful.

Performance diagnostics

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

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