Skip to content

Ramp: Fetch a user

Ramp user.getUserResource: arguments, response, policy and SDK examples.

← User operations · Get started

Operation ramp.get_user_resource

Provider route: GET /developer/v1/users/{user_id}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/ramp with npm, or alter-sdk-ramp with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { RampIntegration } from "@alter-ai/ramp";
async function execute(input: Parameters<RampIntegration["user"]["getUserResource"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new RampIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.user.getUserResource(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_ramp import RampIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = RampIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.user.get_user_resource(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.user_idstringRequired within parentFormat: uuid

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Fetch a user — response body

Referenced models: Fetch a user — response body

Fetch a user — response body
FieldTypePresenceDescription and constraints
$objectRoot
business_idJSONRequired within parent
business_id (anyOf 1)stringAlternativeUnique identifier of the company that the employee's working for.
Format: uuid
business_id (anyOf 2)nullAlternative
custom_fieldsarrayRequired within parentA list of custom fields of the user.
Read only: true
custom_fields[]ModelEach itemExpand Fetch a user — response body — custom fields item
department_idJSONRequired within parent
department_id (anyOf 1)stringAlternativeUnique identifier of the employee's department
Format: uuid
department_id (anyOf 2)nullAlternative
emailstringOptionalThe employee's email address
employee_idJSONRequired within parent
employee_id (anyOf 1)stringAlternativeAn alternative identifier for an employee, coming from external systems, which can be used in place of an email.
employee_id (anyOf 2)nullAlternative
entity_idJSONRequired within parent
entity_id (anyOf 1)stringAlternativeUnique identifier of business entity user is associated with.
Format: uuid
entity_id (anyOf 2)nullAlternative
first_namestringOptionalFirst name of the employee
idstringOptionalUnique employee identifier
Format: uuid
is_managerbooleanRequired within parentWhether the employee is a manager
Read only: true
last_namestringOptionalLast name of the employee
location_idJSONRequired within parent
location_id (anyOf 1)stringAlternativeUnique identifier of the employee's location
Format: uuid
location_id (anyOf 2)nullAlternative
manager_idJSONRequired within parent
manager_id (anyOf 1)stringAlternativeUnique identifier of the employee's manager
Format: uuid
manager_id (anyOf 2)nullAlternative
phoneJSONRequired within parent
phone (anyOf 1)stringAlternativeThe employee's phone number
Read only: true
phone (anyOf 2)nullAlternative
rolestringOptionalThe employee's role
Known values: AUDITOR, BUSINESS_ADMIN, BUSINESS_BOOKKEEPER, BUSINESS_OWNER, BUSINESS_USER, GUEST_USER, IT_ADMIN, UNBUNDLED_ADMIN, UNBUNDLED_BOOKKEEPER, UNBUNDLED_OWNER, UNBUNDLED_USER
scheduled_deactivation_dateJSONRequired within parent
scheduled_deactivation_date (anyOf 1)stringAlternativeThe date when the user is scheduled to be deactivated. Presented in ISO8601 format.
Format: date-time
scheduled_deactivation_date (anyOf 2)nullAlternative
scheduled_invitation_dateJSONRequired within parent
scheduled_invitation_date (anyOf 1)stringAlternativeThe date when the user (currently in USER_DRAFT status) is scheduled to be invited to Ramp. Presented in ISO8601 format. Null if no invitation is scheduled.
Format: date-time
scheduled_invitation_date (anyOf 2)nullAlternative
statusstringRequired within parentKnown values: INVITE_EXPIRED, INVITE_PENDING, USER_ACTIVE, USER_DRAFT, USER_INACTIVE, USER_ONBOARDING, USER_SUSPENDED
Read only: true

Referenced models: Fetch a user — response body — custom fields item

Fetch a user — response body — custom fields item
FieldTypePresenceDescription and constraints
$objectRoot
namestringRequired within parentName of the custom field
valuestringRequired within parentValue of the custom field

SDK function policy ID: ramp.get_user_resource. Catalog operation: get_user_resource. 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"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.