Deel: Create an immigration case for a contract
Deel immigration.createCase: arguments, response, policy and SDK examples.
← Immigration operations · Get started
Operation deel.immigration_createcase_v2026_11_04
Provider route: POST /immigration/cases. 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["immigration"]["createCase"]>[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.immigration.createCase(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.immigration.create_case(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
headers | object | Required within parent | Additional keys: not allowed |
headers.X-Beta | string | Required within parent | Default: true One of: true |
body | object | Optional | |
body.data | Model | Required within parent | Expand Create an immigration case for a contract — request body — body data The case to open, chosen by work_type. |
Referenced models: Create an immigration case for a contract — 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 an immigration case for a contract — 201 response body |
Referenced models: Create an immigration case for a contract — 201 response body
Schemas
Section titled “Schemas”1 more schema is linked from the tables above, on the schema pages.
Create an immigration case for a contract — request body — body data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | The case to open, chosen by work_type. discriminator: {"propertyName": "work_type"} |
$ (oneOf 1) | object | Alternative | Opens an eligibility check for a work permit or a business visa. |
$ (oneOf 1).business_trip | Model | Optional | Expand Create an immigration case for a contract — request body — body / data / visa_category: BUSINESS VISA, WORK PERMIT VISA, work type: ELIGIBILITY CHECK business trip The trip to check. Required for BUSINESS_VISA, not allowed otherwise. |
$ (oneOf 1).contract_id | string | Required within parent | The contract of the worker the case is for. Maximum length: 50 Pattern: ^[A-Za-z0-9_-]+$ |
$ (oneOf 1).country | string | Required within parent | ISO 3166-1 alpha-2 code of the destination country. Maximum length: 2 |
$ (oneOf 1).visa_category | string | Required within parent | The visa category to check eligibility for. One of: BUSINESS_VISA, WORK_PERMIT_VISA |
$ (oneOf 1).work_type | string | Required within parent | Discriminator value: ELIGIBILITY_CHECK One of: ELIGIBILITY_CHECK |
$ (oneOf 2) | object | Alternative | Opens a right to work check with the worker's nationality from the contract. |
$ (oneOf 2).contract_id | string | Required within parent | The contract of the worker the case is for. Maximum length: 50 Pattern: ^[A-Za-z0-9_-]+$ |
$ (oneOf 2).country | string | Required within parent | ISO 3166-1 alpha-2 code of the destination country. Maximum length: 2 |
$ (oneOf 2).work_type | string | Required within parent | Discriminator value: RIGHT_TO_WORK One of: RIGHT_TO_WORK |
Referenced models: Create an immigration case for a contract — request body — body / data / visa_category: BUSINESS VISA, WORK PERMIT VISA, work type: ELIGIBILITY CHECK business trip
Create an immigration case for a contract — 201 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | Model | Required within parent | Expand Create an immigration case for a contract — 201 response body — data |
Referenced models: Create an immigration case for a contract — 201 response body — data
Create an immigration case for a contract — request body — body / data / visa_category: BUSINESS VISA, WORK PERMIT VISA, work type: ELIGIBILITY CHECK business trip
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The trip to check. Required for BUSINESS_VISA, not allowed otherwise. |
end_date | string | Required within parent | Last day of the trip, not before start_date. Format: date |
reason | string | Required within parent | Why the worker travels. Maximum length: 250 Minimum length: 1 |
start_date | string | Required within parent | First day of the trip, today or later. Format: date |
Create an immigration case for a contract — 201 response body — data case type
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The case type the case was opened with. |
id | string | Required within parent | The unique identifier. |
name | string | Required within parent | The display name. |
Create an immigration case for a contract — 201 response body — data visa type id, name
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The visa type of the case. Null while none is chosen. |
id | string | Required within parent | The unique identifier. |
name | string | Required within parent | The display name. |
Create an immigration case for a contract — 201 response body — data applicant The worker the case is for
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The worker the case is for. |
name | JSON | Required within parent | |
name (anyOf 1) | string | Alternative | Full name of the worker. |
name (anyOf 2) | null | Alternative | Full name of the worker. |
worker_id | string | Required within parent | The unique identifier of the worker. |
Create an immigration case for a contract — 201 response body — data business trip end date, reason, start date
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The business trip of a business visa case. Null for other cases. |
end_date | JSON | Required within parent | |
end_date (anyOf 1) | string | Alternative | Last day of the trip. Format: date |
end_date (anyOf 2) | null | Alternative | Last day of the trip. Format: date |
reason | JSON | Required within parent | |
reason (anyOf 1) | string | Alternative | Why the worker travels. |
reason (anyOf 2) | null | Alternative | Why the worker travels. |
start_date | JSON | Required within parent | |
start_date (anyOf 1) | string | Alternative | First day of the trip. Format: date |
start_date (anyOf 2) | null | Alternative | First day of the trip. Format: date |
Create an immigration case for a contract — 201 response body — data closure note, reason
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Why the case was closed. Null while the case is not closed. |
note | JSON | Required within parent | |
note (anyOf 1) | string | Alternative | Additional details about the closure. |
note (anyOf 2) | null | Alternative | Additional details about the closure. |
reason | JSON | Required within parent | |
reason (anyOf 1) | string | Alternative | Reason the case was closed or rejected. |
reason (anyOf 2) | null | Alternative | Reason the case was closed or rejected. |
Create an immigration case for a contract — 201 response body — data / visa_management_fee / fee_type: FULL IMMIGRATION MANAGEMENT FEE
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The monthly visa management fee that applies to the case after it is completed. Null when no fee applies to the case or it could not be determined. |
fee_type | string | Required within parent | The kind of visa management fee. Known values: FULL_IMMIGRATION_MANAGEMENT_FEE |
projected_amount | JSON | Required within parent | |
projected_amount (anyOf 1) | JSON | Alternative | |
projected_amount (anyOf 1) (anyOf 1) | number | Alternative | The projected monthly fee in USD from the organization pricing. Null when the case does not carry a monthly fee or the organization has no pricing for it. Format: double |
projected_amount (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
projected_amount (anyOf 2) | null | Alternative | The projected monthly fee in USD from the organization pricing. Null when the case does not carry a monthly fee or the organization has no pricing for it. Format: double |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.immigration_createcase_v2026_11_04. Catalog operation: immigration_createcase_v2026_11_04. 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: ["immigration:write"]
Pinned headers: {"X-Version": "2026-11-04"}