Ramp: List receipts
Ramp receipt.getReceiptList: arguments, response, policy and SDK examples.
← Receipt operations · Get started
Operation ramp.get_receipt_list
Provider route: GET /developer/v1/receipts. 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["receipt"]["getReceiptList"]>[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.receipt.getReceiptList(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.receipt.get_receipt_list(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.created_after | string | Optional | Format: date-time |
query.created_before | string | Optional | Format: date-time |
query.reimbursement_id | string | Optional | Format: uuid |
query.transaction_id | string | Optional | Format: uuid |
query.from_date | string | Optional | Format: date-time |
query.to_date | string | Optional | Format: date-time |
query.include_ocr_data | boolean | Optional | |
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 List receipts — response body |
Referenced models: List receipts — response body
Schemas
Section titled “Schemas”List receipts — 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 receipt — 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 receipt — 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 receipt — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
created_at | string | Optional | Timestamp when the receipt was created. Format: date-time |
id | string | Optional | Unique identifier for the receipt. Format: uuid |
ocr | JSON | Optional | |
ocr (anyOf 1) | Model | Alternative | Expand Fetch a receipt — response body — ocr currency code, line items, taxes Structured data extracted from receipt OCR. Read only: true |
ocr (anyOf 2) | null | Alternative | |
receipt_url | string | Required within parent | Pre-signed URL to download receipt image (valid for 1 hour by default). Read only: true |
reimbursement_id | string | Optional | Reimbursement associated with this receipt. Format: uuid |
transaction_id | string | Optional | Transaction associated with this receipt. Format: uuid |
user_id | string | Optional | User who uploaded the receipt. Format: uuid |
Referenced models: Fetch a receipt — response body — ocr currency code, line items, taxes
Fetch a receipt — response body — ocr currency code, line items, taxes
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
currency_code | JSON | Optional | |
currency_code (anyOf 1) | string | Alternative | Currency code extracted from receipt OCR. Can be null when OCR could not extract a value. |
currency_code (anyOf 2) | null | Alternative | |
line_items | array | Optional | Line items extracted from receipt OCR. |
line_items[] | Model | Each item | Expand Fetch a receipt — response body — ocr currency code, line items, taxes line items item |
taxes | array | Optional | Taxes extracted from receipt OCR. |
taxes[] | Model | Each item | Expand Fetch a receipt — response body — ocr currency code, line items, taxes taxes item |
Referenced models: Fetch a receipt — response body — ocr currency code, line items, taxes line items item, Fetch a receipt — response body — ocr currency code, line items, taxes taxes item
Fetch a receipt — response body — ocr currency code, line items, taxes line items item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
item_date | JSON | Optional | |
item_date (anyOf 1) | string | Alternative | Date associated with the item extracted from receipt OCR. Can be null when OCR could not extract a value. Format: date |
item_date (anyOf 2) | null | Alternative | |
item_name | JSON | Optional | |
item_name (anyOf 1) | string | Alternative | Name of the item extracted from receipt OCR. Can be null when OCR could not extract a value. |
item_name (anyOf 2) | null | Alternative | |
item_quantity | JSON | Optional | |
item_quantity (anyOf 1) | JSON | Alternative | |
item_quantity (anyOf 1) (anyOf 1) | number | Alternative | Quantity of the item extracted from receipt OCR. Can be null when OCR could not extract a value. |
item_quantity (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
item_quantity (anyOf 2) | null | Alternative | |
item_total_price | JSON | Optional | |
item_total_price (anyOf 1) | JSON | Alternative | |
item_total_price (anyOf 1) (anyOf 1) | number | Alternative | Total price of the item extracted from receipt OCR. Can be null when OCR could not extract a value. |
item_total_price (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
item_total_price (anyOf 2) | null | Alternative | |
item_unit_price | JSON | Optional | |
item_unit_price (anyOf 1) | JSON | Alternative | |
item_unit_price (anyOf 1) (anyOf 1) | number | Alternative | Unit price of the item extracted from receipt OCR. Can be null when OCR could not extract a value. |
item_unit_price (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
item_unit_price (anyOf 2) | null | Alternative |
Fetch a receipt — response body — ocr currency code, line items, taxes taxes item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
tax_amount | JSON | Optional | |
tax_amount (anyOf 1) | JSON | Alternative | |
tax_amount (anyOf 1) (anyOf 1) | number | Alternative | Tax amount extracted from receipt OCR. Can be null when OCR could not extract a value. |
tax_amount (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
tax_amount (anyOf 2) | null | Alternative | |
tax_name | JSON | Optional | |
tax_name (anyOf 1) | string | Alternative | Name of the tax extracted from receipt OCR. Can be null when OCR could not extract a value. |
tax_name (anyOf 2) | null | Alternative | |
tax_rate | JSON | Optional | |
tax_rate (anyOf 1) | JSON | Alternative | |
tax_rate (anyOf 1) (anyOf 1) | number | Alternative | Tax rate extracted from receipt OCR. Can be null when OCR could not extract a value. |
tax_rate (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
tax_rate (anyOf 2) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: ramp.get_receipt_list. Catalog operation: get_receipt_list. 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: ["receipts:read"]