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.
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["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 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.sunshine_act.get_sunshine_act_expenses(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.from_date | string | Optional | Format: date-time |
query.to_date | string | Optional | Format: date-time |
query.start | string | Optional | |
query.page_size | integer | Optional | Default: 20 |
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 Retrieve a list of paginated Sunshine Act expenses — response body |
Referenced models: Retrieve a list of paginated Sunshine Act expenses — response body
Schemas
Section titled “Schemas”7 more schemas are linked from the tables above, on the schema pages.
Retrieve a list of paginated Sunshine Act expenses — 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 Retrieve a list of paginated Sunshine Act expenses — response body — data item |
page | Model | Required within parent | Expand 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
| 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 |
Retrieve a list of paginated Sunshine Act expenses — response body — data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
card_acceptor | JSON | Optional | |
card_acceptor (anyOf 1) | Model | Alternative | Expand 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) | null | Alternative | |
client_employees | JSON | Required within parent | |
client_employees (anyOf 1) | integer | Alternative | Number of client employees involved. |
client_employees (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
comments | JSON | Optional | |
comments (anyOf 1) | string | Alternative | Additional comments about the expense. |
comments (anyOf 2) | null | Alternative | |
contextual_information | JSON | Optional | |
contextual_information (anyOf 1) | string | Alternative | Contextual information about the expense. |
contextual_information (anyOf 2) | null | Alternative | |
destination | JSON | Optional | |
destination (anyOf 1) | Model | Alternative | Expand Retrieve a list of paginated Sunshine Act expenses — response body — data item destination city, country, state Destination information for the expense. |
destination (anyOf 2) | null | Alternative | |
non_us_currency_code | JSON | Optional | |
non_us_currency_code (anyOf 1) | string | Alternative | Currency code for non-US expenses. |
non_us_currency_code (anyOf 2) | null | Alternative | |
non_us_total_cost | JSON | Optional | |
non_us_total_cost (anyOf 1) | string | Alternative | Total cost in non-US currency. Format: decimal |
non_us_total_cost (anyOf 2) | null | Alternative | |
recipient | Model | Required within parent | Expand Retrieve a list of paginated Sunshine Act expenses — response body — data item recipient Recipient information for the expense. |
related_products | array | Required within parent | List of related products for this expense. |
related_products[] | Model | Each item | Expand Retrieve a list of paginated Sunshine Act expenses — response body — data item related products item |
sales_rep | Model | Required within parent | Expand Retrieve a list of paginated Sunshine Act expenses — response body — data item sales rep Sales representative information. |
spend_date | string | Required within parent | Date of the expense. Format: date-time |
spend_entry_date | string | Required within parent | Date when the expense was entered. Format: date-time |
spend_form | JSON | Optional | |
spend_form (anyOf 1) | Model | Alternative | Expand 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) | null | Alternative | |
spend_id | string | Required within parent | Unique identifier for the expense. |
spend_link | string | Required within parent | URL to the expense details page. |
spend_nature | JSON | Optional | |
spend_nature (anyOf 1) | Model | Alternative | Expand 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) | null | Alternative | |
spend_owner_email | string | Required within parent | Email address of the expense owner. |
spend_type | string | Required within parent | Type of the underlying expense. Either 'transaction' or 'reimbursement'. Known values: reimbursement, transaction |
total_cost | string | Required within parent | Total cost of the expense. Format: decimal |
total_recipients | JSON | Required within parent | |
total_recipients (anyOf 1) | integer | Alternative | Total number of recipients for this expense. |
total_recipients (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
updated_at | string | Required within parent | Most recent update to the expense's attendee or coding data. Format: date-time |
vendor | JSON | Optional | |
vendor (anyOf 1) | string | Alternative | Vendor name relating to the expense. |
vendor (anyOf 2) | null | Alternative |
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
city | JSON | Optional | |
city (anyOf 1) | string | Alternative | City of the card acceptor. |
city (anyOf 2) | null | Alternative | |
country_code | JSON | Optional | |
country_code (anyOf 1) | string | Alternative | Country code of the card acceptor. |
country_code (anyOf 2) | null | Alternative | |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | Name of the card acceptor/merchant. |
name (anyOf 2) | null | Alternative | |
postal_code | JSON | Optional | |
postal_code (anyOf 1) | string | Alternative | Postal code of the card acceptor. |
postal_code (anyOf 2) | null | Alternative | |
state | JSON | Optional | |
state (anyOf 1) | string | Alternative | State of the card acceptor. |
state (anyOf 2) | null | Alternative |
Retrieve a list of paginated Sunshine Act expenses — response body — data item destination city, country, state
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
city | JSON | Optional | |
city (anyOf 1) | string | Alternative | City of the travel destination corresponding to the expense, if any. |
city (anyOf 2) | null | Alternative | |
country | JSON | Optional | |
country (anyOf 1) | string | Alternative | Country of the travel destination corresponding to the expense, if any. |
country (anyOf 2) | null | Alternative | |
state | JSON | Optional | |
state (anyOf 1) | string | Alternative | State of the travel destination corresponding to the expense, if any. |
state (anyOf 2) | null | Alternative |
Retrieve a list of paginated Sunshine Act expenses — response body — data item sales rep
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
first_name | string | Required within parent | First name of the sales representative. |
id | string | Required within parent | Identifier for the sales representative. |
last_name | string | Required within parent | Last name of the sales representative. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”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"]