Ramp: Unlink purchase orders or documents from a vendor agreement
Ramp vendor.deleteVendorAgreementUnlinkResource: arguments, response, policy and SDK examples.
← Vendor operations · Get started
Operation ramp.delete_vendor_agreement_unlink_resource
Provider route: DELETE /developer/v1/vendors/agreements/{agreement_id}/unlink. 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["vendor"]["deleteVendorAgreementUnlinkResource"]>[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.deleteVendorAgreementUnlinkResource(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.vendor.delete_vendor_agreement_unlink_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.agreement_id | string | Required within parent | |
body | Model | Required within parent | Expand Unlink purchase orders or documents from a vendor agreement — request body — body |
Referenced models: Unlink purchase orders or documents from a vendor agreement — 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 Unlink purchase orders or documents from a vendor agreement — response body |
Referenced models: Unlink purchase orders or documents from a vendor agreement — response body
Schemas
Section titled “Schemas”42 more schemas are linked from the tables above, on the schema pages.
Unlink purchase orders or documents from a vendor agreement — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
documents | array | Optional | Existing documents to unlink from the agreement. |
documents[] | Model | Each item | Expand Link purchase orders or documents to a vendor agreement — request body — body documents item |
purchase_order_ids | array | Optional | Unique identifiers of purchase orders to unlink from the agreement. |
purchase_order_ids[] | string | Each item |
Referenced models: Link purchase orders or documents to a vendor agreement — request body — body documents item
Unlink purchase orders or documents from a vendor agreement — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
agreement | Model | Required within parent | Expand Fetch a vendor agreement — response body |
number_of_documents_unlinked | JSON | Required within parent | |
number_of_documents_unlinked (anyOf 1) | integer | Alternative | Number of documents unlinked from the agreement. |
number_of_documents_unlinked (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
number_of_purchase_orders_unlinked | JSON | Required within parent | |
number_of_purchase_orders_unlinked (anyOf 1) | integer | Alternative | Number of purchase orders unlinked from the agreement. |
number_of_purchase_orders_unlinked (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Fetch a vendor agreement — response body
Link purchase orders or documents to a vendor agreement — request body — body documents item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | discriminator: {"mapping": {"CUSTOM_FORM_FILE": "#/components/schemas/ApiVendorAgreementCustomFormFileLinkInputRequestBody", "PAYEE_DOCUMENT": "#/components/schemas/ApiVendorAgreementPayeeDocumentLinkInputRequestBody", "SPEND_REQUEST_DOCUMENT": "#/components/schemas/ApiVendorAgreementSpendRequestDocumentLinkInputRequestBody"}, "propertyName": "type"} |
$ (oneOf 1) | Model | Alternative | Expand Link purchase orders or documents to a vendor agreement — request body — body documents item type CUSTOM FORM FILE |
$ (oneOf 2) | Model | Alternative | Expand Link purchase orders or documents to a vendor agreement — request body — body documents item type PAYEE DOCUMENT |
$ (oneOf 3) | Model | Alternative | Expand Link purchase orders or documents to a vendor agreement — request body — body documents item type SPEND REQUEST DOCUMENT |
Referenced models: Link purchase orders or documents to a vendor agreement — request body — body documents item type CUSTOM FORM FILE, Link purchase orders or documents to a vendor agreement — request body — body documents item type PAYEE DOCUMENT, Link purchase orders or documents to a vendor agreement — request body — body documents item type SPEND REQUEST DOCUMENT
Link purchase orders or documents to a vendor agreement — request body — body documents item type CUSTOM FORM FILE
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
id | string | Required within parent | Unique identifier of the document or file to link. Format: uuid |
type | string | Optional | Document source type. Must equal: CUSTOM_FORM_FILE |
Link purchase orders or documents to a vendor agreement — request body — body documents item type PAYEE DOCUMENT
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
id | string | Required within parent | Unique identifier of the document or file to link. Format: uuid |
type | string | Optional | Document source type. Must equal: PAYEE_DOCUMENT |
Link purchase orders or documents to a vendor agreement — request body — body documents item type SPEND REQUEST DOCUMENT
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
id | string | Required within parent | Unique identifier of the document or file to link. Format: uuid |
type | string | Optional | Document source type. Must equal: SPEND_REQUEST_DOCUMENT |
Fetch a vendor agreement — response body — contract owners item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
email | string | Required within parent | |
first_name | string | Required within parent | |
full_name | string | Required within parent | |
id | string | Required within parent | Format: uuid |
last_name | string | Required within parent | |
profile_picture_url | JSON | Optional | |
profile_picture_url (anyOf 1) | string | Alternative | |
profile_picture_url (anyOf 2) | null | Alternative |
Fetch a vendor agreement — response body — latest rejected renewal request can view, id, reason, rejected at, unified request id, user full name
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
can_view | boolean | Required within parent | Whether the current user has permission to view this request. |
id | string | Required within parent | Format: uuid |
reason | JSON | Required within parent | |
reason (anyOf 1) | string | Alternative | Reason provided for rejecting the renewal request. Default: null |
reason (anyOf 2) | null | Alternative | |
rejected_at | JSON | Required within parent | |
rejected_at (anyOf 1) | string | Alternative | Date when the renewal request was rejected. Default: null Format: date |
rejected_at (anyOf 2) | null | Alternative | |
unified_request_id | string | Required within parent | Format: uuid |
user_full_name | string | Required within parent | Full name of the user who submitted the renewal request. |
Fetch a vendor agreement — response body — days remaining
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
end_date_used | JSON | Optional | |
end_date_used (anyOf 1) | string | Alternative | Known values: END_DATE, LAST_DATE_TO_TERMINATE |
end_date_used (anyOf 2) | null | Alternative | |
is_expired | JSON | Optional | |
is_expired (anyOf 1) | boolean | Alternative | |
is_expired (anyOf 2) | null | Alternative | |
is_overdue | JSON | Optional | |
is_overdue (anyOf 1) | boolean | Alternative | |
is_overdue (anyOf 2) | null | Alternative | |
num_days_until_end | JSON | Optional | |
num_days_until_end (anyOf 1) | JSON | Alternative | |
num_days_until_end (anyOf 1) (anyOf 1) | integer | Alternative | |
num_days_until_end (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
num_days_until_end (anyOf 2) | null | Alternative |
Fetch a vendor agreement — response body — draft spend requests item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
id | string | Required within parent | Format: uuid |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | |
name (anyOf 2) | null | Alternative | |
source | string | Required within parent | Known values: EXPANSION_REQUEST, RENEWAL, REQUEST_APPROVAL, REQUEST_LINKED_TO_AGREEMENT |
total_amount | JSON | Optional | |
total_amount (anyOf 1) | string | Alternative | |
total_amount (anyOf 2) | null | Alternative | |
unified_request_id | string | Required within parent | Format: uuid |
updated_at | JSON | Optional | |
updated_at (anyOf 1) | string | Alternative | Format: date |
updated_at (anyOf 2) | null | Alternative |
Hold Bill — response body — amount
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | JSON | Required within parent | |
amount (anyOf 1) | integer | Alternative | the amount of money represented in the smallest denomination of the currency. For example, when the currency is USD, then the amount is expressed in cents. |
amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
currency_code | string | Required within parent | The type of currency, in ISO 4217 format. e.g. USD for US dollars Default: USD |
minor_unit_conversion_rate | JSON | Required within parent | |
minor_unit_conversion_rate (anyOf 1) | JSON | Alternative | |
minor_unit_conversion_rate (anyOf 1) (anyOf 1) | integer | Alternative | The conversion factor to convert from the integer amount to the actual currency value. Divide amount by this value to get the real currency amount. For USD, this is 100 (e.g., 12034 / 100 = 120.34 USD). See https://docs.ramp.com/developer-api/v1/monetary-values for more information. Read only: true |
minor_unit_conversion_rate (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
minor_unit_conversion_rate (anyOf 2) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: ramp.delete_vendor_agreement_unlink_resource. Catalog operation: delete_vendor_agreement_unlink_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: ["vendors:write"]