Ramp: Get a business entity
Ramp businessEntities.getEntityResource: arguments, response, policy and SDK examples.
← Business entities operations · Get started
Operation ramp.get_entity_resource
Provider route: GET /developer/v1/entities/{entity_id}. 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["businessEntities"]["getEntityResource"]>[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.businessEntities.getEntityResource(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.business_entities.get_entity_resource(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.entity_id | string | Required within parent | Format: uuid |
query | object | Optional | Additional keys: not allowed |
query.hide_inactive | boolean | Optional | Default: false |
query.include_custom_field_values | boolean | Optional | Default: false |
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 Get a business entity — response body |
Referenced models: Get a business entity — response body
Schemas
Section titled “Schemas”8 more schemas are linked from the tables above, on the schema pages.
Get a business entity — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
accounts | array | Required within parent | Information about the entity's active accounts Read only: true |
accounts[] | Model | Each item | Expand Get a business entity — response body — accounts item |
connected_subsidiary | JSON | Required within parent | |
connected_subsidiary (anyOf 1) | Model | Alternative | Expand Get a business entity — response body — connected subsidiary external id, id, name The subsidiary in the ERP system that this entity is mapped to. This determines which subsidiary transactions from this entity will be synced to. Read only: true |
connected_subsidiary (anyOf 2) | null | Alternative | |
currency | JSON | Required within parent | |
currency (anyOf 1) | string | Alternative | Currency used by this business entity. Known values: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNH, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, EURC, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, OPEN_USD, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SLL, SOS, SRD, SSP, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USDB, USDC, USDG, USDT, USN, UYI, UYU, UYW, UZS, VED, VES, VND, VUV, WST, XAD, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XCG, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWG, ZWL |
currency (anyOf 2) | null | Alternative | |
custom_record_fields | array | Optional | Custom record field values associated with this entity. Only returned when `include_custom_field_values=true`. Read only: true |
custom_record_fields[] | Model | Each item | Expand Get a business entity — response body — custom record fields item |
default_bill_pay_payment_account_id | JSON | Required within parent | |
default_bill_pay_payment_account_id (anyOf 1) | string | Alternative | Bank account UUID of the entity's configured default Bill Pay payment account, if one exists. This UUID can be matched against payment_accounts[].id and accounts[].bank_account_id when those records are present. Format: uuid Read only: true |
default_bill_pay_payment_account_id (anyOf 2) | null | Alternative | |
entity_name | string | Required within parent | Name of the business entity. |
id | string | Required within parent | Unique identifier for the business entity. Format: uuid |
is_primary | JSON | Required within parent | |
is_primary (anyOf 1) | boolean | Alternative | Whether this is the primary entity for the business. |
is_primary (anyOf 2) | null | Alternative | |
location_ids | array | Required within parent | List of identifiers for locations associated with this entity. Read only: true |
location_ids[] | string | Each item | Format: uuid |
payment_accounts | array | Required within parent | Bank accounts eligible for bill payment for this entity. Read only: true |
payment_accounts[] | Model | Each item | Expand Get a business entity — response body — payment accounts item |
Referenced models: Get a business entity — response body — connected subsidiary external id, id, name, Get a business entity — response body — payment accounts item, Get a business entity — response body — custom record fields item, Get a business entity — response body — accounts item
Get a business entity — response body — connected subsidiary external id, id, name
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
external_id | string | Required within parent | External ID of the subsidiary in the ERP system |
id | string | Required within parent | ID that uniquely identifies the subsidiary within Ramp |
name | string | Required within parent | Name of the subsidiary in the ERP system |
Get a business entity — response body — payment accounts item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
account_name | string | Required within parent | Display name of the bank account |
account_number_last_four | string | Required within parent | Last four digits of the account number |
currency | string | Required within parent | ISO 4217 currency code of the bank account (e.g. USD, CAD) |
id | string | Required within parent | Unique identifier of the bank account. Format: uuid |
Get a business entity — response body — custom record fields item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
column_display_name | string | Required within parent | The display name of the column |
column_id | string | Required within parent | The id of the column |
value | JSON | Required within parent | The contents of the cell discriminator: {"mapping": {"boolean": "#/components/schemas/BooleanCellContentsForDisplay", "custom_table": "#/components/schemas/CustomTableReferenceCellContentsForDisplay", "date": "#/components/schemas/DatetimeCellContentsForDisplay", "native_table": "#/components/schemas/NativeTableReferenceCellContentsForDisplay", "number": "#/components/schemas/NumberCellContentsForDisplay", "text": "#/components/schemas/TextCellContentsForDisplay"}, "propertyName": "type"} |
value (anyOf 1) | Model | Alternative | Expand Get a business entity — response body — custom record fields item value type boolean |
value (anyOf 2) | Model | Alternative | Expand Get a business entity — response body — custom record fields item value type custom table |
value (anyOf 3) | Model | Alternative | Expand Get a business entity — response body — custom record fields item value type date |
value (anyOf 4) | Model | Alternative | Expand Get a business entity — response body — custom record fields item value type native table |
value (anyOf 5) | Model | Alternative | Expand Get a business entity — response body — custom record fields item value type number |
value (anyOf 6) | Model | Alternative | Expand Get a business entity — response body — custom record fields item value type text |
Referenced models: Get a business entity — response body — custom record fields item value type boolean, Get a business entity — response body — custom record fields item value type date, Get a business entity — response body — custom record fields item value type custom table, Get a business entity — response body — custom record fields item value type native table, Get a business entity — response body — custom record fields item value type number, Get a business entity — response body — custom record fields item value type text
Get a business entity — response body — accounts item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
bank_account_id | JSON | Required within parent | |
bank_account_id (anyOf 1) | string | Alternative | Unique identifier of the associated bank account, if exists Format: uuid |
bank_account_id (anyOf 2) | null | Alternative | |
classification | string | Required within parent | Classification type of the account (Asset, Liability, Equity, etc.). Known values: ANY, ASSET, CREDCARD, EQUITY, EXPENSE, LIABILITY, REVENUE, UNKNOWN |
created_at | string | Required within parent | When the account was created. Format: date-time |
external_id | string | Required within parent | External ID of the account. If connected to a direct integration, this value is sourced from the remote ERP system. |
external_name | string | Required within parent | External name of the account. If connected to a direct integration, this value is sourced from the remote ERP system. |
internal_id | string | Required within parent | Internal ID of the account. This value is entered as the Account ID in Ramp as the unique ID or number assigned by your accounting provider. |
usage_type | JSON | Required within parent | |
usage_type (anyOf 1) | string | Alternative | How the account is used within the system (Cash Account, Expense Account, etc.). Known values: ACCRUAL_AP_ACCOUNT, ACCRUAL_LIABILITY_ACCOUNT, AR_ACCOUNTS_RECEIVABLE_ACCOUNT, AR_ACH_CREDIT_BANK_ACCOUNT, AR_BAD_DEBT_ACCOUNT, AR_CARD_FEES_ACCOUNT, AR_CASH_ACCOUNT_DEFAULT, AR_CHARGEBACK_CLEARING_ACCOUNT, AR_DEFERRED_REVENUE_ACCOUNT_DEFAULT, AR_INCOME_ACCOUNT_DEFAULT, AR_REFUNDS_CLEARING_ACCOUNT, AR_SALES_TAX_PAYABLE_ACCOUNT, AR_UNBILLED_ACCOUNTS_RECEIVABLE_ACCOUNT, AR_UNDEPOSITED_FUNDS_ACCOUNT, BILL_PAY_ACCOUNTS_PAYABLE_ACCOUNT, BILL_PAY_BANK_ACCOUNT, BILL_PAY_FX_GAIN_LOSS_ACCOUNT, BILL_PAY_RETAINAGE_PAYABLE_ACCOUNT, BOOKKEEPING_AUTOMATION_BANK_ACCOUNT, BOOKKEEPING_AUTOMATION_CLEARING_ACCOUNT, BROKERAGE_ACCOUNT, BROKERAGE_DIVIDEND_ACCOUNT, CARD_LIABILITY_ACCOUNT, CARD_TRANSACTION_BILLS_ACCOUNTS_PAYABLE_ACCOUNT, CASHBACK_ACCOUNT, CASH_ACCOUNT, FIXED_ASSET_ACCUMULATED_IMPAIRMENT_ACCOUNT, FIXED_ASSET_GAIN_ACCOUNT, FIXED_ASSET_IMPAIRMENT_LOSS_ACCOUNT, FIXED_ASSET_LOSS_ACCOUNT, FIXED_ASSET_PROCEEDS_ON_DISPOSAL_ACCOUNT, INTERCOMPANY_ACCOUNTS_PAYABLE_ACCOUNT, INTERCOMPANY_ACCOUNTS_RECEIVABLE_ACCOUNT, INTERCOMPANY_TRANSFER_CLEARING_ACCOUNT, MANAGED_PORTFOLIO_CASH_ACCOUNT, MANAGED_PORTFOLIO_FEE_EXPENSE_ACCOUNT, MANAGED_PORTFOLIO_INTEREST_INCOME_ACCOUNT, MANAGED_PORTFOLIO_POSITION_ASSET_ACCOUNT, MANAGED_PORTFOLIO_REALIZED_GAIN_LOSS_ACCOUNT, MANAGED_PORTFOLIO_UNREALIZED_GAIN_LOSS_ACCOUNT, REIMBURSEMENT_ACCOUNTS_PAYABLE_ACCOUNT, REIMBURSEMENT_BANK_ACCOUNT, TRANSFER_BANK_ACCOUNT, UNDEPOSITED_FUNDS, WALLET_ACCOUNT, WALLET_BANK_ACCOUNT, WALLET_YIELD_ACCOUNT |
usage_type (anyOf 2) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: ramp.get_entity_resource. Catalog operation: get_entity_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: ["entities:read"]