Deel: Retrieve a single User
Deel users.getUserById: arguments, response, policy and SDK examples.
← Users operations · Get started
Operation deel.users_getuserbyid
Provider route: GET /Users/{hris_profile_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["users"]["getUserById"]>[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.users.getUserById(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.users.get_user_by_id(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.hris_profile_id | string | Required within parent |
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 a single User — 200 response body |
Referenced models: Retrieve a single User — 200 response body
Schemas
Section titled “Schemas”9 more schemas are linked from the tables above, on the schema pages.
Retrieve a single User — 200 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
active | boolean | Optional | Default: false |
addresses | array | Optional | |
addresses[] | Model | Each item | Expand Retrieve a single User — 200 response body — addresses item |
emails | array | Required within parent | |
emails[] | Model | Each item | Expand Retrieve a single User — 200 response body — emails item |
id | string | Optional | |
meta | Model | Required within parent | Expand Retrieve a single User — 200 response body — meta |
name | Model | Required within parent | Expand Retrieve a single User — 200 response body — name |
phoneNumbers | array | Required within parent | |
phoneNumbers[] | Model | Each item | Expand Retrieve a single User — 200 response body — phone Numbers item |
schemas | array | Required within parent | |
schemas[] | string | Each item | Known values: urn:ietf:params:scim:schemas:core:2.0:User |
title | string | Optional | |
urn:ietf:params:scim:schemas:extension:2.0:User | Model | Optional | Expand Retrieve a single User — 200 response body — urn:ietf:params:scim:schemas:extension:2 0:User |
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User | Model | Optional | Expand Retrieve a single User — 200 response body — urn:ietf:params:scim:schemas:extension:enterprise:2 0:User |
userName | string | Required within parent | |
userType | string | Optional |
Referenced models: Retrieve a single User — 200 response body — emails item, Retrieve a single User — 200 response body — addresses item, Retrieve a single User — 200 response body — meta, Retrieve a single User — 200 response body — name, Retrieve a single User — 200 response body — phone Numbers item, Retrieve a single User — 200 response body — urn:ietf:params:scim:schemas:extension:2 0:User, Retrieve a single User — 200 response body — urn:ietf:params:scim:schemas:extension:enterprise:2 0:User
Retrieve a single User — 200 response body — emails item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
primary | boolean | Optional | Default: false |
type | string | Required within parent | Known values: home, work, other |
value | string | Required within parent |
Retrieve a single User — 200 response body — addresses item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
country | JSON | Optional | |
country (anyOf 1) | string | Alternative | Maximum length: 2 Minimum length: 2 Pattern: ^[A-Z]{2}$ |
country (anyOf 2) | null | Alternative | Maximum length: 2 Minimum length: 2 Pattern: ^[A-Z]{2}$ |
locality | string | Optional | |
postalCode | string | Optional | |
region | string | Optional | |
streetAddress | string | Optional | |
type | string | Optional |
Retrieve a single User — 200 response body — meta
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
created | string | Optional | Format: date-time |
lastModified | string | Optional | Format: date-time |
location | string | Optional | |
resourceType | string | Optional | Known values: User, Group |
Retrieve a single User — 200 response body — name
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
familyName | string | Required within parent | |
givenName | string | Required within parent |
Retrieve a single User — 200 response body — phone Numbers item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
primary | boolean | Required within parent | Default: false |
type | string | Required within parent | Known values: home, work, other |
value | string | Required within parent |
Retrieve a single User — 200 response body — urn:ietf:params:scim:schemas:extension:enterprise:2 0:User
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
costCenter | string | Optional | |
department | string | Optional | |
manager | Model | Optional | Expand Retrieve a single User — 200 response body — urn:ietf:params:scim:schemas:extension:enterprise:2 0:User manager |
organization | string | Optional |
Referenced models: Retrieve a single User — 200 response body — urn:ietf:params:scim:schemas:extension:enterprise:2 0:User manager
Retrieve a single User — 200 response body — urn:ietf:params:scim:schemas:extension:2 0:User custom Fields null item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
id | string | Optional | |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | |
name (anyOf 2) | null | Alternative | |
value | JSON | Optional | |
value (anyOf 1) | string | Alternative | |
value (anyOf 2) | null | Alternative |
Retrieve a single User — 200 response body — urn:ietf:params:scim:schemas:extension:2 0:User job Profile id, job Family, job Family Group, level, name, track
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Active job profile of the worker from job architecture. Present only when job profiles are enabled for the organization and job architecture is set up; null when the worker has no active job profile or the token lacks the job_profile.view permission. |
id | string | Optional | Job profile id. |
jobFamily | JSON | Optional | Job family of the job profile. |
jobFamily (anyOf 1) | Model | Alternative | Expand Retrieve a single User — 200 response body — urn:ietf:params:scim:schemas:extension:2 0:User job Profile id, job Family, job Family Group, level, name, track job Family Job family of the job profile |
jobFamily (anyOf 2) | null | Alternative | |
jobFamilyGroup | JSON | Optional | Job family group of the job family. |
jobFamilyGroup (anyOf 1) | Model | Alternative | Expand Retrieve a single User — 200 response body — urn:ietf:params:scim:schemas:extension:2 0:User job Profile id, job Family, job Family Group, level, name, track job Family Group Job family group of the job family |
jobFamilyGroup (anyOf 2) | null | Alternative | |
level | JSON | Optional | |
level (anyOf 1) | JSON | Alternative | |
level (anyOf 1) (anyOf 1) | integer | Alternative | Job profile level. |
level (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
level (anyOf 2) | null | Alternative | Job profile level. |
name | string | Optional | Job profile name. |
track | JSON | Optional | |
track (anyOf 1) | string | Alternative | Job profile track, as configured in job architecture (free text). |
track (anyOf 2) | null | Alternative | Job profile track, as configured in job architecture (free text). |
Referenced models: Retrieve a single User — 200 response body — urn:ietf:params:scim:schemas:extension:2 0:User job Profile id, job Family, job Family Group, level, name, track job Family Job family of the job profile, Retrieve a single User — 200 response body — urn:ietf:params:scim:schemas:extension:2 0:User job Profile id, job Family, job Family Group, level, name, track job Family Group Job family group of the job family
Retrieve a single User — 200 response body — urn:ietf:params:scim:schemas:extension:2 0:User custom Fields Flattened null value
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
name | string | Optional | |
value | JSON | Optional | |
value (anyOf 1) | string | Alternative | |
value (anyOf 2) | null | Alternative |
Retrieve a single User — 200 response body — urn:ietf:params:scim:schemas:extension:2 0:User end Date
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | string | Alternative | Format: date-time |
$ (anyOf 2) | string | Alternative | Known values: "" (empty string) |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.users_getuserbyid. Catalog operation: users_getuserbyid. 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: ["Users:read"]
Pinned headers: {"X-Version": "2026-01-01"}