Ramp: Update a bill
Ramp bill.patchBillResource: arguments, response, policy and SDK examples.
← Bill operations · Get started
Operation ramp.patch_bill_resource
Provider route: PATCH /developer/v1/bills/{bill_id}. 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["bill"]["patchBillResource"]>[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.bill.patchBillResource(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.bill.patch_bill_resource(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.bill_id | string | Required within parent | |
body | Model | Required within parent | Expand Update a bill — request body — body |
Referenced models: Update a bill — request body — body
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 Hold Bill — response body |
Referenced models: Hold Bill — response body
Schemas
Section titled “Schemas”17 more schemas are linked from the tables above, on the schema pages.
Update a bill — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
accounting_field_selections | array | Optional | List of accounting field options selected to code the bill. |
accounting_field_selections[] | Model | Each item | Expand Create a bill — request body — body accounting field selections item |
due_at | string | Optional | Due date of the bill. Format: date |
entity_id | string | Optional | Associated business entity. Format: uuid |
inventory_line_items | JSON | Optional | |
inventory_line_items (anyOf 1) | array | Alternative | List of inventory line items associated with the bill. When provided, this will replace all existing inventory line items. |
inventory_line_items (anyOf 1)[] | Model | Each item | Expand Update a bill — request body — body inventory line items array item |
inventory_line_items (anyOf 2) | null | Alternative | |
invoice_number | string | Optional | The invoice number on the bill. Maximum length: 84 |
issued_at | string | Optional | Issued date of the bill. Format: date |
line_items | JSON | Optional | |
line_items (anyOf 1) | array | Alternative | List of line items related to the bill. When provided, this will replace all existing line items. |
line_items (anyOf 1)[] | Model | Each item | Expand Update a bill — request body — body line items array item |
line_items (anyOf 2) | null | Alternative | |
memo | JSON | Optional | |
memo (anyOf 1) | string | Alternative | Memo of the bill. Maximum length: 1000 |
memo (anyOf 2) | null | Alternative | |
payment_date | JSON | Optional | |
payment_date (anyOf 1) | string | Alternative | For non-card payment methods, the date the payment is scheduled to be initiated. If the requested date is unavailable, such as a weekend, bank holiday, past date, or same-day cutoff miss, Ramp schedules the payment for the next available initiation date. Set to null to unschedule the payment. Format: date |
payment_date (anyOf 2) | null | Alternative | |
payment_method | string | Optional | Payment method of the bill. One of: ACH, CARD, CHECK, CRYPTO_WALLET_TRANSFER, DOMESTIC_WIRE, INTERNATIONAL, LOCAL_BANK_TRANSFER, ONE_TIME_CARD, ONE_TIME_CARD_DELIVERY, PAID_MANUALLY, SWIFT |
posting_date | JSON | Optional | |
posting_date (anyOf 1) | string | Alternative | The date the bill is posted to the accounting system. Format: date |
posting_date (anyOf 2) | null | Alternative | |
purchase_order_ids | array | Optional | Unique identifiers of the purchase orders to match this bill to. When provided, this will replace all existing linked purchase orders. |
purchase_order_ids[] | string | Each item | Format: uuid |
remote_id | JSON | Optional | |
remote_id (anyOf 1) | string | Alternative | An ID that identifies the bill on client's side. |
remote_id (anyOf 2) | null | Alternative | |
vendor_contact_id | string | Optional | Unique identifier of vendor contact, must be associated with passed vendor. Format: uuid |
vendor_id | string | Optional | Unique identifier of bill vendor. Format: uuid |
vendor_memo | JSON | Optional | |
vendor_memo (anyOf 1) | string | Alternative | Memo to the vendor. Maximum length: 400 |
vendor_memo (anyOf 2) | null | Alternative |
Referenced models: Create a bill — request body — body accounting field selections item, Update a bill — request body — body inventory line items array item, Update a bill — request body — body line items array item
Create a bill — request body — body accounting field selections item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
field_external_id | string | Required within parent | Remote ID of accounting field. This is the external ID, likely from ERP system. |
field_option_external_id | JSON | Optional | |
field_option_external_id (anyOf 1) | string | Alternative | Remote ID of accounting field option. This is the external ID, likely from ERP system. Required if free_form_text is not provided. Default: null |
field_option_external_id (anyOf 2) | null | Alternative | |
free_form_text | JSON | Optional | |
free_form_text (anyOf 1) | string | Alternative | Free form text for the accounting field selection. For DATE-type fields, use ISO format (YYYY-MM-DD). Required if field_option_external_id is not provided. Default: null Minimum length: 1 |
free_form_text (anyOf 2) | null | Alternative |
Update a bill — request body — body inventory line items array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
accounting_field_selections | array | Optional | |
accounting_field_selections[] | Model | Each item | Expand Create a bill — request body — body accounting field selections item |
id | JSON | Optional | |
id (anyOf 1) | string | Alternative | Unique identifier of an existing inventory line item on this bill. When provided, the updated line keeps this identifier; when omitted, a new identifier is assigned. Default: null Format: uuid |
id (anyOf 2) | null | Alternative | |
memo | JSON | Optional | |
memo (anyOf 1) | string | Alternative | Default: null |
memo (anyOf 2) | null | Alternative | |
purchase_order_line_item_id | JSON | Optional | |
purchase_order_line_item_id (anyOf 1) | string | Alternative | Unique identifier of the purchase order line item to match this bill inventory line item to. Default: null Format: uuid |
purchase_order_line_item_id (anyOf 2) | null | Alternative | |
quantity | JSON | Required within parent | Minimum: 0 |
quantity (oneOf 1) | string | Alternative | Format: decimal |
quantity (oneOf 2) | number | Alternative | |
unit_price | JSON | Required within parent | |
unit_price (oneOf 1) | string | Alternative | Format: decimal |
unit_price (oneOf 2) | number | Alternative |
Referenced models: Create a bill — request body — body accounting field selections item
Update a bill — request body — body line items array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
accounting_field_selections | array | Optional | |
accounting_field_selections[] | Model | Each item | Expand Create a bill — request body — body accounting field selections item |
amount | JSON | Required within parent | |
amount (oneOf 1) | string | Alternative | Format: decimal |
amount (oneOf 2) | number | Alternative | |
id | JSON | Optional | |
id (anyOf 1) | string | Alternative | Unique identifier of an existing line item on this bill. When provided, the updated line keeps this identifier; when omitted, a new identifier is assigned. Default: null Format: uuid |
id (anyOf 2) | null | Alternative | |
memo | JSON | Optional | |
memo (anyOf 1) | string | Alternative | Default: null |
memo (anyOf 2) | null | Alternative | |
purchase_order_line_item_id | JSON | Optional | |
purchase_order_line_item_id (anyOf 1) | string | Alternative | Unique identifier of the purchase order line item to match this bill line item to. Default: null Format: uuid |
purchase_order_line_item_id (anyOf 2) | null | Alternative |
Referenced models: Create a bill — request body — body accounting field selections item
Hold Bill — response body — bill owner
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
first_name | string | Optional | Bill owner's first name. |
id | string | Required within parent | Bill owner's ID. Format: uuid |
last_name | string | Optional | Bill owner's last name. |
Hold Bill — response body — accounting field selections item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
category_info | Model | Required within parent | Expand Hold Bill — response body — accounting field selections item category info information about the accounting category (or accounting field). |
display_name | JSON | Required within parent | |
display_name (anyOf 1) | string | Alternative | Customer-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) | null | Alternative | |
external_code | JSON | Optional | |
external_code (anyOf 1) | string | Alternative | external code of accounting field option; Code field displayed on the ERP. |
external_code (anyOf 2) | null | Alternative | |
external_id | string | Required within parent | external id of accounting field option; It should uniquely identify an accounting field option on the client end. |
id | string | Required within parent | ID that uniquely identifies an accounting field option within Ramp |
name | string | Required within parent | name of accounting field option |
provider_name | JSON | Required within parent | |
provider_name (anyOf 1) | string | Alternative | Name of the accounting provider Read only: true |
provider_name (anyOf 2) | null | Alternative |
Referenced models: Hold Bill — response body — accounting field selections item category info
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: ramp.patch_bill_resource. Catalog operation: patch_bill_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: ["bills:write"]