Deel: List of immigration cases for workers
Deel immigration.getWorkerCases: arguments, response, policy and SDK examples.
← Immigration operations · Get started
Operation deel.immigration_getworkercases
Provider route: GET /immigration/workers/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"]["getWorkerCases"]>[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.getWorkerCases(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_cases(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | Model | Optional | Expand List of immigration cases — request body — query |
Referenced models: List of immigration cases — request body — query
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 List of immigration cases for workers — 200 response body |
Referenced models: List of immigration cases for workers — 200 response body
Schemas
Section titled “Schemas”List of immigration cases for workers — 200 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Required within parent | List of cases in the current page. |
data[] | Model | Each item | Expand List of immigration cases for workers — 200 response body — data item |
has_more | boolean | Required within parent | Indicates whether more results are available for pagination. |
next_cursor | JSON | Optional | |
next_cursor (anyOf 1) | string | Alternative | Cursor value to be used for fetching the next page of results. |
next_cursor (anyOf 2) | null | Alternative | Cursor value to be used for fetching the next page of results. |
total_count | JSON | Required within parent | |
total_count (anyOf 1) | integer | Alternative | Total number of cases matching the search criteria. |
total_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: List of immigration cases for workers — 200 response body — data item
List of immigration cases — request body — query
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
search | string | Optional | Maximum length: 100 Minimum length: 3 |
case_type_ids | array | Optional | |
case_type_ids[] | string | Each item | Format: uuid |
statuses | array | Optional | |
statuses[] | string | Each item | One of: OPEN, ON_HOLD, CLOSED |
countries | array | Optional | |
countries[] | string | Each item | Maximum length: 2 Minimum length: 2 Pattern: ^[A-Z]{2}$ |
cursor | string | Optional | |
limit | integer | Optional | Default: 20 Maximum: 100 |
List of immigration cases for workers — 200 response body — data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
applicant | JSON | Required within parent | Applicant associated with the immigration case. |
applicant (anyOf 1) | Model | Alternative | Expand List of immigration cases — 200 response body — data item applicant Applicant associated with the immigration case |
applicant (anyOf 2) | null | Alternative | |
case_type | Model | Required within parent | Expand List of immigration cases — 200 response body — data item case type Type of immigration case. |
closure | JSON | Required within parent | Closure details of the case if the case has been closed. |
closure (anyOf 1) | Model | Alternative | Expand List of immigration cases for workers — 200 response body — data item closure note, reason |
closure (anyOf 2) | null | Alternative | |
created_at | string | Required within parent | Timestamp indicating when the case was created. Format: date-time |
id | string | Required within parent | Unique identifier of the immigration case. Format: uuid |
process | Model | Required within parent | Expand List of immigration cases — 200 response body — data item process Current active process associated with the case. |
status | string | Required within parent | Current lifecycle status of the immigration case. Known values: OPEN, CLOSED, ON_HOLD |
updated_at | string | Required within parent | Timestamp indicating when the case was last updated. Format: date-time |
Referenced models: List of immigration cases — 200 response body — data item case type, List of immigration cases — 200 response body — data item applicant Applicant associated with the immigration case, List of immigration cases — 200 response body — data item process, List of immigration cases for workers — 200 response body — data item closure note, reason
List of immigration cases — 200 response body — data item case type
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Type of immigration case. |
id | string | Required within parent | Unique identifier of the case type. Format: uuid |
name | string | Required within parent | Human-readable name of the case type. Maximum length: 255 |
List of immigration cases — 200 response body — data item applicant Applicant associated with the immigration case
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Applicant associated with the immigration case. |
id | JSON | Optional | |
id (anyOf 1) | string | Alternative | Unique identifier of the applicant. Format: uuid |
id (anyOf 2) | null | Alternative | Unique identifier of the applicant. Format: uuid |
name | string | Required within parent | Full name of the applicant. Maximum length: 255 |
List of immigration cases — 200 response body — data item process
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Current active process associated with the case. |
id | string | Required within parent | Unique identifier of the current process. Format: uuid |
name | string | Required within parent | Human-readable name of the current process step. Maximum length: 255 |
status | Model | Required within parent | Expand List of immigration cases — 200 response body — data item process status Current status of the process. |
Referenced models: List of immigration cases — 200 response body — data item process status
List of immigration cases for workers — 200 response body — data item closure note, reason
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Closure details of the case if the case has been closed. |
note | JSON | Required within parent | |
note (anyOf 1) | string | Alternative | Additional notes explaining the case closure. Maximum length: 400 |
note (anyOf 2) | null | Alternative | Additional notes explaining the case closure. Maximum length: 400 |
reason | JSON | Required within parent | Reason why the immigration case was closed. |
reason (anyOf 1) | string | Alternative | Reason why the immigration case was closed. Known values: CONTRACT_CANCELLED, NATIONALITY_CHANGE, NEW_CASE_TYPE_IS_REQUIRED, ONBOARDING_RELEASED, OTHER |
reason (anyOf 2) | null | Alternative |
List of immigration cases — 200 response body — data item process status
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Current status of the process. |
id | JSON | Required within parent | |
id (anyOf 1) | string | Alternative | Unique identifier of the process status. Format: uuid |
id (anyOf 2) | null | Alternative | Unique identifier of the process status. Format: uuid |
name | JSON | Required within parent | |
name (anyOf 1) | string | Alternative | Human-readable name of the process status. Maximum length: 255 |
name (anyOf 2) | null | Alternative | Human-readable name of the process status. Maximum length: 255 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.immigration_getworkercases. Catalog operation: immigration_getworkercases. 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"}