Skip to main content
POST
Procurement

Overview

Read-only tools on a connected spend system (Connections): Ramp and Coupa. Nothing is approved, paid, archived or created; nothing fetched is kept.
  • POST /v1/tools/procurement/transactions (procurement_transactions): card and spend transactions.
  • POST /v1/tools/procurement/bills (procurement_bills): bills awaiting or past approval.
  • POST /v1/tools/procurement/suppliers (procurement_suppliers): suppliers and their spend.
All take connection_id: list your connections (GET /v1/connections or oneshot_connections_list) and pick by system and account_label. Agent tools: oneshot_procurement_transactions, oneshot_procurement_bills, oneshot_procurement_suppliers.

Customer-created clients

For Coupa, your admin creates an OAuth application under Setup > Integrations > OAuth2/OpenID Connect Clients, with Authorization Code enabled and redirect URI https://win.oneshotagent.com/v1/connections/oauth. Grant only openid, offline_access, core.invoice.read, core.supplier.read and core.expense.read; use a role limited to viewing those records. Coupa setup. Enter the instance identifier (acme for acme.coupahost.com), client ID and secret in Connect. The client id and secret are stored encrypted, used only for that connection, and deleted on revoke. Coupa transactions are expense lines. Supplier spend is null because the supplier listing does not report it.

Authentication

Requires x402 payment in the payment-signature header. Refusals for the body, the connection or an unavailable system come before payment and are not charged.

Request

Response (200)

Every page has next_cursor: send it as cursor; null on the last page. Amounts are in the currency’s major unit (dollars, not cents). Missing fields are null.
array
Each transaction: id, posted_at (when it settled, or when the card was used while pending), merchant, amount (a refund is negative), currency, card_holder, department, category, receipt_attached and source (system, id).
array
Each bill: id, vendor, amount, currency, due_on, status (awaiting_approval, approved, rejected, paid or void) and source.
array
Each supplier: id, name, category, total_spend (all-time amount and currency) and source.

Errors