Skip to content

Ramp: List vendor credits by vendor

Ramp vendor.getVendorCreditsList: arguments, response, policy and SDK examples.

← Vendor operations · Get started

Operation ramp.get_vendor_credits_list

Provider route: GET /developer/v1/vendors/{vendor_id}/credits. 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["vendor"]["getVendorCreditsList"]>[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.vendor.getVendorCreditsList(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.vendor.get_vendor_credits_list(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.vendor_idstringRequired within parentFormat: uuid
queryModelOptionalExpand List vendor credits by vendor — request body — query

Referenced models: List vendor credits by vendor — request body — query

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

FieldTypePresenceDescription and constraints
$ModelRootExpand List vendor credits by vendor — response body

Referenced models: List vendor credits by vendor — response body

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

List vendor credits by vendor — response body
FieldTypePresenceDescription and constraints
$objectRoot
dataarrayRequired within parentResources returned in this page.
data[]arrayEach item
data[][]ModelEach itemExpand Fetch a vendor credit — response body
pageModelRequired within parentExpand List bills — response body — page
Pagination details for this response.

Referenced models: List bills — response body — page, Fetch a vendor credit — response body

List vendor credits by vendor — request body — query
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
entity_idJSONOptional
entity_id (anyOf 1)stringAlternativeDefault: null
Format: uuid
entity_id (anyOf 2)nullAlternative
from_created_atJSONOptional
from_created_at (anyOf 1)stringAlternativeDefault: null
Format: date-time
from_created_at (anyOf 2)nullAlternative
to_created_atJSONOptional
to_created_at (anyOf 1)stringAlternativeDefault: null
Format: date-time
to_created_at (anyOf 2)nullAlternative
from_accounting_dateJSONOptional
from_accounting_date (anyOf 1)stringAlternativeDefault: null
Format: date
from_accounting_date (anyOf 2)nullAlternative
to_accounting_dateJSONOptional
to_accounting_date (anyOf 1)stringAlternativeDefault: null
Format: date
to_accounting_date (anyOf 2)nullAlternative
include_fully_usedbooleanOptionalDefault: false
is_archivedbooleanOptionalDefault: false
startstringOptional
page_sizeintegerOptionalDefault: 20
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
Fetch a vendor credit — response body
FieldTypePresenceDescription and constraints
$objectRoot
accounting_datestringRequired within parentAccounting date of the vendor credit
Format: date
accounting_field_selectionsarrayRequired within parentList of accounting field selections associated with this vendor credit
Read only: true
accounting_field_selections[]ModelEach itemExpand Hold Bill — response body — accounting field selections item
applied_billsarrayRequired within parentBills that this Vendor Credit has been applied to. A Vendor Credit can be applied to multiple Bills
Read only: true
applied_bills[]ModelEach itemExpand Fetch a vendor credit — response body — applied bills item
applied_draft_billsarrayRequired within parentDraft Bills that this Vendor Credit has been applied to. A Vendor Credit can be applied to multiple Draft Bills
Read only: true
applied_draft_bills[]ModelEach itemExpand Fetch a vendor credit — response body — applied bills item
archived_atJSONRequired within parent
archived_at (anyOf 1)stringAlternativeThe datetime the vendor credit was archived. Null for active credits. Archived credits cannot be applied to bills, even when remaining_amount is positive.
Format: date-time
archived_at (anyOf 2)nullAlternative
created_atJSONRequired within parent
created_at (anyOf 1)stringAlternativeDate and time when the vendor credit was created
Format: date-time
created_at (anyOf 2)nullAlternative
entity_idJSONRequired within parent
entity_id (anyOf 1)stringAlternativeUUID of the business entity associated with this vendor credit
Format: uuid
entity_id (anyOf 2)nullAlternative
expense_line_itemsarrayRequired within parentExpense line items of the vendor credit. Expense line items contain an overall amount.
expense_line_items[]ModelEach itemExpand Fetch a vendor credit — response body — expense line items item
idstringRequired within parentUnique identifier for the vendor credit
inventory_line_itemsarrayRequired within parentInventory line items of the vendor credit. Inventory line items are tied to a particular good or service.
inventory_line_items[]ModelEach itemExpand Fetch a vendor credit — response body — inventory line items item
reference_bill_idJSONRequired within parent
reference_bill_id (anyOf 1)stringAlternativeUUID of the bill that was the origin of this vendor credit, if any
Format: uuid
reference_bill_id (anyOf 2)nullAlternative
reference_numberJSONRequired within parent
reference_number (anyOf 1)stringAlternativeReference number from the vendor credit memo
reference_number (anyOf 2)nullAlternative
remaining_amountModelRequired within parentExpand Hold Bill — response body — amount
Unapplied amount, equal to total_amount minus total_applied_amount. This amount is retained for archived credits and does not indicate eligibility to apply the credit. Credits with a non-null archived_at cannot be applied. Denominated in the Vendor Credit's currency.
Read only: true
total_amountModelRequired within parentExpand Hold Bill — response body — amount
Total amount of the vendor credit, sum of all line items, in the Vendor Credit's currency.
Read only: true
total_applied_amountModelRequired within parentExpand Hold Bill — response body — amount
Total amount that has been applied to bills and/or draft bills, in the Vendor Credit's currency.
Read only: true
vendor_idstringRequired within parentUUID of the payee associated with this vendor credit
Format: uuid

Referenced models: Hold Bill — response body — accounting field selections item, Hold Bill — response body — amount, Fetch a vendor credit — response body — applied bills item, Fetch a vendor credit — response body — expense line items item, Fetch a vendor credit — response body — inventory line items item

Hold Bill — response body — accounting field selections item
FieldTypePresenceDescription and constraints
$objectRoot
category_infoModelRequired within parentExpand Hold Bill — response body — accounting field selections item category info
information about the accounting category (or accounting field).
display_nameJSONRequired within parent
display_name (anyOf 1)stringAlternativeCustomer-set display name for the accounting field option in Ramp. When the customer renames an option inside Ramp, this returns the new label while `name` continues to return the ERP-source name. May be null if no Ramp-side override is set.
display_name (anyOf 2)nullAlternative
external_codeJSONOptional
external_code (anyOf 1)stringAlternativeexternal code of accounting field option; Code field displayed on the ERP.
external_code (anyOf 2)nullAlternative
external_idstringRequired within parentexternal id of accounting field option; It should uniquely identify an accounting field option on the client end.
idstringRequired within parentID that uniquely identifies an accounting field option within Ramp
namestringRequired within parentname of accounting field option
provider_nameJSONRequired within parent
provider_name (anyOf 1)stringAlternativeName of the accounting provider
Read only: true
provider_name (anyOf 2)nullAlternative

Referenced models: Hold Bill — response body — accounting field selections item category info

Fetch a vendor credit — response body — applied bills item
FieldTypePresenceDescription and constraints
$objectRoot
amountModelRequired within parentExpand Hold Bill — response body — amount
Amount of this Vendor Credit that has been applied to the given bill, in the Vendor Credit's currency.
Read only: true
bill_idstringRequired within parentUUID of the bill or draft bill that this vendor credit is applied to
Format: uuid
Read only: true

Referenced models: Hold Bill — response body — amount

SDK function policy ID: ramp.get_vendor_credits_list. Catalog operation: get_vendor_credits_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: ["vendors: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.