Deel: Retrieve the legacy onboarding right-to-work case for a worker
Deel immigration.getWorkerOnboardingCase: arguments, response, policy and SDK examples.
← Immigration operations · Get started
Operation deel.immigration_getworkeronboardingcase
Provider route: GET /immigration/workers/{worker_id}/onboarding-case. 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"]["getWorkerOnboardingCase"]>[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.getWorkerOnboardingCase(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.get_worker_onboarding_case(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.worker_id | string | Required within parent | |
query | object | Optional | Additional keys: not allowed |
query.contract_id | string | Optional |
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 Retrieve the legacy onboarding right-to-work case for a worker — 200 response body |
Referenced models: Retrieve the legacy onboarding right-to-work case for a worker — 200 response body
Schemas
Section titled “Schemas”Retrieve the legacy onboarding right-to-work case for a worker — 200 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | Model | Optional | Expand Retrieve the legacy onboarding right-to-work case for a worker — 200 response body — data |
Referenced models: Retrieve the legacy onboarding right-to-work case for a worker — 200 response body — data
Retrieve the legacy onboarding right-to-work case for a worker — 200 response body — data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
applicant | JSON | Optional | The employee for which this Right to Work case has been created for |
applicant (anyOf 1) | Model | Alternative | Expand Get specific immigration case details — 200 response body — data applicant external id, id |
applicant (anyOf 2) | null | Alternative | |
case_type | string | Optional | Type of the case. It will always be IMMIGRATION_DOCUMENT_REVIEW for this endpoint. Known values: IMMIGRATION_DOCUMENT_REVIEW |
contract | Model | Optional | Expand Get specific immigration case details — 200 response body — data contract The contract associated with the returned immigration case |
country_code | string | Optional | The country of the immigration case. |
created_at | string | Optional | Creation date of the immigration case. Format: date-time |
documents | array | Optional | A list of documents associated to the immigration case |
documents[] | Model | Each item | Expand Retrieve the legacy onboarding right-to-work case for a worker — 200 response body — data documents item |
estimated_completion_date | JSON | Optional | |
estimated_completion_date (anyOf 1) | string | Alternative | Estimated completion date of the immigration case. Format: date-time |
estimated_completion_date (anyOf 2) | null | Alternative | Estimated completion date of the immigration case. Format: date-time |
id | string | Optional | Unique identifier of immigration case. |
process | Model | Optional | Expand Retrieve the legacy onboarding right-to-work case for a worker — 200 response body — data process The current active process |
status | string | Optional | Status of the immigration case. Known values: OPEN, CLOSED, ON_HOLD |
updated_at | string | Optional | Last activity on the immigration case. Format: date-time |
visa_type | JSON | Optional | |
visa_type (anyOf 1) | string | Alternative | The type of the visa. |
visa_type (anyOf 2) | null | Alternative | The type of the visa. |
Referenced models: Get specific immigration case details — 200 response body — data applicant external id, id, Get specific immigration case details — 200 response body — data contract, Retrieve the legacy onboarding right-to-work case for a worker — 200 response body — data documents item, Retrieve the legacy onboarding right-to-work case for a worker — 200 response body — data process
Get specific immigration case details — 200 response body — data applicant external id, id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The employee for which this Right to Work case has been created for |
external_id | JSON | Optional | |
external_id (anyOf 1) | string | Alternative | External identifier of the applicant (from partner system or third party). |
external_id (anyOf 2) | null | Alternative | External identifier of the applicant (from partner system or third party). |
id | string | Optional | Unique identifier of the applicant profile id. |
Get specific immigration case details — 200 response body — data contract
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The contract associated with the returned immigration case |
id | JSON | Optional | |
id (anyOf 1) | string | Alternative | Id of the contract associated with the immigration case |
id (anyOf 2) | null | Alternative | Id of the contract associated with the immigration case |
Retrieve the legacy onboarding right-to-work case for a worker — 200 response body — data documents item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
document_type | JSON | Optional | |
document_type (anyOf 1) | string | Alternative | The type of the document. Represents the visa type for right to work cases. |
document_type (anyOf 2) | null | Alternative | The type of the document. Represents the visa type for right to work cases. |
expiration_date | JSON | Optional | |
expiration_date (anyOf 1) | string | Alternative | Expiry date of the document. If document does not expire, it will be null Format: date-time |
expiration_date (anyOf 2) | null | Alternative | Expiry date of the document. If document does not expire, it will be null Format: date-time |
id | string | Optional | Unique identifier of the document. |
status | string | Optional | Status of the document. Known values: IN_REVIEW, ACTIVE, EXPIRED, EXPIRING |
Retrieve the legacy onboarding right-to-work case for a worker — 200 response body — data process
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The current active process |
id | string | Optional | Unique identifier of the current active process. |
name | string | Optional | Name of the current active process. Known values: WORK_AUTHORIZATION_VERIFICATION |
rejection_note | string | Optional | A detailed description of why the case was rejected. Only available if the case status is REJECTED. |
rejection_reason | string | Optional | The reason why the case was rejected. Only available if the case status is REJECTED. |
status | string | Optional | Status of the current active process. Known values: CANCELLED, AWAITING_DOCUMENTS, IN_REVIEW, APPROVED, REJECTED |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.immigration_getworkeronboardingcase. Catalog operation: immigration_getworkeronboardingcase. 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: ["worker:read"]
Pinned headers: {"X-Version": "2026-01-01"}