Deel: Add external Id
Deel contracts.updateIccontract: arguments, response, policy and SDK examples.
← Contracts operations · Get started
Operation deel.contracts_updateiccontract
Provider route: PATCH /contracts/{contract_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["contracts"]["updateIccontract"]>[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.contracts.updateIccontract(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.contracts.update_iccontract(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.contract_id | string | Required within parent | |
body | object | Optional | |
body.data | Model | Required within parent | Expand Add external Id — request body — body data |
Referenced models: Add external Id — 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 Add external Id — 200 response body |
Referenced models: Add external Id — 200 response body
Schemas
Section titled “Schemas”17 more schemas are linked from the tables above, on the schema pages.
Add external Id — request body — body data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
external_id | string or null | Required within parent | A unique identifier for the object provided by an external system. Use or send null when you want to reset the external id. |
Add external Id — 200 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
client | JSON | Required within parent | Client details associated with the contract. |
client (anyOf 1) | Model | Alternative | Expand Add external Id — 200 response body — client Client details associated with the contract |
client (anyOf 2) | null | Alternative | |
compensation_details | Model | Optional | Expand Add external Id — 200 response body — compensation details Compensation and payment configuration for the contract. |
contract_template | JSON | Optional | Contract template details. |
contract_template (anyOf 1) | Model | Alternative | Expand Add external Id — 200 response body — contract template Contract template details |
contract_template (anyOf 2) | null | Alternative | |
cost_centers | array | Optional | List of cost centers associated with the contract. |
cost_centers[] | Model | Each item | Expand Add external Id — 200 response body — cost centers item |
created_at | string | Required within parent | Date and time when the contract was created. Format: date-time |
custom_fields | JSON | Optional | |
custom_fields (anyOf 1) | array | Alternative | List of custom fields attached to the contract. |
custom_fields (anyOf 1)[] | Model | Each item | Expand Create a new contract — 201 response body — data custom fields item |
custom_fields (anyOf 2) | null | Alternative | List of custom fields attached to the contract. |
custom_fields (anyOf 2)[] | Model | Each item | Expand Create a new contract — 201 response body — data custom fields item |
employment_details | Model | Optional | Expand Add external Id — 200 response body — employment details Employment-related details for the contract. |
employment_type | JSON | Optional | Type of employment. |
employment_type (anyOf 1) | string | Alternative | Type of employment. Known values: FULL_TIME, PART_TIME |
employment_type (anyOf 2) | null | Alternative | |
external_id | JSON | Optional | |
external_id (anyOf 1) | string | Alternative | External identifier of the contract. |
external_id (anyOf 2) | null | Alternative | External identifier of the contract. |
id | string | Required within parent | Unique identifier for the contract. Minimum length: 1 |
invitations | Model | Required within parent | Expand Add external Id — 200 response body — invitations Invitation email addresses for signing the contract. |
is_archived | JSON | Required within parent | |
is_archived (anyOf 1) | boolean | Alternative | Flag to indicate if the contract is archived. |
is_archived (anyOf 2) | null | Alternative | Flag to indicate if the contract is archived. |
job_title | string | Optional | Job title associated with the contract. |
notice_period | JSON | Optional | |
notice_period (anyOf 1) | JSON | Alternative | |
notice_period (anyOf 1) (anyOf 1) | number | Alternative | Notice period in days. Format: double |
notice_period (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
notice_period (anyOf 2) | null | Alternative | Notice period in days. Format: double |
quote | Model | Optional | Expand Add external Id — 200 response body — quote EOR quote approved by Deel. |
scope_of_work | JSON | Optional | |
scope_of_work (anyOf 1) | string | Alternative | Scope of work of the contract. |
scope_of_work (anyOf 2) | null | Alternative | Scope of work of the contract. |
seniority | JSON | Optional | Seniority describes level of expertise at a job e.g. junior. |
seniority (anyOf 1) | Model | Alternative | Expand Add external Id — 200 response body — seniority id, level, name |
seniority (anyOf 2) | null | Alternative | |
signatures | Model | Required within parent | Expand Add external Id — 200 response body — signatures Signature information for the contract parties. |
special_clause | JSON | Required within parent | |
special_clause (anyOf 1) | string | Alternative | Special clause of the contract. |
special_clause (anyOf 2) | null | Alternative | Special clause of the contract. |
start_date | string | Required within parent | Date and time when the contract starts. Format: date-time |
status | Model | Required within parent | Expand Add external Id — 200 response body — status Status of a contract in Deel workflow. |
termination_date | JSON | Required within parent | |
termination_date (anyOf 1) | string | Alternative | Date and time when the contract ends. |
termination_date (anyOf 2) | null | Alternative | Date and time when the contract ends. |
title | string | Required within parent | Title of the contract. Minimum length: 1 |
type | string | Required within parent | Type of a contract. Known values: ongoing_time_based, milestones, time_based, pay_as_you_go_time_based, commission, payg_milestones, payg_tasks, contractor_outside_deel, eor, unknown, employee, global_payroll, shield_msa, hris_direct_employee, peo |
updated_at | string | Required within parent | Date and time when the contract was updated. Format: date-time |
who_reports | string | Optional | Who reports the hours. |
work_schedule | JSON | Optional | Defines a work schedule including working days, hours, and employment details |
work_schedule (anyOf 1) | Model | Alternative | Expand Add external Id — 200 response body — work schedule country, days, employment type, name, work hours per week, work schedule type, worker types |
work_schedule (anyOf 2) | null | Alternative | |
work_statement_id | JSON | Optional | |
work_statement_id (anyOf 1) | string | Alternative | The unique identifier of the associated work statement. |
work_statement_id (anyOf 2) | null | Alternative | The unique identifier of the associated work statement. |
worker | JSON | Required within parent | Worker details associated with the contract. |
worker (anyOf 1) | Model | Alternative | Expand Add external Id — 200 response body — worker Worker details associated with the contract |
worker (anyOf 2) | null | Alternative |
Referenced models: Add external Id — 200 response body — contract template Contract template details, Create a new contract — 201 response body — data custom fields item, Add external Id — 200 response body — compensation details, Add external Id — 200 response body — cost centers item, Add external Id — 200 response body — invitations, Add external Id — 200 response body — quote, Add external Id — 200 response body — seniority id, level, name, Add external Id — 200 response body — signatures, Add external Id — 200 response body — status, Add external Id — 200 response body — client Client details associated with the contract, Add external Id — 200 response body — employment details, Add external Id — 200 response body — work schedule country, days, employment type, name, work hours per week, work schedule type, worker types, Add external Id — 200 response body — worker Worker details associated with the contract
Add external Id — 200 response body — contract template Contract template details
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Contract template details. |
id | string | Optional | Unique identifier of a contract template. |
title | string | Optional | Title of a contract template |
Create a new contract — 201 response body — data custom fields item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Customized attributes on contracts (Employee ID, Project code, etc). |
name | string | Optional | Custom field property name. |
value | string | Optional | Custom field property value. |
Add external Id — 200 response body — cost centers item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
allocation_percentage | JSON | Optional | |
allocation_percentage (anyOf 1) | number | Alternative | Percentage of the cost center allocation. Format: double |
allocation_percentage (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
name | string | Optional | Cost center name. |
number | string | Optional | Cost center number. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.contracts_updateiccontract. Catalog operation: contracts_updateiccontract. 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: ["contracts:write"]
Pinned headers: {"X-Version": "2026-01-01"}