Skip to content

Ramp: Retrieve a list of paginated Sunshine Act expenses

Ramp sunshineAct.getSunshineActExpenses: arguments, response, policy and SDK examples.

← Sunshine act operations · Get started

Operation ramp.get_sunshine_act_expenses

Provider route: GET /developer/v1/sunshine-act/expenses. 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["sunshineAct"]["getSunshineActExpenses"]>[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.sunshineAct.getSunshineActExpenses(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.sunshine_act.get_sunshine_act_expenses(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectOptionalAdditional keys: not allowed
query.from_datestringOptionalFormat: date-time
query.to_datestringOptionalFormat: date-time
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 Retrieve a list of paginated Sunshine Act expenses — response body

Referenced models: Retrieve a list of paginated Sunshine Act expenses — response body

7 more schemas are linked from the tables above, on the schema pages.

Retrieve a list of paginated Sunshine Act expenses — response body
FieldTypePresenceDescription and constraints
$objectRoot
dataarrayRequired within parentResources returned in this page.
data[]ModelEach itemExpand Retrieve a list of paginated Sunshine Act expenses — response body — data item
pageModelRequired within parentExpand List bills — response body — page
Pagination details for this response.

Referenced models: List bills — response body — page, Retrieve a list of paginated Sunshine Act expenses — response body — data item

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
Retrieve a list of paginated Sunshine Act expenses — response body — data item
FieldTypePresenceDescription and constraints
$objectRoot
card_acceptorJSONOptional
card_acceptor (anyOf 1)ModelAlternativeExpand Retrieve a list of paginated Sunshine Act expenses — response body — data item card acceptor city, country code, name, postal code, state
Card acceptor/merchant information.
card_acceptor (anyOf 2)nullAlternative
client_employeesJSONRequired within parent
client_employees (anyOf 1)integerAlternativeNumber of client employees involved.
client_employees (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
commentsJSONOptional
comments (anyOf 1)stringAlternativeAdditional comments about the expense.
comments (anyOf 2)nullAlternative
contextual_informationJSONOptional
contextual_information (anyOf 1)stringAlternativeContextual information about the expense.
contextual_information (anyOf 2)nullAlternative
destinationJSONOptional
destination (anyOf 1)ModelAlternativeExpand Retrieve a list of paginated Sunshine Act expenses — response body — data item destination city, country, state
Destination information for the expense.
destination (anyOf 2)nullAlternative
non_us_currency_codeJSONOptional
non_us_currency_code (anyOf 1)stringAlternativeCurrency code for non-US expenses.
non_us_currency_code (anyOf 2)nullAlternative
non_us_total_costJSONOptional
non_us_total_cost (anyOf 1)stringAlternativeTotal cost in non-US currency.
Format: decimal
non_us_total_cost (anyOf 2)nullAlternative
recipientModelRequired within parentExpand Retrieve a list of paginated Sunshine Act expenses — response body — data item recipient
Recipient information for the expense.
related_productsarrayRequired within parentList of related products for this expense.
related_products[]ModelEach itemExpand Retrieve a list of paginated Sunshine Act expenses — response body — data item related products item
sales_repModelRequired within parentExpand Retrieve a list of paginated Sunshine Act expenses — response body — data item sales rep
Sales representative information.
spend_datestringRequired within parentDate of the expense.
Format: date-time
spend_entry_datestringRequired within parentDate when the expense was entered.
Format: date-time
spend_formJSONOptional
spend_form (anyOf 1)ModelAlternativeExpand Retrieve a list of paginated Sunshine Act expenses — response body — data / item / spend_form / code: 1, 2, 3, 4, 5, 6
Form of the expense payment, following CMS definitions.
spend_form (anyOf 2)nullAlternative
spend_idstringRequired within parentUnique identifier for the expense.
spend_linkstringRequired within parentURL to the expense details page.
spend_natureJSONOptional
spend_nature (anyOf 1)ModelAlternativeExpand Retrieve a list of paginated Sunshine Act expenses — response body — data / item / spend_nature / code: 1, 10, 11, 14, 15, 16, 17, 18, 19, 2, 3, 4, 5, 6, 7, 8, 9
Nature of the expense payment, following CMS definitions.
spend_nature (anyOf 2)nullAlternative
spend_owner_emailstringRequired within parentEmail address of the expense owner.
spend_typestringRequired within parentType of the underlying expense. Either 'transaction' or 'reimbursement'.
Known values: reimbursement, transaction
total_coststringRequired within parentTotal cost of the expense.
Format: decimal
total_recipientsJSONRequired within parent
total_recipients (anyOf 1)integerAlternativeTotal number of recipients for this expense.
total_recipients (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
updated_atstringRequired within parentMost recent update to the expense's attendee or coding data.
Format: date-time
vendorJSONOptional
vendor (anyOf 1)stringAlternativeVendor name relating to the expense.
vendor (anyOf 2)nullAlternative

Referenced models: Retrieve a list of paginated Sunshine Act expenses — response body — data item card acceptor city, country code, name, postal code, state, Retrieve a list of paginated Sunshine Act expenses — response body — data item destination city, country, state, Retrieve a list of paginated Sunshine Act expenses — response body — data item sales rep, Retrieve a list of paginated Sunshine Act expenses — response body — data item recipient, Retrieve a list of paginated Sunshine Act expenses — response body — data item related products item, Retrieve a list of paginated Sunshine Act expenses — response body — data / item / spend_form / code: 1, 2, 3, 4, 5, 6, Retrieve a list of paginated Sunshine Act expenses — response body — data / item / spend_nature / code: 1, 10, 11, 14, 15, 16, 17, 18, 19, 2, 3, 4, 5, 6, 7, 8, 9

Retrieve a list of paginated Sunshine Act expenses — response body — data item card acceptor city, country code, name, postal code, state
FieldTypePresenceDescription and constraints
$objectRoot
cityJSONOptional
city (anyOf 1)stringAlternativeCity of the card acceptor.
city (anyOf 2)nullAlternative
country_codeJSONOptional
country_code (anyOf 1)stringAlternativeCountry code of the card acceptor.
country_code (anyOf 2)nullAlternative
nameJSONOptional
name (anyOf 1)stringAlternativeName of the card acceptor/merchant.
name (anyOf 2)nullAlternative
postal_codeJSONOptional
postal_code (anyOf 1)stringAlternativePostal code of the card acceptor.
postal_code (anyOf 2)nullAlternative
stateJSONOptional
state (anyOf 1)stringAlternativeState of the card acceptor.
state (anyOf 2)nullAlternative
Retrieve a list of paginated Sunshine Act expenses — response body — data item destination city, country, state
FieldTypePresenceDescription and constraints
$objectRoot
cityJSONOptional
city (anyOf 1)stringAlternativeCity of the travel destination corresponding to the expense, if any.
city (anyOf 2)nullAlternative
countryJSONOptional
country (anyOf 1)stringAlternativeCountry of the travel destination corresponding to the expense, if any.
country (anyOf 2)nullAlternative
stateJSONOptional
state (anyOf 1)stringAlternativeState of the travel destination corresponding to the expense, if any.
state (anyOf 2)nullAlternative
Retrieve a list of paginated Sunshine Act expenses — response body — data item sales rep
FieldTypePresenceDescription and constraints
$objectRoot
first_namestringRequired within parentFirst name of the sales representative.
idstringRequired within parentIdentifier for the sales representative.
last_namestringRequired within parentLast name of the sales representative.

SDK function policy ID: ramp.get_sunshine_act_expenses. Catalog operation: get_sunshine_act_expenses. 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: ["reimbursements:read", "transactions: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 how our website, product, and documentation are used.

Performance diagnostics

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

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

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