Ramp: Create a vendor agreement
Ramp vendor.postVendorAgreementCreateResource: arguments, response, policy and SDK examples.
← Vendor operations · Get started
Operation ramp.post_vendor_agreement_create_resource
Provider route: POST /developer/v1/vendors/{vendor_id}/agreements. 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"]["postVendorAgreementCreateResource"]>[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.postVendorAgreementCreateResource(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.post_vendor_agreement_create_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.vendor_id | string | Required within parent | |
body | Model | Required within parent | Expand Create a vendor agreement — request body — body |
Referenced models: Create 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 Fetch a vendor agreement — response body |
Referenced models: Fetch a vendor agreement — response body
Schemas
Section titled “Schemas”49 more schemas are linked from the tables above, on the schema pages.
Create a vendor agreement — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
auto_renewal | boolean | Required within parent | Whether the agreement automatically renews. |
contract_owner_ids | JSON | Optional | |
contract_owner_ids (anyOf 1) | array | Alternative | List of contract owner user IDs. |
contract_owner_ids (anyOf 1)[] | string | Each item | Format: uuid |
contract_owner_ids (anyOf 2) | null | Alternative | |
description | JSON | Optional | |
description (anyOf 1) | string | Alternative | Description of the vendor agreement. Default: null |
description (anyOf 2) | null | Alternative | |
end_date | JSON | Optional | |
end_date (anyOf 1) | string | Alternative | End date of the agreement. Default: null Format: date |
end_date (anyOf 2) | null | Alternative | |
last_date_to_terminate | JSON | Optional | |
last_date_to_terminate (anyOf 1) | string | Alternative | Last date by which the agreement can be terminated. Default: null Format: date |
last_date_to_terminate (anyOf 2) | null | Alternative | |
line_items | JSON | Optional | |
line_items (anyOf 1) | array | Alternative | Line items associated with the agreement. Default: null |
line_items (anyOf 1)[] | Model | Each item | Expand Create a vendor agreement — request body — body line items Line items associated with the agreement item |
line_items (anyOf 2) | null | Alternative | |
name | string | Required within parent | Name of the vendor agreement. Minimum length: 1 |
notifications_on | boolean | Required within parent | Whether notifications are enabled for this agreement. |
renewal_notification_settings | JSON | Optional | |
renewal_notification_settings (anyOf 1) | Model | Alternative | Expand Create a vendor agreement — request body — body renewal notification settings notification triggers, recipient approval group uuids, recipient dynamic user group uuids, recipient user uuids, recurring settings, scheduled enabled, should notify contract owner managers Notification settings to apply to this agreement. Default: null |
renewal_notification_settings (anyOf 2) | null | Alternative | |
start_date | string | Required within parent | Start date of the agreement. Format: date |
total_value | Model | Required within parent | Expand Create a vendor agreement — request body — body total value Total monetary value of the agreement. |
Referenced models: Create a vendor agreement — request body — body total value, Create a vendor agreement — request body — body line items Line items associated with the agreement item, Create a vendor agreement — request body — body renewal notification settings notification triggers, recipient approval group uuids, recipient dynamic user group uuids, recipient user uuids, recurring settings, scheduled enabled, should notify contract owner managers
Create a vendor agreement — request body — body total value
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | integer | Required within parent | Monetary amount in the currency's minor unit. |
currency_code | Model | Optional | Expand Edit a procurement request — request body — body currency Three-letter ISO currency code for the amount. Default: USD |
Referenced models: Edit a procurement request — request body — body currency
Create a vendor agreement — request body — body line items Line items associated with the agreement item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
discount | JSON | Optional | |
discount (anyOf 1) | JSON | Alternative | Discount applied to the line item, if any. Default: null |
discount (anyOf 1) (oneOf 1) | number | Alternative | |
discount (anyOf 1) (oneOf 2) | string | Alternative | |
discount (anyOf 2) | null | Alternative | |
price_per_unit | JSON | Required within parent | Price for a single unit in the line item. |
price_per_unit (oneOf 1) | number | Alternative | |
price_per_unit (oneOf 2) | string | Alternative | |
product_or_service_name | string | Required within parent | Name of the product or service covered by the agreement line item. |
quantity | JSON | Required within parent | Quantity of units included in the line item. |
quantity (oneOf 1) | number | Alternative | |
quantity (oneOf 2) | string | Alternative | |
term | JSON | Optional | |
term (anyOf 1) | string | Alternative | Freeform term label for the line item, if applicable. Default: null |
term (anyOf 2) | null | Alternative | |
time_unit | JSON | Optional | |
time_unit (anyOf 1) | string | Alternative | Time unit associated with the line item, if applicable. Default: null |
time_unit (anyOf 2) | null | Alternative | |
total_price | JSON | Optional | |
total_price (anyOf 1) | JSON | Alternative | Total price for the line item, if provided. Default: null |
total_price (anyOf 1) (oneOf 1) | number | Alternative | |
total_price (anyOf 1) (oneOf 2) | string | Alternative | |
total_price (anyOf 2) | null | Alternative | |
unit | JSON | Optional | |
unit (anyOf 1) | string | Alternative | Unit name for the quantity, if applicable. Default: null |
unit (anyOf 2) | null | Alternative |
Create a vendor agreement — request body — body renewal notification settings notification triggers, recipient approval group uuids, recipient dynamic user group uuids, recipient user uuids, recurring settings, scheduled enabled, should notify contract owner managers
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Complete notification configuration used by create, merge, and the developer API. Omitted or null fields take their empty/false defaults; omitted or null ``recurring_settings`` disables recurrence. Omitted or null ``scheduled_enabled`` keeps the replaced group's value (true for new groups). |
notification_triggers | JSON | Optional | |
notification_triggers (anyOf 1) | array | Alternative | Default: null |
notification_triggers (anyOf 1)[] | Model | Each item | Expand Create a vendor agreement — request body — body renewal notification settings notification triggers, recipient approval group uuids, recipient dynamic user group uuids, recipient user uuids, recurring settings, scheduled enabled, should notify contract owner managers notification triggers array item |
notification_triggers (anyOf 2) | null | Alternative | |
recipient_approval_group_uuids | JSON | Optional | |
recipient_approval_group_uuids (anyOf 1) | array | Alternative | Default: null |
recipient_approval_group_uuids (anyOf 1)[] | string | Each item | |
recipient_approval_group_uuids (anyOf 2) | null | Alternative | |
recipient_dynamic_user_group_uuids | JSON | Optional | |
recipient_dynamic_user_group_uuids (anyOf 1) | array | Alternative | Default: null |
recipient_dynamic_user_group_uuids (anyOf 1)[] | string | Each item | |
recipient_dynamic_user_group_uuids (anyOf 2) | null | Alternative | |
recipient_user_uuids | JSON | Optional | |
recipient_user_uuids (anyOf 1) | array | Alternative | Default: null |
recipient_user_uuids (anyOf 1)[] | string | Each item | |
recipient_user_uuids (anyOf 2) | null | Alternative | |
recurring_settings | JSON | Optional | |
recurring_settings (anyOf 1) | Model | Alternative | Expand Create a vendor agreement — request body — body renewal notification settings notification triggers, recipient approval group uuids, recipient dynamic user group uuids, recipient user uuids, recurring settings, scheduled enabled, should notify contract owner managers recurring settings Complete recurring reminder configuration Complete recurring configuration; omission or null disables recurrence. Default: null |
recurring_settings (anyOf 2) | null | Alternative | |
scheduled_enabled | JSON | Optional | |
scheduled_enabled (anyOf 1) | boolean | Alternative | Pauses scheduled reminders when false; null preserves the current value. Default: null |
scheduled_enabled (anyOf 2) | null | Alternative | |
should_notify_contract_owner_managers | boolean | Optional | Default: false |
Referenced models: Create a vendor agreement — request body — body renewal notification settings notification triggers, recipient approval group uuids, recipient dynamic user group uuids, recipient user uuids, recurring settings, scheduled enabled, should notify contract owner managers notification triggers array item, Create a vendor agreement — request body — body renewal notification settings notification triggers, recipient approval group uuids, recipient dynamic user group uuids, recipient user uuids, recurring settings, scheduled enabled, should notify contract owner managers recurring settings Complete recurring reminder configuration
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 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: ramp.post_vendor_agreement_create_resource. Catalog operation: post_vendor_agreement_create_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"]