Skip to content

Ramp: List spend programs

Ramp spendProgram.getSpendProgramResource: arguments, response, policy and SDK examples.

← Spend program operations · Get started

Operation ramp.get_spend_program_resource

Provider route: GET /developer/v1/spend-programs. 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["spendProgram"]["getSpendProgramResource"]>[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.spendProgram.getSpendProgramResource(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.spend_program.get_spend_program_resource(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectOptionalAdditional keys: not allowed
query.startstringOptional
query.page_sizeintegerOptionalDefault: 20

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

FieldTypePresenceDescription and constraints
$ModelRootExpand List spend programs — response body

Referenced models: List spend programs — response body

List spend programs — response body
FieldTypePresenceDescription and constraints
$objectRoot
dataarrayRequired within parentResources returned in this page.
data[]ModelEach itemExpand Create a spend program — response body
pageModelRequired within parentExpand List bills — response body — page
Pagination details for this response.

Referenced models: List bills — response body — page, Create a spend program — response body

List bills — response body — page
FieldTypePresenceDescription and constraints
$objectRootPagination details for a Developer API response.
nextJSONRequired within parent
next (anyOf 1)stringAlternativethe query to get to the next page; it is in the format of <BASE_URL>?<new_params>
next (anyOf 2)nullAlternative
Create a spend program — response body
FieldTypePresenceDescription and constraints
$objectRoot
descriptionstringRequired within parentDescription of the spend program.
display_namestringRequired within parentDisplay name of the spend program.
iconstringRequired within parentThe template icon for the spend program.
Known values: AccountingServicesIcon, AdvertisingIcon, CONTRACTORS_AND_PROFESSIONAL_SERVICES, CUSTOM, CardIcon, EducationStipendIcon, EmployeeRewardsIcon, GroundTransportationIcon, LegalFeesIcon, LodgingIcon, LunchOrderingIcon, OnboardingIcon, PerDiemCardIcon, SOFTWARE, SaasSubscriptionIcon, SoftwareTrialIcon, SuppliesIcon, TeamSocialIcon, TravelExpensesIcon, VirtualEventIcon, WellnessIcon, WorkFromHomeIcon, advertising, airlines, bills, business, car_services, contractor, education, entertainment, event_balloons, event_virtual, food, fuel_and_gas, general_expense, general_merchandise, gift, government_services, internet_and_phone, legal, lodging, lodging_room, newspaper, office, physical_card, procurement_checklist, procurement_intake, professional_services, restaurants, reward, saas_software, shipping, travel_misc, wellness
idstringRequired within parentUnique identifier of the spend program.
Format: uuid
is_shareablebooleanRequired within parentWhether this spend program is shareable.
issue_physical_card_if_neededbooleanRequired within parentIndicates whether the spend program should issue a physical card if the user does not have one.
permitted_spend_typesJSONRequired within parent
permitted_spend_types (anyOf 1)ModelAlternativeExpand Fetch a spend program — response body — permitted spend types primary card enabled, reimbursements enabled
Permitted spend types for the spend program.
permitted_spend_types (anyOf 2)nullAlternative
restrictionsJSONRequired within parent
restrictions (anyOf 1)ModelAlternativeExpand Fetch a spend program — response body — restrictions allowed categories, allowed vendors, auto lock date, blocked categories, blocked vendors, interval, limit, next interval reset, start of interval, temporary limit, transaction amount limit
A set of restrictions imposed on the spend program.
Read only: true
restrictions (anyOf 2)nullAlternative

Referenced models: Fetch a spend program — response body — permitted spend types primary card enabled, reimbursements enabled, Fetch a spend program — response body — restrictions allowed categories, allowed vendors, auto lock date, blocked categories, blocked vendors, interval, limit, next interval reset, start of interval, temporary limit, transaction amount limit

Fetch a spend program — response body — permitted spend types primary card enabled, reimbursements enabled
FieldTypePresenceDescription and constraints
$objectRoot
primary_card_enabledbooleanRequired within parentIndicates whether the user's physical card can be linked to this limit.
reimbursements_enabledbooleanRequired within parentIndicates whether reimbursements can be submitted against this limit.
Fetch a spend program — response body — restrictions allowed categories, allowed vendors, auto lock date, blocked categories, blocked vendors, interval, limit, next interval reset, start of interval, temporary limit, transaction amount limit
FieldTypePresenceDescription and constraints
$objectRoot
allowed_categoriesarrayRequired within parentList of Ramp category codes allowed for the limit.
allowed_categories[]JSONEach item
allowed_categories[] (anyOf 1)integerAlternativeKnown values: 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 5, 6, 7, 8, 9
allowed_categories[] (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
allowed_vendorsarrayRequired within parentList of merchants allowed for the limit.
allowed_vendors[]stringEach itemFormat: uuid
auto_lock_dateJSONRequired within parent
auto_lock_date (anyOf 1)stringAlternativeDate to automatically to lock the limit.
Format: date-time
auto_lock_date (anyOf 2)nullAlternative
blocked_categoriesarrayRequired within parentList of Ramp category codes blocked for the limit.
blocked_categories[]JSONEach item
blocked_categories[] (anyOf 1)integerAlternativeKnown values: 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 5, 6, 7, 8, 9
blocked_categories[] (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
blocked_vendorsarrayRequired within parentList of merchants blocked for the limit.
blocked_vendors[]stringEach itemFormat: uuid
intervalstringRequired within parentTime interval the limit is applied on.
Known values: ANNUAL, CUSTOM, DAILY, MONTHLY, QUARTERLY, TERTIARY, TOTAL, WEEKLY, YEARLY
limitJSONRequired within parent
limit (anyOf 1)ModelAlternativeExpand Hold Bill — response body — amount
Amount limit total per interval denominated in the smallest currency unit (e.g. cents for USD).
Read only: true
limit (anyOf 2)nullAlternative
next_interval_resetJSONRequired within parent
next_interval_reset (anyOf 1)stringAlternativeDate and time for the next interval reset.
Format: date-time
next_interval_reset (anyOf 2)nullAlternative
start_of_intervalJSONRequired within parent
start_of_interval (anyOf 1)stringAlternativeDate and time for the start of the current interval.
Format: date-time
start_of_interval (anyOf 2)nullAlternative
temporary_limitJSONRequired within parent
temporary_limit (anyOf 1)ModelAlternativeExpand Hold Bill — response body — amount
Temporary limit total per interval.
Read only: true
temporary_limit (anyOf 2)nullAlternative
transaction_amount_limitJSONRequired within parent
transaction_amount_limit (anyOf 1)ModelAlternativeExpand Hold Bill — response body — amount
Max amount allowed on a single transaction.
Read only: true
transaction_amount_limit (anyOf 2)nullAlternative

Referenced models: Hold Bill — response body — amount

Hold Bill — response body — amount
FieldTypePresenceDescription and constraints
$objectRoot
amountJSONRequired within parent
amount (anyOf 1)integerAlternativethe amount of money represented in the smallest denomination of the currency. For example, when the currency is USD, then the amount is expressed in cents.
amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
currency_codestringRequired within parentThe type of currency, in ISO 4217 format. e.g. USD for US dollars
Default: USD
minor_unit_conversion_rateJSONRequired within parent
minor_unit_conversion_rate (anyOf 1)JSONAlternative
minor_unit_conversion_rate (anyOf 1) (anyOf 1)integerAlternativeThe conversion factor to convert from the integer amount to the actual currency value. Divide amount by this value to get the real currency amount. For USD, this is 100 (e.g., 12034 / 100 = 120.34 USD). See https://docs.ramp.com/developer-api/v1/monetary-values for more information.
Read only: true
minor_unit_conversion_rate (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
minor_unit_conversion_rate (anyOf 2)nullAlternative

SDK function policy ID: ramp.get_spend_program_resource. Catalog operation: get_spend_program_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: ["spend_programs: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.