Deel: Create a timesheet entry
Deel timesheets.createTimesheet: arguments, response, policy and SDK examples.
← Timesheets operations · Get started
Operation deel.timesheets_createtimesheet
Provider route: POST /timesheets. 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["timesheets"]["createTimesheet"]>[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.timesheets.createTimesheet(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.timesheets.create_timesheet(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | object | Optional | |
body.data | Model | Required within parent | Expand Create a timesheet entry — request body — body data Payload attributes required to create one timesheet entry with optional approval, preset, and grouping metadata. |
Referenced models: Create a timesheet entry — 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 Create a timesheet entry — 201 response body |
Referenced models: Create a timesheet entry — 201 response body
Schemas
Section titled “Schemas”Create a timesheet entry — 201 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | Model | Required within parent | Expand Create a timesheet entry — 201 response body — data Container object with identifiers, status, and creation metadata for the newly created timesheet entry. |
Referenced models: Create a timesheet entry — 201 response body — data
Create a timesheet entry — request body — body data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Payload attributes required to create one timesheet entry with optional approval, preset, and grouping metadata. |
contract_id | string | Required within parent | Unique Deel contract identifier (public id) that receives this timesheet entry line item. |
date_submitted | string | Required within parent | Date the work was performed in ISO-8601 short-date format (YYYY-MM-DD) used for filtering and approvals. Format: date |
description | string | Required within parent | Detailed human-readable explanation of the work performed that appears on the invoice and audit records. Default: |
group_key | string or null | Optional | When provided, timesheets sharing the same group_key within the same payment cycle are merged into a single aggregated line item on the invoice. Requires is_auto_approved to be true. Maximum length: 300 |
hourly_report_preset_id | string or null | Optional | Identifier of an existing timesheet preset used to link a standardized hourly rate and label to this entry. |
is_auto_approved | boolean | Optional | When true, the created timesheet entry skips manual approval and is approved immediately on creation. |
quantity | number | Required within parent | Number of work units (typically hours) to record based on the scale defined in the associated contract work statement. Format: double Minimum: 0.01 |
Create a timesheet entry — 201 response body — data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Container object with identifiers, status, and creation metadata for the newly created timesheet entry. |
created | boolean | Required within parent | Flag indicating whether the timesheet entry record was successfully persisted by this request. |
created_at | JSON | Optional | |
created_at (anyOf 1) | string | Alternative | ISO-8601 timestamp recording the exact moment the timesheet entry was created in the system. Format: date-time |
created_at (anyOf 2) | null | Alternative | ISO-8601 timestamp recording the exact moment the timesheet entry was created in the system. Format: date-time |
id | string | Optional | Unique identifier returned for the created timesheet entry resource after persistence succeeds. Format: uuid |
status | JSON | Optional | Current processing status assigned to the timesheet entry after the create workflow finishes executing. |
status (anyOf 1) | string | Alternative | Current processing status assigned to the timesheet entry after the create workflow finishes executing. Known values: approved, declined, not_payable, paid, pending, processing |
status (anyOf 2) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.timesheets_createtimesheet. Catalog operation: timesheets/create. 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: ["timesheets:write"]
Pinned headers: {"X-Version": "2026-01-01"}