Deel: List of legal entities
Deel legalEntities.getLegalEntities: arguments, response, policy and SDK examples.
← Legal entities operations · Get started
Operation deel.legalentities_getlegalentities
Provider route: GET /legal-entities. 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["legalEntities"]["getLegalEntities"]>[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.legalEntities.getLegalEntities(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.legal_entities.get_legal_entities(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.limit | integer | Optional | Default: 100 Maximum: 100 Minimum: 1 |
query.sort_order | string | Optional | Default: ASC One of: ASC, DESC |
query.cursor | string | Optional | |
query.include_archived | boolean | Optional | Default: true |
query.legal_entity_id | string | Optional | |
query.global_payroll | boolean | Optional | |
query.type | string | Optional | |
query.country | string | Optional | |
query.include_payroll_settings | boolean | 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 List of legal entities — 200 response body |
Referenced models: List of legal entities — 200 response body
Schemas
Section titled “Schemas”List of legal entities — 200 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Optional | |
data[] | Model | Each item | Expand List of legal entities — 200 response body — data item |
page | Model | Optional | Expand List of legal entities — 200 response body — page |
Referenced models: List of legal entities — 200 response body — data item, List of legal entities — 200 response body — page
List of legal entities — 200 response body — data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
address | JSON | Optional | |
address (anyOf 1) | Model | Alternative | Expand List of legal entities — 200 response body — data item address city, country, state, street, zip |
address (anyOf 2) | null | Alternative | |
archived_at | JSON | Optional | |
archived_at (anyOf 1) | string | Alternative | Archived date Format: date-time |
archived_at (anyOf 2) | null | Alternative | Archived date Format: date-time |
country | JSON | Optional | |
country (anyOf 1) | string | Alternative | Country of the legal entity |
country (anyOf 2) | null | Alternative | Country of the legal entity |
created_at | string | Optional | Created date Format: date-time |
entity_subtype | string | Optional | Entity sub type |
entity_type | JSON | Optional | Entity type |
entity_type (anyOf 1) | string | Alternative | Entity type Known values: individual, company, light |
entity_type (anyOf 2) | null | Alternative | |
id | string | Optional | Id of the legal entity |
industry_name | JSON | Optional | |
industry_name (anyOf 1) | string | Alternative | Industry name |
industry_name (anyOf 2) | null | Alternative | Industry name |
name | string | Optional | Name of the legal entity |
phone | JSON | Optional | |
phone (anyOf 1) | string | Alternative | Phone number |
phone (anyOf 2) | null | Alternative | Phone number |
registrationNumber | JSON | Optional | |
registrationNumber (anyOf 1) | string | Alternative | Registration number |
registrationNumber (anyOf 2) | null | Alternative | Registration number |
sic_number | JSON | Optional | |
sic_number (anyOf 1) | string | Alternative | SIC Company Identifier |
sic_number (anyOf 2) | null | Alternative | SIC Company Identifier |
status | string | Optional | The mapped legal entity lifecycle status, the same value as on the single legal entity endpoint. Returned only when the feature is enabled for the organization. Known values: archived, active, draft, processing, processing_draft, pending_verification, awaiting_review, unknown |
updated_at | string | Optional | Updated date Format: date-time |
vat_id | JSON | Optional | |
vat_id (anyOf 1) | string | Alternative | VAT ID |
vat_id (anyOf 2) | null | Alternative | VAT ID |
Referenced models: List of legal entities — 200 response body — data item address city, country, state, street, zip
List of legal entities — 200 response body — page
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
cursor | JSON | Optional | |
cursor (anyOf 1) | string | Alternative | Cursor link |
cursor (anyOf 2) | null | Alternative | Cursor link |
List of legal entities — 200 response body — data item address city, country, state, street, zip
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
city | JSON | Optional | |
city (anyOf 1) | string | Alternative | City |
city (anyOf 2) | null | Alternative | City |
country | JSON | Optional | |
country (anyOf 1) | string | Alternative | Country |
country (anyOf 2) | null | Alternative | Country |
state | JSON | Optional | |
state (anyOf 1) | string | Alternative | State |
state (anyOf 2) | null | Alternative | State |
street | JSON | Optional | |
street (anyOf 1) | string | Alternative | Street |
street (anyOf 2) | null | Alternative | Street |
zip | JSON | Optional | |
zip (anyOf 1) | string | Alternative | Zip code |
zip (anyOf 2) | null | Alternative | Zip code |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.legalentities_getlegalentities. Catalog operation: legalentities_getlegalentities. 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: ["organizations:read", "accounting:read"]
Pinned headers: {"X-Version": "2026-01-01"}