Ramp: List users
Ramp user.getUserListWithPagination: arguments, response, policy and SDK examples.
← User operations · Get started
Operation ramp.get_user_list_with_pagination
Provider route: GET /developer/v1/users. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”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"]["getUserListWithPagination"]>[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.getUserListWithPagination(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom 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_list_with_pagination(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.employee_id | string | Optional | |
query.role | string | Optional | One of: AUDITOR, BUSINESS_ADMIN, BUSINESS_BOOKKEEPER, BUSINESS_OWNER, BUSINESS_USER, GUEST_USER, IT_ADMIN |
query.status | JSON | Optional | |
query.status (anyOf 1) | string | Alternative | Default: null One of: USER_ACTIVE, USER_DRAFT, USER_INACTIVE, USER_SUSPENDED |
query.status (anyOf 2) | null | Alternative | |
query.start | string | Optional | |
query.page_size | integer | Optional | Default: 20 |
query.entity_id | string | Optional | Format: uuid |
query.department_id | string | Optional | Format: uuid |
query.email | string | Optional | Format: email |
query.location_id | string | Optional | Format: uuid |
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 users — response body |
Referenced models: List users — response body
Schemas
Section titled “Schemas”List users — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Required within parent | Resources returned in this page. |
data[] | Model | Each item | Expand Fetch a user — response body |
page | Model | Required within parent | Expand List bills — response body — page Pagination details for this response. |
Referenced models: List bills — response body — page, Fetch a user — response body
List bills — response body — page
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Pagination details for a Developer API response. |
next | JSON | Required within parent | |
next (anyOf 1) | string | Alternative | the query to get to the next page; it is in the format of <BASE_URL>?<new_params> |
next (anyOf 2) | null | Alternative |
Fetch a user — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
business_id | JSON | Required within parent | |
business_id (anyOf 1) | string | Alternative | Unique identifier of the company that the employee's working for. Format: uuid |
business_id (anyOf 2) | null | Alternative | |
custom_fields | array | Required within parent | A list of custom fields of the user. Read only: true |
custom_fields[] | Model | Each item | Expand Fetch a user — response body — custom fields item |
department_id | JSON | Required within parent | |
department_id (anyOf 1) | string | Alternative | Unique identifier of the employee's department Format: uuid |
department_id (anyOf 2) | null | Alternative | |
email | string | Optional | The employee's email address |
employee_id | JSON | Required within parent | |
employee_id (anyOf 1) | string | Alternative | An alternative identifier for an employee, coming from external systems, which can be used in place of an email. |
employee_id (anyOf 2) | null | Alternative | |
entity_id | JSON | Required within parent | |
entity_id (anyOf 1) | string | Alternative | Unique identifier of business entity user is associated with. Format: uuid |
entity_id (anyOf 2) | null | Alternative | |
first_name | string | Optional | First name of the employee |
id | string | Optional | Unique employee identifier Format: uuid |
is_manager | boolean | Required within parent | Whether the employee is a manager Read only: true |
last_name | string | Optional | Last name of the employee |
location_id | JSON | Required within parent | |
location_id (anyOf 1) | string | Alternative | Unique identifier of the employee's location Format: uuid |
location_id (anyOf 2) | null | Alternative | |
manager_id | JSON | Required within parent | |
manager_id (anyOf 1) | string | Alternative | Unique identifier of the employee's manager Format: uuid |
manager_id (anyOf 2) | null | Alternative | |
phone | JSON | Required within parent | |
phone (anyOf 1) | string | Alternative | The employee's phone number Read only: true |
phone (anyOf 2) | null | Alternative | |
role | string | Optional | The 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_date | JSON | Required within parent | |
scheduled_deactivation_date (anyOf 1) | string | Alternative | The date when the user is scheduled to be deactivated. Presented in ISO8601 format. Format: date-time |
scheduled_deactivation_date (anyOf 2) | null | Alternative | |
scheduled_invitation_date | JSON | Required within parent | |
scheduled_invitation_date (anyOf 1) | string | Alternative | The 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) | null | Alternative | |
status | string | Required within parent | Known 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
name | string | Required within parent | Name of the custom field |
value | string | Required within parent | Value of the custom field |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: ramp.get_user_list_with_pagination. Catalog operation: get_user_list_with_pagination. 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"]