Viacle API

Viacle is the commercial purchase intelligence layer between payment confirmation and ERP entry. It transforms ACH wires, commercial card transactions, freight invoices, and vendor bills into GL-coded, commodity-classified purchase objects — consistent schema, regardless of payment rail or source.

Base URL https://api.viacle.io/api/v1

All responses are JSON. All requests must include an Authorization: Bearer header. The interactive version of these docs — with live code samples, a sidebar navigator, and a schema explorer — is at viacle.io/docs.


Authentication

All API requests require a Bearer token in the Authorization header.

Every request
Authorization: Bearer vi_live_sk_your_api_key
Key Prefixes vi_live_sk_ — production  |  vi_test_sk_ — sandbox (deterministic test objects, no real documents processed)

Key Security

PropertyBehaviour
StorageSHA-256 hash only. The raw key is returned once at creation and never persisted in plaintext.
RevocationImmediate — revoked keys are rejected on the next request.
RotationPOST /api/keys/create to issue a new key, POST /api/keys/:id/revoke to invalidate the old one.
IntrospectionGET /api/v1/keys/self/permissions returns effective scopes for the calling key.

Quickstart

One API call turns a vendor invoice, card transaction, or freight bill into a structured purchase object with GL code, vendor TIN, and line-item commodity codes. Get from zero to your first purchase object in under five minutes.

Step 1 — Create a purchase from an invoice URL

POST /purchases
curl -X POST https://api.viacle.io/api/v1/purchases \
  -H "Authorization: Bearer vi_live_sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "document_url": "https://example.com/invoice.pdf",
    "reference_id": "AP-2026-00831"
  }'

Step 2 — Receive the purchase object

201 Created
{
  "id": "pur_vc_82af31",
  "object": "purchase",
  "status": "completed",
  "merchant": {
    "name": "Grainger Industrial Supply",
    "id": "mer_grngr",
    "category": "Industrial Supplies",
    "tin": "36-1165231",
    "registered_name": "W.W. Grainger, Inc."
  },
  "purchase_date": "2026-03-20",
  "amounts": { "subtotal": 2847.00, "tax": 227.76, "total": 3074.76, "currency": "USD" },
  "items": [
    {
      "name": "3M Nitrile Gloves CS",
      "quantity": 2,
      "price": 296.00,
      "sku": "GRW-7105-0232",
      "commodity_code": "46181500",
      "category": "Safety & PPE"
    },
    {
      "name": "Honeywell Respirator Half-Face",
      "quantity": 1,
      "price": 589.00,
      "sku": "GRW-8250-4120",
      "commodity_code": "46182001",
      "category": "Safety & PPE"
    }
  ],
  "expense": {
    "gl_code": "6400",
    "cost_center": "OPS-WEST",
    "approval_status": "pending_review"
  },
  "reportable_1099": false,
  "data_source": "ocr_extracted",
  "reference_id": "AP-2026-00831",
  "confidence": { "merchant": 0.99, "items": 0.94, "gl_code": 0.91 },
  "verification_url": "https://api.viacle.io/verify/pur_vc_82af31"
}

Step 3 — Retrieve it any time

GET /purchases/pur_vc_82af31
curl https://api.viacle.io/api/v1/purchases/pur_vc_82af31 \
  -H "Authorization: Bearer vi_live_sk_your_api_key"

Rate Limits

Endpoint groupDefault limitResponse on exceeded
Read endpoints (GET)200 req / min429 RATE_LIMIT_EXCEEDED
POST /purchases30 req / min429 RATE_LIMIT_EXCEEDED
Batch endpoints5 req / min429 RATE_LIMIT_EXCEEDED

The Retry-After header on a 429 response indicates when the window resets. Enterprise plans carry higher or custom limits — contact the Viacle team to discuss volume requirements.


Error Codes

All errors follow a consistent envelope: { "error_code": "...", "message": "...", "trace_id": "..." }.

HTTP statuserror_codeMeaning
400VALIDATION_ERRORRequest body failed schema validation. The message field identifies the failing field.
401UNAUTHORIZEDMissing or invalid API key.
403FORBIDDENKey is valid but lacks the required scope for this endpoint.
404NOT_FOUNDPurchase, entity, or resource does not exist under your account.
409CONFLICTDuplicate reference_id — a purchase with this reference already exists. Safe to retry with the same Idempotency-Key.
422NO_TRANSACTIONS_FOUNDDocument was processed but no extractable purchase data was found.
429RATE_LIMIT_EXCEEDEDRequest rate exceeded. Retry after the window indicated by Retry-After.
500INTERNAL_SERVER_ERRORUnexpected server error. Automatically captured and alerted. Include the trace_id when contacting support.

The Purchase Object

Every purchase processed by Viacle becomes a persistent, programmable object. The schema is deterministic: every top-level field is always present, even when the value is null. The full annotated schema with lifecycle diffs and webhook event payloads is at viacle.io/object.

id
stringrequired
Unique purchase identifier. Format: pur_vc_ followed by alphanumeric characters.
object
string
Always "purchase".
status
stringrequired
One of: pending, processing, completed, failed, reversed, refunded.
merchant
objectrequired
Normalized merchant record. Fields: id, name, category, region, tin (EIN, caller-provided — never inferred), lei (ISO 17442 Legal Entity Identifier), registered_name, registered_entity_type, registration_status, formation_date, website, logo_url.
purchase_date
stringrequired
ISO 8601 date of the purchase (YYYY-MM-DD).
amounts
objectrequired
Financial breakdown: subtotal, tax, total, currency. Currency accepts ISO 4217 fiat codes (USD, EUR, GBP) or crypto identifiers (BTC, ETH, USDC).
items
arrayrequired
Line items with name, quantity, price, sku, upc, brand, category, commodity_code (UNSPSC), manufacturer, is_alcohol, is_tobacco. Empty array when no line items are extractable.
expense
object
GL coding and approval state: gl_code, cost_center, department, project_code, approval_status (pending_review | approved | rejected | reimbursed), approved_by, approved_at.
payment_method
object
Payment instrument: type (card, ach, wire, check, crypto, fleet), last_four, bin. Full card numbers are never accepted or stored.
data_source
stringrequired
Provenance of line items. One of: merchant_push (audit-grade), e_invoice (PEPPOL/EDI mandate — equivalent trust), ocr_extracted (PDF/image extraction), enriched (transaction-level only, no line items). Used by AP teams and AI agents to assess evidence weight.
confidence
objectrequired
Per-field confidence scores 0.0–1.0: merchant, items, gl_code. Includes a detail sub-object with scores for individual fields. Fields below 0.5 should be treated as provisional.
reportable_1099
booleanrequired
True when this purchase counts toward the vendor's 1099 reportability threshold for the tax year. Aggregated by GET /entities/:id/tax-summary.
reference_id
string
Your internal reference ID passed at creation (e.g. AP reference number, PO number). Indexed — use GET /purchases?reference_id= to look up by your reference.
entity_id
string
The entity (vendor, customer, or counterparty) this purchase is linked to. Used for entity-level analytics, spend summaries, and 1099 aggregation.
freight_metadata
object
Freight-specific fields when the purchase is a carrier invoice: pro_number, bill_of_lading, carrier_scac, mode, origin, destination, base_freight_amount, fuel_surcharge_amount, pod_confirmed. Populated by the EDI 210/214 and freight-platform connectors.
verification_url
stringrequired
Public URL to verify this purchase record without an API key. Suitable for sharing with auditors or counterparties.
created
integerrequired
Unix timestamp of object creation.

Create Purchase POST /purchases

Create a purchase object from a document URL, structured transaction metadata, or raw text. Returns the complete purchase object synchronously for most requests; large PDFs trigger an async extraction job and return status: "processing".

POST https://api.viacle.io/api/v1/purchases
// From a document URL
{
  "document_url": "https://your-domain.com/invoices/INV-2026-0041.pdf",
  "reference_id":  "AP-2026-00831",
  "entity_id":     "ent_acme_corp"
}

// From structured transaction metadata
{
  "merchant_name": "WEX Fleet Services",
  "total":         1847.30,
  "currency":      "USD",
  "purchase_date": "2026-03-20",
  "payment_method": { "type": "fleet", "last_four": "4421" },
  "reference_id":  "TXN-88321"
}

// AP invoice ingest (alternate endpoint — see below)
POST /purchases/ingest
{
  "vendor_name":   "Turner Mechanical LLC",
  "invoice_number":"INV-TM-0441",
  "po_number":     "PO-2026-0814",
  "line_items": [
    { "description": "HVAC Ductwork Zone B", "amount": 18400.00, "quantity": 1 }
  ],
  "total": 18400.00,
  "currency": "USD"
}
FieldTypeDescription
document_urlstringPublicly accessible PDF or image URL. Viacle fetches and extracts line items, merchant, and amounts.
raw_textstringPlain-text invoice content (EDI, XML, CSV). Mutually exclusive with document_url.
merchant_namestringVendor name. Used when submitting structured transaction data rather than a document.
totalnumberTransaction total in major currency units (e.g. 1847.30 for $1,847.30).
currencystringISO 4217 currency code. Defaults to USD.
purchase_datestringISO 8601 date (YYYY-MM-DD).
reference_idstringYour AP reference number, PO number, or transaction ID. Stored and indexed.
entity_idstringEntity to link this purchase to for aggregation and spend analytics.
line_itemsarrayPre-structured line items. Each item: description, amount, quantity, sku, commodity_code.

AP Invoice Ingest POST /purchases/ingest

AP-workflow-focused alternative to POST /purchases. Accepts vendor name, line items, PO reference, and payment terms using vocabulary AP teams already use. Returns the normalized purchase object with a commercial block and an ingest_summary envelope covering GL assignment, match status, and data completeness.

When to use Use /purchases/ingest when you have structured AP data (vendor name, invoice number, PO reference, line items) and want the response shaped for an AP workflow. Use POST /purchases for document URL extraction or raw transaction enrichment.

Get Purchase GET /purchases/:id

GET https://api.viacle.io/api/v1/purchases/{id}
curl https://api.viacle.io/api/v1/purchases/pur_vc_82af31 \
  -H "Authorization: Bearer vi_live_sk_your_api_key"

Returns the full purchase object. Also accepts GET /purchases?reference_id=AP-2026-00831 to look up by your reference ID.


List Purchases GET /purchases

Returns a paginated list of purchases. Query parameters:

ParameterTypeDescription
reference_idstringExact match on your reference ID.
entity_idstringFilter by entity.
sinceintegerUnix timestamp. Returns purchases created after this time.
untilintegerUnix timestamp. Returns purchases created before this time.
statusstringFilter by purchase status.
rail_sourcestringFilter by payment rail: card, ach, wire, freight, edi, crypto, fleet, check.
localestringFilter by BCP 47 locale (e.g. en-US, de-DE).
limitintegerResults per page. Default 25, max 100.
offsetintegerPagination offset.

Update Purchase PATCH /purchases/:id

Update mutable fields on an existing purchase object. Commonly used to set or update GL codes, approval status, and cost center after creation.

PATCH /purchases/pur_vc_82af31
{
  "expense": {
    "gl_code":         "6400",
    "cost_center":     "OPS-WEST",
    "approval_status": "approved",
    "approved_by":     "jane.doe@company.com"
  }
}

Patchable fields: merchant_name, purchase_date, total, items, expense (entire block), entity_id, reference_id, locale, receipt_medium. Patching emits a purchase.updated webhook event.


Delete Purchase DELETE /purchases/:id

Soft-deletes a purchase record. The object is removed from all list and query endpoints immediately. Per-key data retention policy determines when the record is permanently purged. Requires the purchases:write scope.



Complete Endpoint Reference

This inventory is generated directly from /openapi.json. It contains 178 documented operations across 142 paths. The machine-readable contract is authoritative for methods, request schemas, response codes, and required scopes.

GET /commercial-cases List disclosure-safe Commercial Cases · Commercial Cases · exposure: core · scopes: BearerAuth, BearerAuth, BearerAuth · responses: 200, 400, 401, 403
GET /commercial-cases/projections/{projectionKey} Get Commercial Case projection status · Commercial Cases · exposure: core · scopes: BearerAuth, BearerAuth, BearerAuth · responses: 200, 400, 404
POST /commercial-cases/projections/{projectionKey}/retry Retry a Commercial Case projection · Commercial Cases · exposure: core · scopes: BearerAuth, BearerAuth · responses: 202, 400, 404
GET /commercial-cases/{caseId} Get a disclosure-safe Commercial Case · Commercial Cases · exposure: core · scopes: BearerAuth, BearerAuth, BearerAuth · responses: 200, 400, 404
GET /commercial-cases/{caseId}/ppr Generate an authorized Portable Purchase Record · Commercial Cases · exposure: core · scopes: BearerAuth, BearerAuth, BearerAuth · responses: 200, 404, 406, 422
GET /commercial-cases/{caseId}/objects List safe case objects · Commercial Cases · exposure: core · scopes: BearerAuth, BearerAuth, BearerAuth · responses: 200, 404
GET /commercial-cases/{caseId}/assertions List disclosure-safe case assertions · Commercial Cases · exposure: core · scopes: BearerAuth, BearerAuth, BearerAuth · responses: 200, 404
GET /commercial-cases/{caseId}/links List case links · Commercial Cases · exposure: core · scopes: BearerAuth, BearerAuth, BearerAuth · responses: 200, 404
GET /commercial-cases/{caseId}/allocations List case allocations · Commercial Cases · exposure: core · scopes: BearerAuth, BearerAuth, BearerAuth · responses: 200, 404
GET /commercial-cases/{caseId}/decisions List case decisions · Commercial Cases · exposure: core · scopes: BearerAuth, BearerAuth, BearerAuth · responses: 200, 404
POST /commercial-cases/{caseId}/decisions Append an auditable case decision · Commercial Cases · exposure: core · body: CommercialCaseDecisionRequest · scopes: BearerAuth, BearerAuth · responses: 201, 400, 404, 409
GET /commercial-cases/{caseId}/conflicts List unresolved disclosure-safe conflicts · Commercial Cases · exposure: core · scopes: BearerAuth, BearerAuth, BearerAuth · responses: 200, 400, 401, 403, 404
GET /commercial-cases/{caseId}/timeline List the deterministic disclosure-safe timeline · Commercial Cases · exposure: core · scopes: BearerAuth, BearerAuth, BearerAuth · responses: 200, 400, 401, 403, 404
GET /commercial-cases/{caseId}/banking-ledger-context Get safe banking ledger context · Commercial Cases · exposure: core · scopes: BearerAuth, BearerAuth, BearerAuth · responses: 200, 404
POST /purchases/{purchaseId}/project-commercial-case Project a purchase into a Commercial Case · Commercial Cases · exposure: core · scopes: BearerAuth, BearerAuth · responses: 202, 400, 404
POST /airwallex-delivery-configurations Create a credential-free Airwallex delivery configuration · Airwallex Deliveries · exposure: partner-only · body: AirwallexDeliveryConfigurationCreate · scopes: BearerAuth · responses: 201, 400, 409
PATCH /airwallex-delivery-configurations/{configurationId} Update a credential-free Airwallex delivery configuration · Airwallex Deliveries · exposure: partner-only · body: AirwallexDeliveryConfigurationUpdate · scopes: BearerAuth · responses: 200, 400, 404
POST /airwallex-delivery-configurations/{configurationId}/validate Check Airwallex live-acceptance availability · Airwallex Deliveries · exposure: partner-only · scopes: BearerAuth · responses: 404, 409, 503
POST /airwallex-deliveries Queue an Airwallex Commercial Case delivery · Airwallex Deliveries · exposure: partner-only · body: AirwallexDeliveryRequest · scopes: BearerAuth · responses: 202, 400, 404, 409
GET /airwallex-deliveries/{deliveryId} Get an Airwallex delivery · Airwallex Deliveries · exposure: partner-only · scopes: BearerAuth · responses: 200, 404
POST /airwallex-deliveries/{deliveryId}/correct Queue a corrected Airwallex delivery · Airwallex Deliveries · exposure: partner-only · body: AirwallexSuccessorRequest · scopes: BearerAuth · responses: 202, 400, 404, 409
POST /airwallex-deliveries/{deliveryId}/revoke Queue an Airwallex delivery revocation · Airwallex Deliveries · exposure: partner-only · body: AirwallexSuccessorRequest · scopes: BearerAuth · responses: 202, 400, 404, 409
POST /commercial-events Create or incrementally enrich a Commercial Event · Commercial Events · exposure: core · body: CommercialEventIngest · scopes: BearerAuth · responses: 200, 201, 409
POST /exceptions/{id}/assignment Assign an AP exception · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 404
POST /exceptions/{id}/due-date Set AP exception due date · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 404
POST /exceptions/{id}/evidence-requests Queue a secure evidence request · Commercial · exposure: projection · scopes: BearerAuth · responses: 201, 404, 503
GET /exceptions List AP exception cases · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 401, 403
POST /exceptions Create an AP exception case · Commercial · exposure: projection · scopes: BearerAuth · responses: 201, 400
GET /exceptions/{id} Get a safe AP exception case detail · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 404
POST /exceptions/{id}/decisions Record an exception decision · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 404
POST /exceptions/{id}/comments Add an internal exception comment · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 404
POST /exceptions/{id}/override Override an AP exception · Commercial · exposure: projection · scopes: BearerAuth · responses: 403
GET /exceptions/{id}/evidence Retrieve a redacted exception evidence bundle · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 404
GET /exceptions/{id}/delivery-attempts List safe exception delivery attempt statuses · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 403
GET /commercial-events/{id} Retrieve the canonical Commercial Event · Commercial Events · exposure: core · scopes: BearerAuth · responses: 200, 404
POST /commercial-events/{id}/relationships/{relationshipId} Confirm or reject a proposed relationship · Commercial Events · exposure: core · body: CommercialEventRelationshipDecision · scopes: BearerAuth · responses: 200, 404, 409
POST /commercial-events/{id}/relationships Propose a reviewable payment relationship · Commercial Events · exposure: core · body: CommercialEventRelationshipProposal · scopes: BearerAuth · responses: 200, 201, 404, 409
POST /commercial-events/{id}/actions Append an auditable Commercial Event action · Commercial Events · exposure: core · body: CommercialEventContextAppend · scopes: BearerAuth · responses: 200, 201, 409
POST /commercial-events/{id}/outcomes Append an auditable Commercial Event outcome · Commercial Events · exposure: core · body: CommercialEventContextAppend · scopes: BearerAuth · responses: 200, 201, 409
POST /commercial-events/{id}/reproject Rebuild the deterministic projection from stored evidence · Commercial Events · exposure: core · scopes: BearerAuth · responses: 200, 404
GET /commercial-events/{id}/shares List active shares for one Commercial Event · Commercial Events · exposure: core · scopes: BearerAuth · responses: 200, 404
POST /commercial-events/{id}/shares Share one Commercial Event with another API key · Commercial Events · exposure: core · body: CommercialEventShareRequest · scopes: BearerAuth · responses: 201, 404
DELETE /commercial-events/{id}/shares/{grantId} Revoke a Commercial Event share · Commercial Events · exposure: core · scopes: BearerAuth · responses: 200, 404
POST /ingest/freight-load Ingest a freight load-close event and audit its invoice · Connectors · exposure: core · scopes: BearerAuth · responses: 200, 400, 401, 403
GET /purchases List purchases · Purchases · exposure: core · scopes: BearerAuth · responses: 200, 401, 403
POST /purchases Create a purchase · Purchases · exposure: core · body: CreatePurchase · scopes: BearerAuth · responses: 201, 400, 401, 403, 429
POST /purchases/batch Batch create up to 100 purchases · Purchases · exposure: core · scopes: BearerAuth · responses: 207, 400
GET /purchases/{id} Get a purchase · Purchases · exposure: core · scopes: BearerAuth · responses: 200, 404
PATCH /purchases/{id} Update a purchase · Purchases · exposure: core · scopes: BearerAuth · responses: 200, 400, 404
DELETE /purchases/{id} Delete a purchase · Purchases · exposure: core · scopes: BearerAuth · responses: 200, 404
POST /purchases/{id}/approve Approve an expense purchase · Purchases · exposure: core · scopes: BearerAuth · responses: 200, 404
POST /purchases/{id}/reject Reject an expense purchase · Purchases · exposure: core · scopes: BearerAuth · responses: 200, 404
POST /purchases/{id}/reimburse Mark an approved expense as reimbursed · Purchases · exposure: core · scopes: BearerAuth · responses: 200, 404, 422
POST /purchases/{id}/unify Trigger merchant unification for a purchase · Purchases · exposure: core · scopes: BearerAuth · responses: 200
GET /purchases/{id}/events List events on a purchase · Purchases · exposure: core · scopes: BearerAuth · responses: 200
POST /purchases/{id}/events Append a custom event to a purchase · Purchases · exposure: core · scopes: BearerAuth · responses: 201
GET /purchases/{id}/lifecycle List post-delivery lifecycle events · Purchases · exposure: core · scopes: BearerAuth · responses: 200, 404
POST /purchases/{id}/lifecycle Append a post-delivery lifecycle event · Purchases · exposure: core · body: CreatePostDeliveryLifecycleEvent · scopes: BearerAuth · responses: 201, 400, 404, 409
GET /purchases/{id}/provenance Retrieve field-level Purchase Object provenance · Purchases · exposure: core · scopes: BearerAuth · responses: 200, 404
GET /purchases/{id}/corrections List immutable Purchase Object corrections · Purchases · exposure: core · scopes: BearerAuth · responses: 200, 404
POST /purchases/{id}/corrections Append an immutable field correction · Purchases · exposure: core · scopes: BearerAuth · responses: 201, 400, 404
GET /entities List entities · Entities · exposure: core · scopes: BearerAuth · responses: 200
POST /entities Create or merge an entity · Entities · exposure: core · body: CreateEntity · scopes: BearerAuth · responses: 201
GET /entities/{entityId} Get an entity · Entities · exposure: core · scopes: BearerAuth · responses: 200, 404
PATCH /entities/{entityId} Update an entity · Entities · exposure: core · body: CreateEntity · scopes: BearerAuth · responses: 200
GET /entities/{entityId}/purchases List purchases for an entity · Entities · exposure: core · scopes: BearerAuth · responses: 200
GET /entities/{entityId}/ownership Ownership records for an entity · Entities, Ownership · exposure: core · scopes: BearerAuth · responses: 200
GET /entities/{entityId}/intelligence/summary Entity intelligence summary · Intelligence, Entities · exposure: experimental · scopes: BearerAuth · responses: 200, 401, 403
GET /entities/{entityId}/summary Spend summary for an entity · Entities · exposure: core · scopes: BearerAuth · responses: 200
GET /entities/{entityId}/tax-summary TIN-scoped vendor totals by tax year · Tax, Entities · exposure: vertical-adapter · scopes: BearerAuth · responses: 200
GET /entities/{entityId}/recurring-merchants Detect recurring merchant spending patterns · Tax, Entities · exposure: vertical-adapter · scopes: BearerAuth · responses: 200
GET /entities/{entityId}/insurance-claim-summary Insurance claim summary for an entity · Insurance, Entities · exposure: vertical-adapter · scopes: BearerAuth · responses: 200, 404
GET /purchases/{id}/insurance-claim Get insurance claim metadata and readiness score · Insurance, Purchases · exposure: vertical-adapter · scopes: BearerAuth · responses: 200, 404
PATCH /purchases/{id}/insurance-claim Attach or update insurance claim metadata · Insurance, Purchases · exposure: vertical-adapter · scopes: BearerAuth · responses: 200, 400, 404
PATCH /purchases/{id}/binding-receipt Attach binding receipt metadata · Insurance, Purchases · exposure: vertical-adapter · scopes: BearerAuth · responses: 200, 400, 404
POST /purchases/{id}/insurance-proceeds-tax Classify insurance proceeds taxability · Insurance, Tax · exposure: vertical-adapter · scopes: BearerAuth · responses: 200, 404, 422
PATCH /entities/{entityId}/kyc Update KYC status for an entity · Entities · exposure: core · scopes: BearerAuth · responses: 200
POST /expenses/mileage Record a mileage reimbursement expense · Expenses · exposure: experimental · scopes: BearerAuth · responses: 201, 400
POST /expenses/per-diem Record a per-diem travel expense · Expenses · exposure: experimental · scopes: BearerAuth · responses: 201, 400
GET /policies List expense policies · Policies · exposure: experimental · scopes: BearerAuth · responses: 200
POST /policies Create an expense policy · Policies · exposure: experimental · body: CreatePolicy · scopes: BearerAuth · responses: 201
GET /policies/{id} Get a policy · Policies · exposure: experimental · scopes: BearerAuth · responses: 200, 404
PUT /policies/{id} Update a policy · Policies · exposure: experimental · body: CreatePolicy · scopes: BearerAuth · responses: 200
DELETE /policies/{id} Delete a policy · Policies · exposure: experimental · scopes: BearerAuth · responses: 200
GET /webhooks/endpoints List webhook endpoints · Webhooks · exposure: core · scopes: BearerAuth · responses: 200
POST /webhooks/endpoints Create a webhook endpoint · Webhooks · exposure: core · scopes: BearerAuth · responses: 201
GET /webhooks/endpoints/{id} Get a webhook endpoint · Webhooks · exposure: core · scopes: BearerAuth · responses: 200
PUT /webhooks/endpoints/{id} Update a webhook endpoint · Webhooks · exposure: core · scopes: BearerAuth · responses: 200
DELETE /webhooks/endpoints/{id} Delete a webhook endpoint · Webhooks · exposure: core · scopes: BearerAuth · responses: 200
POST /webhooks/endpoints/{id}/enable Enable a webhook endpoint · Webhooks · exposure: core · scopes: BearerAuth · responses: 200
POST /webhooks/endpoints/{id}/disable Disable a webhook endpoint · Webhooks · exposure: core · scopes: BearerAuth · responses: 200
POST /webhooks/endpoints/{id}/test Send a test event to a webhook endpoint · Webhooks · exposure: core · scopes: BearerAuth · responses: 200
GET /webhooks/endpoints/{id}/events List events for a webhook endpoint · Webhooks · exposure: core · scopes: BearerAuth · responses: 200
GET /webhooks/endpoints/{id}/deliveries List delivery attempts for a webhook endpoint · Webhooks · exposure: core · scopes: BearerAuth · responses: 200
GET /webhook-events List all webhook events (event log) · Webhooks · exposure: core · scopes: BearerAuth · responses: 200
GET /connectors/available List all available connector types (no auth) · Connectors · exposure: core · responses: 200
GET /connectors List configured connectors · Connectors · exposure: core · scopes: BearerAuth · responses: 200
POST /connectors Create a connector · Connectors · exposure: core · scopes: BearerAuth · responses: 201
GET /connectors/{id} Get a connector · Connectors · exposure: core · scopes: BearerAuth · responses: 200
PATCH /connectors/{id} Update a connector · Connectors · exposure: core · scopes: BearerAuth · responses: 200
DELETE /connectors/{id} Delete a connector · Connectors · exposure: core · scopes: BearerAuth · responses: 200
POST /connectors/{id}/test Test connector credentials · Connectors · exposure: core · scopes: BearerAuth · responses: 200
POST /connectors/{id}/sync Trigger a manual sync · Connectors · exposure: core · scopes: BearerAuth · responses: 200
GET /connectors/{id}/logs Get sync logs for a connector · Connectors · exposure: core · scopes: BearerAuth · responses: 200
GET /graph/merchants List merchants in the global purchase graph · Merchants · exposure: core · scopes: BearerAuth · responses: 200
GET /graph/merchants/{id} Get a merchant · Merchants · exposure: core · scopes: BearerAuth · responses: 200
GET /graph/products List products in the global purchase graph · Products · exposure: core · scopes: BearerAuth · responses: 200
GET /graph/products/{id} Get a product · Products · exposure: core · scopes: BearerAuth · responses: 200
GET /ownership List ownership records · Ownership · exposure: core · scopes: BearerAuth · responses: 200
GET /ownership/{id} Get an ownership record · Ownership · exposure: core · scopes: BearerAuth · responses: 200
GET /fdx/consents List FDX consents · FDX · exposure: projection · scopes: BearerAuth · responses: 200
POST /fdx/consents Create an FDX consent · FDX · exposure: projection · scopes: BearerAuth · responses: 201
GET /fdx/consents/{consentId} Get an FDX consent · FDX · exposure: projection · scopes: BearerAuth · responses: 200
DELETE /fdx/consents/{consentId} Revoke an FDX consent · FDX · exposure: projection · scopes: BearerAuth · responses: 200
GET /fdx/accounts List FDX accounts · FDX · exposure: projection · scopes: BearerAuth · responses: 200
POST /fdx/accounts Register an FDX account · FDX · exposure: projection · scopes: BearerAuth · responses: 201
GET /fdx/accounts/{accountId}/transactions List transactions for an FDX account · FDX · exposure: projection · scopes: BearerAuth · responses: 200
POST /fdx/accounts/{accountId}/transactions Ingest a transaction for an FDX account · FDX · exposure: projection · scopes: BearerAuth · responses: 201
GET /fdx/transactions/{transactionId} Get an FDX transaction · FDX · exposure: projection · scopes: BearerAuth · responses: 200
POST /fdx/transactions/{transactionId}/pair Pair an FDX transaction to a purchase · FDX · exposure: projection · scopes: BearerAuth · responses: 200
DELETE /fdx/transactions/{transactionId}/pair Unpair an FDX transaction from a purchase · FDX · exposure: projection · scopes: BearerAuth · responses: 200
GET /fdx/tax-statements List FDX tax statements · FDX · exposure: projection · scopes: BearerAuth · responses: 200
POST /fdx/tax-statements Create an FDX tax statement · FDX · exposure: projection · scopes: BearerAuth · responses: 201
GET /purchases/{id}/compliance List compliance events for a purchase · Compliance · exposure: projection · scopes: BearerAuth · responses: 200
POST /purchases/{id}/compliance Append a compliance event to a purchase · Compliance · exposure: projection · scopes: BearerAuth · responses: 201
GET /compliance/export Export compliance events (NDJSON or CSV) · Compliance · exposure: projection · scopes: BearerAuth · responses: 200
POST /purchases/ingest AP invoice ingest — structured invoice → purchase object + commercial block · Commercial, Purchases · exposure: projection · scopes: BearerAuth · responses: 201, 400, 401, 403
POST /purchases/match Match a transaction signal to existing purchases · Matching · exposure: projection · scopes: BearerAuth · responses: 200, 400, 401, 403
POST /purchases/match/feedback Record human feedback on a suggested match · Matching · exposure: projection · scopes: BearerAuth · responses: 200, 400, 401, 403, 404
POST /payments/allocation-candidates Decompose a payment into the invoices it settles · Matching, Payments · exposure: projection · scopes: BearerAuth · responses: 200, 400, 401, 403, 404
POST /payments/allocate Persist payment-to-invoice allocations · Matching, Payments · exposure: projection · scopes: BearerAuth · responses: 200, 400, 401, 403, 404
POST /payments/allocations/{id}/confirm Confirm a proposed allocation · Matching, Payments · exposure: projection · scopes: BearerAuth · responses: 200, 401, 403, 404
POST /purchases/{id}/link Manually link an external transaction reference · Matching, Purchases · exposure: projection · scopes: BearerAuth · responses: 200, 400, 401, 403, 404
GET /purchases/{id}/intelligence Get purchase intelligence signals · Intelligence, Purchases · exposure: experimental · scopes: BearerAuth · responses: 200, 401, 403, 404
GET /purchases/{id}/return-eligible Check return eligibility for a purchase · Purchases · exposure: core · scopes: BearerAuth · responses: 200, 404
POST /purchases/{id}/receipt-link Generate a shareable receipt link · Purchases · exposure: core · scopes: BearerAuth · responses: 201, 404
GET /expenses/summary Aggregate spend by dimension · Expenses · exposure: experimental · scopes: BearerAuth · responses: 200, 400
GET /expenses/approvals Approval workflow audit trail · Expenses · exposure: experimental · scopes: BearerAuth · responses: 200
POST /tax/generate-pdf Generate a tax document PDF · Tax · exposure: vertical-adapter · scopes: BearerAuth · responses: 200, 400, 503
GET /stream Subscribe to real-time purchase events (SSE) · Streaming · exposure: core · scopes: BearerAuth · responses: 200, 401
GET /events Replay event log (polling alternative to SSE) · Streaming · exposure: core · scopes: BearerAuth · responses: 200
POST /oauth/token Issue an OAuth 2.0 access token (client credentials) · Auth · exposure: core · responses: 200, 401
POST /connectors/ingest/iso20022 Ingest an ISO 20022 XML message · Connectors · exposure: core · scopes: BearerAuth · responses: 201, 400, 401, 403
POST /connectors/ingest/fednow Ingest a FedNow payment notification · Connectors · exposure: core · scopes: BearerAuth · responses: 201, 400
POST /connectors/ingest/sepa_instant Ingest a SEPA Instant Credit Transfer · Connectors · exposure: core · scopes: BearerAuth · responses: 201, 400
POST /connectors/ingest/upi Ingest a UPI payment · Connectors · exposure: core · scopes: BearerAuth · responses: 201, 400
POST /connectors/ingest/stripe Ingest a Stripe webhook event · Connectors · exposure: core · responses: 200, 201, 400
POST /connectors/ingest/primer Ingest a Primer webhook event · Connectors · exposure: core · responses: 200, 201, 401, 408, 422, 500
POST /connectors/ingest/coinbase_commerce Ingest a Coinbase Commerce webhook event · Connectors · exposure: core · responses: 200, 201, 400
POST /connectors/ingest/shopify Ingest a Shopify webhook (orders/paid) · Connectors · exposure: core · responses: 200, 201, 400
POST /connectors/ingest/nacha_ach Ingest a NACHA ACH file · Connectors · exposure: core · scopes: BearerAuth · responses: 207, 400
POST /connectors/ingest/x402 Ingest an x402 payment proof · Connectors · exposure: core · scopes: BearerAuth · responses: 201, 400
POST /connectors/ingest/stables Ingest a Stables.money webhook event · Connectors · exposure: core · scopes: BearerAuth · responses: 200, 201, 401, 422
GET /purchases/{id}/splits List cost splits for a purchase · Purchases · exposure: core · scopes: BearerAuth · responses: 200, 401, 404
POST /purchases/{id}/splits Create cost splits for a purchase · Purchases · exposure: core · body: CreateSplitsBody · scopes: BearerAuth · responses: 201, 401, 404, 422
DELETE /purchases/{id}/splits Delete all cost splits for a purchase · Purchases · exposure: core · scopes: BearerAuth · responses: 200, 401, 404
GET /purchases/{id}/dispute Get the dispute for a purchase · Purchases · exposure: core · scopes: BearerAuth · responses: 200, 401, 404
POST /purchases/{id}/dispute Open a dispute on a purchase · Purchases · exposure: core · body: CreateDisputeBody · scopes: BearerAuth · responses: 201, 401, 404, 409
PATCH /purchases/{id}/dispute Update a dispute · Purchases · exposure: core · body: UpdateDisputeBody · scopes: BearerAuth · responses: 200, 401, 404
GET /disputes List all disputes · Purchases · exposure: core · scopes: BearerAuth · responses: 200, 401
GET /ap-rules List AP automation rules · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 401
POST /ap-rules Create an AP automation rule · Commercial · exposure: projection · body: CreateApRule · scopes: BearerAuth · responses: 201, 400, 401
PATCH /ap-rules/{id} Update an AP automation rule · Commercial · exposure: projection · body: UpdateApRule · scopes: BearerAuth · responses: 200, 400, 401, 404
DELETE /ap-rules/{id} Delete an AP rule · Commercial · exposure: projection · scopes: BearerAuth · responses: 204, 401, 404
POST /purchases/{id}/ap-evaluate Re-evaluate AP rules for a purchase · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 401, 404
GET /purchases/{id}/ap-decision Get the latest durable AP decision · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 401, 404
GET /purchases/{id}/journal-entry Retrieve a journal entry draft · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 401, 403, 404
POST /purchases/{id}/journal-entry Generate a journal entry draft · Commercial · exposure: projection · scopes: BearerAuth · responses: 201, 401, 403, 404, 409, 422
PATCH /purchases/{id}/journal-entry Configure draft accounts · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 400, 401, 403, 404, 409
GET /reconciliation Retrieve the reconciliation workspace · Reconciliation · exposure: projection · scopes: BearerAuth · responses: 200, 401, 403
POST /reconciliation/run Run reconciliation for eligible purchases · Reconciliation · exposure: projection · scopes: BearerAuth · responses: 200, 401, 403
POST /reconciliation/confirm Confirm a suggested reconciliation match · Reconciliation · exposure: projection · scopes: BearerAuth · responses: 200, 404, 409
POST /reconciliation/dismiss Dismiss a reconciliation record · Reconciliation · exposure: projection · scopes: BearerAuth · responses: 200, 404
GET /analytics/receipt-compliance Measure receipt evidence compliance · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 400, 401, 403
GET /analytics/spending-by-tag Summarize spending by tag · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 400, 401, 403
GET /analytics/payment-rails Summarize spending by payment rail · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 400, 401, 403
GET /analytics/vendor-concentration Measure vendor concentration · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 400, 401, 403
GET /close/readiness Accounting close readiness · Commercial · exposure: projection · scopes: BearerAuth · responses: 200, 401

Generated Schemas

These component schemas are rendered from the same OpenAPI contract as the endpoint inventory. Narrative guidance above explains common workflows; this section is the authoritative field reference.

CommercialCase

id
stringrequired
Documented schema property.
caseReference
stringrequired
Documented schema property.
caseType
stringrequired
Documented schema property.
lifecycleState
stringrequired
Documented schema property.
resolutionState
stringrequired
Documented schema property.
completenessState
stringrequired
Documented schema property.
materiality
PortablePurchaseMoney
Documented schema property.
effectiveAt
string
Documented schema property.
createdAt
stringrequired
Documented schema property.
updatedAt
stringrequired
Documented schema property.

CommercialCaseObject

id
stringrequired
Documented schema property.
objectType
stringrequired
Documented schema property.
sourceSystem
stringrequired
Documented schema property.
connectorId
string
Documented schema property.
nativeId
stringrequired
Documented schema property.
nativeVersion
string
Documented schema property.
payloadHash
string
Documented schema property.
sourceRecordType
string
Documented schema property.
retentionState
available | restricted | purgedrequired
Allowed values: available, restricted, purged
effectiveAt
string
Documented schema property.
observedAt
string
Documented schema property.
ingestedAt
stringrequired
Documented schema property.

CommercialCaseAssertion

id
stringrequired
Documented schema property.
subjectObjectId
stringrequired
Documented schema property.
sourceObjectId
string
Documented schema property.
field
stringrequired
Documented schema property.
value
unknownrequired
Documented schema property.
restricted
boolean
Documented schema property.
valueType
stringrequired
Documented schema property.
sourceSystem
stringrequired
Documented schema property.
authority
stringrequired
Documented schema property.
confidence
number
Documented schema property.
effectiveAt
string
Documented schema property.
observedAt
string
Documented schema property.
supersedesAssertionId
string
Documented schema property.
correctionOfAssertionId
string
Documented schema property.
createdAt
stringrequired
Documented schema property.

CommercialCaseLink

id
stringrequired
Documented schema property.
sourceObjectId
stringrequired
Documented schema property.
targetObjectId
stringrequired
Documented schema property.
linkType
stringrequired
Documented schema property.
state
stringrequired
Documented schema property.
confidence
number
Documented schema property.
rationale
string
Documented schema property.
effectiveAt
string
Documented schema property.
supersedesLinkId
string
Documented schema property.
createdAt
stringrequired
Documented schema property.

CommercialCaseAllocation

id
stringrequired
Documented schema property.
sourceObjectId
stringrequired
Documented schema property.
targetObjectId
stringrequired
Documented schema property.
amount
PortablePurchaseMoneyrequired
Documented schema property.
reason
stringrequired
Documented schema property.
state
stringrequired
Documented schema property.
effectiveAt
string
Documented schema property.
reversalOfAllocationId
string
Documented schema property.
supersedesAllocationId
string
Documented schema property.
createdAt
stringrequired
Documented schema property.

CommercialCaseDecision

id
stringrequired
Documented schema property.
decisionType
stringrequired
Documented schema property.
authority
authoritative | attested | observed | inferred | user_confirmed | policyrequired
Allowed values: authoritative, attested, observed, inferred, user_confirmed, policy
effectiveAt
stringrequired
Documented schema property.
createdAt
stringrequired
Documented schema property.

CommercialCaseDetail

case
CommercialCaserequired
Documented schema property.
objects
array<CommercialCaseObject>required
Documented schema property.
assertions
array<CommercialCaseAssertion>required
Documented schema property.
links
array<CommercialCaseLink>required
Documented schema property.
allocations
array<CommercialCaseAllocation>required
Documented schema property.
decisions
array<CommercialCaseDecision>required
Documented schema property.

CommercialCasePage

data
array<CommercialCase>required
Documented schema property.
next_cursor
unknownrequired
Documented schema property.

CommercialCaseProjection

projection_key
stringrequired
Documented schema property.
status
stringrequired
Documented schema property.
commercial_case_id
stringrequired
Documented schema property.
attempt_count
integerrequired
Documented schema property.
updated_at
string
Documented schema property.

CommercialCaseObjectList

data
array<CommercialCaseObject>required
Documented schema property.

CommercialCaseAssertionList

data
array<CommercialCaseAssertion>required
Documented schema property.

CommercialCaseLinkList

data
array<CommercialCaseLink>required
Documented schema property.

CommercialCaseAllocationList

data
array<CommercialCaseAllocation>required
Documented schema property.

CommercialCaseDecisionList

data
array<CommercialCaseDecision>required
Documented schema property.

CommercialCasePublicAssertionValue

unknown

CommercialCaseConflict

field
stringrequired
Documented schema property.
status
unknownrequired
Documented schema property.
assertions
array<object>required
Documented schema property.

CommercialCaseConflictList

data
array<CommercialCaseConflict>required
Documented schema property.

CommercialCaseTimelineEvent

unknown

CommercialCaseTimeline

data
array<CommercialCaseTimelineEvent>required
Documented schema property.

CommercialCaseDecisionRequest

decision_type
confirm_link | reject_link | adjust_allocation | approve | hold | dispute | request_evidence | mark_evidence_insufficient | resolve | reopenrequired
Allowed values: confirm_link, reject_link, adjust_allocation, approve, hold, dispute, request_evidence, mark_evidence_insufficient, resolve, reopen
reason
string
Documented schema property.
evidence_snapshot
object
Documented schema property.
previous_state
object
Documented schema property.
effective_at
string
Documented schema property.
idempotency_key
stringrequired
Documented schema property.
link_id
string
Documented schema property.
allocation_id
string
Documented schema property.
amount
number
Documented schema property.
currency
string
Documented schema property.
operation
adjust | reverse
Allowed values: adjust, reverse

CommercialCaseBankingContext

contract
unknownrequired
Documented schema property.
version
unknownrequired
Documented schema property.
caseId
stringrequired
Documented schema property.
caseReference
stringrequired
Documented schema property.
lifecycleState
stringrequired
Documented schema property.
compact
objectrequired
Documented schema property.
railStatus
array<object>required
Documented schema property.
allocations
array<CommercialCaseAllocation>required
Documented schema property.
evidence
array<object>required
Documented schema property.
unresolvedConflicts
integerrequired
Documented schema property.
corrections
array<object>required
Documented schema property.

UnsupportedPprVersion

error_code
unknownrequired
Documented schema property.
message
stringrequired
Documented schema property.
requested_version
stringrequired
Documented schema property.
supported_versions
array<unknown>required
Documented schema property.

AirwallexDeliveryRequest

commercial_case_id
stringrequired
Documented schema property.
configuration_id
stringrequired
Documented schema property.
idempotency_key
stringrequired
Documented schema property.
target_type
payment_intent | transferrequired
Allowed values: payment_intent, transfer
external_id
stringrequired
Documented schema property.

AirwallexDeliveryConfigurationCreate

provider_account_id
stringrequired
Documented schema property.
environment
unknownrequired
Documented schema property.
enabled
boolean
Documented schema property.
enabled_operations
array<payment_intent | transfer | payment_intent_reference | transfer_reference>
Documented schema property.
permitted_case_fields
array<string>
Documented schema property.

AirwallexDeliveryConfigurationUpdate

enabled
boolean
Documented schema property.
enabled_operations
array<payment_intent | transfer | payment_intent_reference | transfer_reference>
Documented schema property.
permitted_case_fields
array<string>
Documented schema property.

AirwallexDeliveryConfiguration

id
stringrequired
Documented schema property.
provider_account_id
stringrequired
Documented schema property.
environment
unknownrequired
Documented schema property.
enabled
booleanrequired
Documented schema property.
validation_status
configured_unvalidated | validated | invalidrequired
Allowed values: configured_unvalidated, validated, invalid
validated_at
string
Documented schema property.
validation_failure_code
string
Documented schema property.
enabled_operations
array<string>required
Documented schema property.
permitted_case_fields
array<string>required
Documented schema property.
updated_at
stringrequired
Documented schema property.

AirwallexSuccessorRequest

idempotency_key
stringrequired
Documented schema property.

AirwallexDelivery

id
stringrequired
Documented schema property.
status
stringrequired
Documented schema property.
target_type
payment_intent | transferrequired
Allowed values: payment_intent, transfer
external_id
stringrequired
Documented schema property.
provider_reference
string
Documented schema property.
last_error_code
string
Documented schema property.
send_started_at
string
Documented schema property.
updated_at
stringrequired
Documented schema property.

ConsumerCommercialCaseGrantRequest

recipient_reference
stringrequired
Opaque, time-bound portal invite token created by the receiving tenant; never an API-key ID.
source_account_id
string
Documented schema property.
connector_id
string
Documented schema property.
recipient_attribution
stringrequired
Documented schema property.
expires_at
string
Documented schema property.

ConsumerCommercialCaseGrant

id
stringrequired
Documented schema property.
connector_id
unknown
Documented schema property.
operations
array<string>required
Documented schema property.
recipient_attribution
stringrequired
Documented schema property.
effective_at
stringrequired
Documented schema property.
expires_at
unknownrequired
Documented schema property.
revoked_at
unknownrequired
Documented schema property.
created_at
stringrequired
Documented schema property.

ConsumerCommercialCaseGrantEnvelope

grant
ConsumerCommercialCaseGrantrequired
Documented schema property.

ConsumerCommercialCaseGrantList

grants
array<ConsumerCommercialCaseGrant>required
Documented schema property.

Error

error_code
stringrequired
Documented schema property.
message
stringrequired
Documented schema property.

LineItem

name
stringrequired
Documented schema property.
price
numberrequired
Documented schema property.
quantity
number
Documented schema property.
category
string
Documented schema property.
sku
string
Documented schema property.
upc
string
Documented schema property.
brand
string
Documented schema property.
is_fsa_eligible
boolean
Documented schema property.

CreatePurchase

amount
numberrequired
Documented schema property.
currency
stringrequired
Documented schema property.
merchant_name
string
Documented schema property.
transaction_type
transfer | payment | refund | deposit | withdrawal | purchase | auth | pre_auth | capture | void
Allowed values: transfer, payment, refund, deposit, withdrawal, purchase, auth, pre_auth, capture, void
reference_id
stringrequired
Documented schema property.
timestamp
stringrequired
Documented schema property.
status
pending | processing | completed | failed | reversed | refundedrequired
Allowed values: pending, processing, completed, failed, reversed, refunded
memo
string
Documented schema property.
items
array<LineItem>
Documented schema property.
tax
number
Documented schema property.
total
number
Documented schema property.
entity_id
string
Documented schema property.
signal_type
card_transaction | receipt | invoice | email_confirmation | api_submission | mileage_claim | per_diem_claim | mobile_capture | wallet_payment
Allowed values: card_transaction, receipt, invoice, email_confirmation, api_submission, mileage_claim, per_diem_claim, mobile_capture, wallet_payment
gl_code
string
Documented schema property.
cost_center
string
Documented schema property.
department
string
Documented schema property.
project_code
string
Documented schema property.
rail_source
fednow | sepa_instant | upi | swift | iso20022 | camt052 | camt053 | camt054 | mt940 | mt942 | bai2 | stripe | coinbase_commerce | hedera | x402 | ach | rtp | wire | card | primer | stables | cybrid | rainforest | pingpong | thunes_accept | thunes_mt | adyen | mollie | rapyd | pix | mercado_pago | checkout | klarna | stone | pagseguro | boleto | xmoney_crypto | knot | truelayer | ebizcharge | maxio | orb | chargebee | recurly | paddle | nmi | paystand | authorize_net | edi204 | edi210 | edi211 | edi214 | edi_855_ack | edi_856_asn | edi_997_ack | mcleod | mercurygate | turvo | relay_payments | cass | loop | sila | brasilpays | derivative_path | moonpay | roadsync | fleet_check | wex_fleet | fleetcor | ups | fedex | dhl_express | tforce_freight | trimble | sap_tm | magnus_tms | blue_yonder | estes_express | saia | rl_carriers | arcbest | odfl | alvys_tms | rose_rocket | samsara_eld | motive_eld | edi_820_remittance | edi_990_response | edi_824_advice | checkalt | project44 | flexport | bank_feed | carrier_invoice_manual | freight_hero | freight_ops_platform | lojistic | shipwell | cybersource | xero | other
Allowed values: fednow, sepa_instant, upi, swift, iso20022, camt052, camt053, camt054, mt940, mt942, bai2, stripe, coinbase_commerce, hedera, x402, ach, rtp, wire, card, primer, stables, cybrid, rainforest, pingpong, thunes_accept, thunes_mt, adyen, mollie, rapyd, pix, mercado_pago, checkout, klarna, stone, pagseguro, boleto, xmoney_crypto, knot, truelayer, ebizcharge, maxio, orb, chargebee, recurly, paddle, nmi, paystand, authorize_net, edi204, edi210, edi211, edi214, edi_855_ack, edi_856_asn, edi_997_ack, mcleod, mercurygate, turvo, relay_payments, cass, loop, sila, brasilpays, derivative_path, moonpay, roadsync, fleet_check, wex_fleet, fleetcor, ups, fedex, dhl_express, tforce_freight, trimble, sap_tm, magnus_tms, blue_yonder, estes_express, saia, rl_carriers, arcbest, odfl, alvys_tms, rose_rocket, samsara_eld, motive_eld, edi_820_remittance, edi_990_response, edi_824_advice, checkalt, project44, flexport, bank_feed, carrier_invoice_manual, freight_hero, freight_ops_platform, lojistic, shipwell, cybersource, xero, other
fx_rate
number
Documented schema property.
fx_base_currency
string
Documented schema property.
origin_jurisdiction
string
Documented schema property.
settlement_jurisdiction
string
Documented schema property.
merchant_tin
string
Payer/payee TIN for 1099 aggregation
source_correction
object
Creates a new, immutable correction Purchase Object rather than rewriting the original. `source_reference` is the stable idempotency identity for that correction.

Purchase

id
string
Documented schema property.
object
purchase
Allowed values: purchase
amount
number
Documented schema property.
currency
string
Documented schema property.
merchant
object
Documented schema property.
items
array<LineItem>
Documented schema property.
status
string
Documented schema property.
signal_type
string
Documented schema property.
entity_id
string
Documented schema property.
expense
object
Documented schema property.
commercial
object
Commercial AP intelligence — GL code suggestion, cost center mapping, PO match, exception flags, auto-codeability, and 1099 reporting signals. Inline on every purchase object. Rule-based, no async I/O.
unification
object
Documented schema property.
lifecycle
object
Documented schema property.
lifecycle_events
array<PostDeliveryLifecycleEvent>
Post-delivery warranty, return, subscription, audit, dispute, and delivery events. This does not replace the existing payment lifecycle chain.
created_at
string
Documented schema property.
updated_at
string
Documented schema property.

PurchaseList

data
array<Purchase>
Documented schema property.
has_more
boolean
Documented schema property.
next_cursor
string
Documented schema property.
total
integer
Documented schema property.

Entity

id
string
Documented schema property.
object
entity
Allowed values: entity
external_ids
array<object>
Documented schema property.
name
string
Documented schema property.
email
string
Documented schema property.
tin
string
Payer TIN for 1099 aggregation
kyc_status
string
Documented schema property.
created_at
string
Documented schema property.

EntityList

data
array<Entity>
Documented schema property.
has_more
boolean
Documented schema property.

CreateEntity

external_ids
array<object>
Documented schema property.
name
string
Documented schema property.
email
string
Documented schema property.
tin
string
Documented schema property.
phone
string
Documented schema property.

Policy

id
string
Documented schema property.
object
expense_policy
Allowed values: expense_policy
name
string
Documented schema property.
rule_type
amount_limit | merchant_blocklist | category_blocklist | require_memo | require_gl_code
Allowed values: amount_limit, merchant_blocklist, category_blocklist, require_memo, require_gl_code
rule_value
string
Documented schema property.
enabled
boolean
Documented schema property.
created_at
string
Documented schema property.

CreatePolicy

name
stringrequired
Documented schema property.
rule_type
amount_limit | merchant_blocklist | category_blocklist | require_memo | require_gl_coderequired
Allowed values: amount_limit, merchant_blocklist, category_blocklist, require_memo, require_gl_code
rule_value
stringrequired
Numeric string for amount_limit; comma-separated names for blocklists; any non-empty string for flag rules
enabled
boolean
Documented schema property.

ReturnEligibility

object
return_eligibility
Allowed values: return_eligibility
purchase_id
string
Documented schema property.
eligible
boolean
Whether the purchase is currently within the merchant's return window
days_remaining
integer
Calendar days remaining before the return deadline. Zero when not eligible.
return_deadline
string
ISO date (YYYY-MM-DD) by which a return must be initiated
return_window_days
integer
The merchant's configured return window in days
merchant
string
Documented schema property.
amount
number
Documented schema property.
currency
string
Documented schema property.
purchased_at
string
Documented schema property.
warranty
object
Documented schema property.

ReceiptLink

object
receipt_link
Allowed values: receipt_link
token
string
Opaque token — not retrievable after creation
url
string
Documented schema property.
purchase_id
string
Documented schema property.
expires_at
string
Null when the link was created without an expiry
created_at
string
Documented schema property.

ExpenseSummaryItem

group_value
string
The value of the group_by dimension (e.g. department name, GL code)
total_amount
number
Sum of purchase amounts in this group
purchase_count
integer
Number of purchases in this group

ApprovalAuditEntry

event_id
string
Documented schema property.
purchase_id
string
Documented schema property.
event_type
purchase.approval_approved | purchase.approval_rejected | purchase.approval_reimbursed
Allowed values: purchase.approval_approved, purchase.approval_rejected, purchase.approval_reimbursed
entity_id
string
Documented schema property.
data
object
Documented schema property.
created_at
string
Documented schema property.

CreateWidgetSession

entity_id
string
Scope the session to a specific entity (person or business)
partner_name
string
Displayed in the embed header
theme
dark | light
Allowed values: dark, light
redirect_url
string
URL the embed navigates to on close
logo_url
string
Documented schema property.
accent_color
string
Documented schema property.
hide_branding
boolean
Documented schema property.

WidgetSession

session_token
string
JWT to pass as the session query param to the hosted link
link_url
string
Ready-to-use URL for an iframe src or redirect
expires_at
integer
Unix timestamp when the token expires (30 min from issuance)
entity_id
string
Documented schema property.
partner_name
string
Documented schema property.

WidgetSessionVerify

valid
boolean
Documented schema property.
entity_id
string
Documented schema property.
partner_name
string
Documented schema property.
theme
dark | light
Allowed values: dark, light

PurchaseLifecycleEvent

id
string
Documented schema property.
event_type
string
e.g. purchase.created, purchase.updated, purchase.delivered, purchase.returned, purchase.refunded, or a custom type
data
object
Event-specific payload. Shape varies by event_type.
created_at
string
Documented schema property.

PostDeliveryLifecycleEvent

event_id
stringrequired
Documented schema property.
object
purchase_lifecycle_eventrequired
Allowed values: purchase_lifecycle_event
purchase_id
stringrequired
Documented schema property.
event_type
warranty_activated | warranty_expired | return_window_opened | return_window_closed | subscription_renewal | asset_depreciation_posted | audit_referenced | payment_dispute_opened | payment_dispute_resolved | asset_receivedrequired
Allowed values: warranty_activated, warranty_expired, return_window_opened, return_window_closed, subscription_renewal, asset_depreciation_posted, audit_referenced, payment_dispute_opened, payment_dispute_resolved, asset_received
data
objectrequired
Documented schema property.
source
string
Documented schema property.
timestamp
stringrequired
Documented schema property.

CreatePostDeliveryLifecycleEvent

event_type
warranty_activated | warranty_expired | return_window_opened | return_window_closed | subscription_renewal | asset_depreciation_posted | audit_referenced | payment_dispute_opened | payment_dispute_resolvedrequired
Allowed values: warranty_activated, warranty_expired, return_window_opened, return_window_closed, subscription_renewal, asset_depreciation_posted, audit_referenced, payment_dispute_opened, payment_dispute_resolved
data
object
Documented schema property.
source
string
Documented schema property.
idempotency_key
string
Stable caller-generated key for deterministic retry. Reusing it with changed event_type, data, source, or supplied timestamp returns 409.

PostDeliveryLifecycleEventList

data
array<PostDeliveryLifecycleEvent>required
Documented schema property.
has_more
falserequired
Allowed values: false

ApRule

rule_id
stringrequired
Documented schema property.
object
ap_auto_rulerequired
Allowed values: ap_auto_rule
name
stringrequired
Documented schema property.
priority
integerrequired
Documented schema property.
conditions
ApRuleConditionsrequired
Documented schema property.
action
auto_approve | route_torequired
Allowed values: auto_approve, route_to
route_to_email
stringrequired
Documented schema property.
is_active
booleanrequired
Documented schema property.
created_at
stringrequired
Documented schema property.

ApRuleConditions

amount_min
number
Documented schema property.
amount_max
number
Documented schema property.
vendor_trust_min
number
Documented schema property.
fraud_flags
none
Allowed values: none
gl_code_required
boolean
Documented schema property.
cost_center_required
boolean
Documented schema property.
po_required
boolean
Documented schema property.
po_match_status
string
Documented schema property.

CreateApRule

name
stringrequired
Documented schema property.
priority
integer
Documented schema property.
conditions
ApRuleConditionsrequired
Documented schema property.
action
auto_approve | route_torequired
Allowed values: auto_approve, route_to
route_to_email
string
Documented schema property.
is_active
boolean
Documented schema property.

UpdateApRule

name
string
Documented schema property.
priority
integer
Documented schema property.
conditions
ApRuleConditions
Documented schema property.
action
auto_approve | route_to
Allowed values: auto_approve, route_to
route_to_email
string
Documented schema property.
is_active
boolean
Documented schema property.

ApEvaluation

object
ap_evaluationrequired
Allowed values: ap_evaluation
purchase_id
stringrequired
Documented schema property.
action
auto_approve | route_to | no_rulerequired
Allowed values: auto_approve, route_to, no_rule
rule_id
stringrequired
Documented schema property.
rule_name
stringrequired
Documented schema property.
route_to_email
stringrequired
Documented schema property.
vendor_trust_score
numberrequired
Documented schema property.
skip_reasons
array<string>required
Documented schema property.
auto_posted
booleanrequired
Documented schema property.
external_url
stringrequired
Documented schema property.
target
stringrequired
Documented schema property.

PurchaseSplit

id
string
Documented schema property.
label
string
Human-readable label for this portion (e.g. 'Marketing Q3')
cost_center
string
Documented schema property.
entity_id
string
Documented schema property.
amount
number
Amount allocated to this split leg
percentage
number
Optional percentage for display. Must sum to 100 when provided.
memo
string
Documented schema property.
created_at
string
Documented schema property.

PurchaseSplitsResponse

object
purchase_splits
Allowed values: purchase_splits
purchase_id
string
Documented schema property.
split_count
integer
Documented schema property.
splits
array<PurchaseSplit>
Documented schema property.

CreateSplitsBody

splits
array<object>required
Split legs. Amounts must sum to the purchase total (±0.02 tolerance).

JournalEntryDraft

object
journal_entry_draftrequired
Allowed values: journal_entry_draft
id
stringrequired
Draft ID (je_…)
purchase_id
stringrequired
Public purchase ID this draft belongs to
status
draft | posting | postedrequired
`draft` — generated but not posted. `posting` — an ERP posting attempt owns the lease. `posted` — posted to ERP.
debit_account
stringrequired
GL account name or code to debit (expense side). Sourced from the purchase GL code; configure via PATCH.
credit_account
stringrequired
GL account name or code to credit. `null` on generation — must be set via PATCH before posting.
amount
numberrequired
Purchase total in the native currency.
currency
stringrequired
ISO 4217 currency code.
period
stringrequired
Accounting period (YYYY-MM).
entity
stringrequired
Cost center or business entity.
tax_amount
numberrequired
Tax portion of the purchase amount.
confidence_score
numberrequired
0–1 float. Below 0.75 = at least one weak signal.
reasoning
stringrequired
Human-readable explanation of the confidence score.
erp_journal_entry_id
stringrequired
ERP-issued JE ID recorded after posting.
auto_posted
boolean
Present on PATCH responses; true when approval plus configured accounts triggered ERP posting.
external_url
string
Present on PATCH responses when the posting target returns a record URL.
target
string
Present on PATCH responses; connector used for automatic posting.
created_at
stringrequired
Documented schema property.
updated_at
stringrequired
Documented schema property.

CloseReadinessBreakdown

missing_gl
integerrequired
Documented schema property.
missing_cost_center
integerrequired
Documented schema property.
duplicate_flag
integerrequired
Documented schema property.
fraud_flag
integerrequired
Documented schema property.
pending_status
integerrequired
Documented schema property.

CloseReadinessException

purchase_id
stringrequired
Documented schema property.
missing_fields
array<gl_code | cost_center | duplicate_flag | fraud_flag | pending_status>required
Documented schema property.

CloseReadinessBenchmark

tier
excellent | strong | improving | developing | earlyrequired
Allowed values: excellent, strong, improving, developing, early
message
stringrequired
Documented schema property.

ReceiptComplianceSummary

object
receipt_compliance_summaryrequired
Allowed values: receipt_compliance_summary
group_by
entity_id | department | cost_centerrequired
Allowed values: entity_id, department, cost_center
date_from
stringrequired
Documented schema property.
date_to
stringrequired
Documented schema property.
overall_compliance_rate_pct
numberrequired
Documented schema property.
total_purchases
integerrequired
Documented schema property.
compliant_count
integerrequired
Documented schema property.
non_compliant_count
integerrequired
Documented schema property.
groups
array<ReceiptComplianceGroup>required
Documented schema property.
generated_at
integerrequired
Unix timestamp in seconds

ReceiptComplianceGroup

group
stringrequired
Documented schema property.
total_purchases
integerrequired
Documented schema property.
compliant_count
integerrequired
Documented schema property.
non_compliant_count
integerrequired
Documented schema property.
compliance_rate_pct
numberrequired
Documented schema property.

SpendingByTagSummary

object
spending_by_tagrequired
Allowed values: spending_by_tag
date_from
stringrequired
Documented schema property.
date_to
stringrequired
Documented schema property.
tag_count
integerrequired
Documented schema property.
tags
array<SpendingTag>required
Documented schema property.
generated_at
integerrequired
Unix timestamp in seconds

SpendingTag

tag
stringrequired
Documented schema property.
total_spend
numberrequired
Documented schema property.
purchase_count
integerrequired
Documented schema property.
top_merchants
array<string>required
Documented schema property.

PaymentRailsSummary

object
payment_rails_breakdownrequired
Allowed values: payment_rails_breakdown
entity_id
stringrequired
Documented schema property.
date_from
stringrequired
Documented schema property.
date_to
stringrequired
Documented schema property.
total_rails
integerrequired
Documented schema property.
rails
array<PaymentRailBreakdown>required
Documented schema property.
generated_at
integerrequired
Unix timestamp in seconds

PaymentRailBreakdown

rail_source
stringrequired
Documented schema property.
purchase_count
integerrequired
Documented schema property.
total_spend
numberrequired
Documented schema property.
spend_percentage
numberrequired
Documented schema property.

VendorConcentrationSummary

object
vendor_concentration_summaryrequired
Allowed values: vendor_concentration_summary
entity_id
stringrequired
Documented schema property.
date_from
stringrequired
Documented schema property.
date_to
stringrequired
Documented schema property.
limit
integerrequired
Documented schema property.
vendors
array<VendorConcentration>required
Documented schema property.
generated_at
integerrequired
Unix timestamp in seconds

VendorConcentration

merchantId
stringrequired
Documented schema property.
merchantName
stringrequired
Documented schema property.
totalSpend
numberrequired
Documented schema property.
count
integerrequired
Documented schema property.
spendPercentage
numberrequired
Documented schema property.

ReconciliationItem

id
stringrequired
Documented schema property.
vendor
stringrequired
Documented schema property.
amount
numberrequired
Documented schema property.
currency
stringrequired
Documented schema property.
date
stringrequired
Documented schema property.
source
stringrequired
Documented schema property.
canonical_id
string
Documented schema property.
confidence
number
Documented schema property.
matched_on
array<string>
Documented schema property.

ReconciliationStats

matched
integerrequired
Documented schema property.
suggested
integerrequired
Documented schema property.
unmatched
integerrequired
Documented schema property.
total
integerrequired
Documented schema property.

Dispute

id
string
Documented schema property.
purchase_id
string
Documented schema property.
reason
string
Free-text description of the dispute
reason_code
string
Structured reason code (freight disputes only)
freight_detail
string
Additional freight dispute context
disputed_amount
number
Amount being disputed. Defaults to the full purchase amount.
dispute_type
freight | billing
Allowed values: freight, billing
status
open | pending_correction | resolved | rejected | withdrawn
Allowed values: open, pending_correction, resolved, rejected, withdrawn
merchant_response
string
Documented schema property.
correction_purchase_id
string
Public ID of the corrected purchase, if a correction was issued
resolved_at
integer
Unix timestamp when the dispute was resolved, rejected, or withdrawn
created_at
integer
Unix timestamp
updated_at
integer
Unix timestamp

CreateDisputeBody

reason
stringrequired
Description of the discrepancy or issue
disputed_amount
number
Partial amount in dispute. Omit to dispute the full purchase amount.
freight_reason_code
weight_discrepancy | unauthorized_accessorial | rate_mismatch | duplicate_billing | late_delivery | missing_pod | class_reclassification | routing_violation | fuel_surcharge_discrepancy | detention_overcharge | damage_claim | shortage
Structured freight dispute code. Providing this sets dispute_type to 'freight'.
freight_detail
string
Additional detail for freight disputes (e.g. BOL number, expected vs actual weight)

UpdateDisputeBody

status
pending_correction | resolved | rejected | withdrawn
Allowed values: pending_correction, resolved, rejected, withdrawn
merchant_response
string
Merchant or carrier response to record
correction_purchase_id
string
Public ID of a correction purchase issued to settle the dispute

CommercialEventIngest

commercial_event_id
string
Existing event ID. Omit to create; supply to attach later source facts to the same event.
source
objectrequired
Documented schema property.
record
objectrequired
Normalized transaction, invoice, order, or supporting document fields. A new event requires `merchant_name` and `amount`; incremental evidence may contain only the additional fields.

CommercialEventRelationshipDecision

decision
confirm | rejectrequired
Allowed values: confirm, reject
reason
string
Documented schema property.

CommercialEventRelationshipProposal

source_type
stringrequired
Documented schema property.
source_id
stringrequired
Stable identity in the named payment source.
amount
numberrequired
Documented schema property.
currency
stringrequired
Documented schema property.
observed_at
stringrequired
Documented schema property.
payment_reference
string
Documented schema property.
merchant_name
string
Documented schema property.
source_snapshot
object
Immutable, caller-supplied payment observation details.

CommercialEventRelationship

object
unknownrequired
Documented schema property.
commercial_event_id
stringrequired
Documented schema property.
id
stringrequired
Documented schema property.
relationship_type
stringrequired
Documented schema property.
status
proposed | ambiguous | confirmed | rejected | supersededrequired
Allowed values: proposed, ambiguous, confirmed, rejected, superseded
confidence
numberrequired
Documented schema property.
rationale
stringrequired
Documented schema property.
matched_fields
array<string>required
Documented schema property.
source
objectrequired
Documented schema property.
target_purchase_id
stringrequired
Documented schema property.
target_snapshot
object
Documented schema property.
amount
number
Documented schema property.
currency
string
Documented schema property.
created_at
integer
Documented schema property.
updated_at
integer
Documented schema property.

CommercialEvent

object
commercial_eventrequired
Allowed values: commercial_event
api_version
stringrequired
Documented schema property.
id
stringrequired
Stable public event identity
purchase_id
string
Backward-compatible Purchase Object identity
compatibility_purchase_url
string
Documented schema property.
state
objectrequired
Documented schema property.
context
objectrequired
Documented schema property.
source_records
array<object>required
Documented schema property.
projection
object
Latest deterministic projection. Each provenance entry identifies source_role, assertion_kind, source_signal_id, optional source_event_id, field_path, numeric authority, and role-bearing alternate_sources when values conflict.
evidence
array<object>required
Documented schema property.
relationships
array<object>required
Documented schema property.
conflicts
object
Documented schema property.
corrections
array<object>required
Documented schema property.
history
array<object>required
Documented schema property.

CommercialEventShared

Section-filtered Commercial Event returned to an authorized recipient. Identity/version fields are always present; every other section requires an explicit grant.

object
commercial_eventrequired
Allowed values: commercial_event
api_version
stringrequired
Documented schema property.
id
stringrequired
Documented schema property.
purchase_id
stringrequired
Documented schema property.
shared_access
objectrequired
Documented schema property.
context
object
Documented schema property.
source_records
array<object>
Documented schema property.
projection
object
Documented schema property.
evidence
array<object>
Documented schema property.
relationships
array<object>
Documented schema property.
conflicts
object
Documented schema property.
corrections
array<object>
Documented schema property.
history
array<object>
Documented schema property.

CommercialEventOperationScope

commercial_event:read | commercial_event:publish | commercial_event:append

CommercialEventSection

context | source_records | projection | evidence | relationships | conflicts | corrections | history

CommercialEventShareRequest

granted_to_key_id
stringrequired
Active recipient API key ID
scopes
array<CommercialEventOperationScope>required
Documented schema property.
sections
array<CommercialEventSection>required
Documented schema property.
expires_at
string
Optional future expiry

CommercialEventShare

object
unknownrequired
Documented schema property.
id
stringrequired
Documented schema property.
resource
stringrequired
Documented schema property.
granted_to_key_id
stringrequired
Documented schema property.
operation_scopes
array<CommercialEventOperationScope>required
Documented schema property.
sections
array<CommercialEventSection>required
Documented schema property.
expires_at
unknown
Documented schema property.
revoked_at
unknown
Documented schema property.
status
active | expired | revokedrequired
Allowed values: active, expired, revoked
created_at
integerrequired
Documented schema property.

PortablePurchaseEnvelope

standard
unknownrequired
Documented schema property.
profile
unknownrequired
Documented schema property.
version
unknownrequired
Documented schema property.
record
PortablePurchaseRecordrequired
Documented schema property.
extensions
PortablePurchaseExtensions
Documented schema property.

PortablePurchaseRecord

id
stringrequired
Documented schema property.
purchasedAt
stringrequired
Documented schema property.
status
pending | completed | cancelled | refunded | partially_refundedrequired
Allowed values: pending, completed, cancelled, refunded, partially_refunded
total
PortablePurchaseMoneyrequired
Documented schema property.
participants
array<PortablePurchaseParticipant>required
Documented schema property.
sources
array<PortablePurchaseSource>required
Documented schema property.
evidence
array<PortablePurchaseEvidence>
Documented schema property.
references
array<PortablePurchaseReference>
Documented schema property.
items
array<PortablePurchaseItem>
Documented schema property.
provenance
PortablePurchaseProvenancerequired
Documented schema property.
extensions
PortablePurchaseExtensions
Documented schema property.

PortablePurchaseMoney

amount
numberrequired
Documented schema property.
currency
stringrequired
Documented schema property.

PortablePurchaseIdentifier

scheme
stringrequired
Documented schema property.
value
stringrequired
Documented schema property.

PortablePurchaseDigest

algorithm
stringrequired
Documented schema property.
value
stringrequired
Documented schema property.

PortablePurchaseParticipant

id
stringrequired
Documented schema property.
role
merchant | processor | bank | erp | enterprise | publisher | consumerrequired
Allowed values: merchant, processor, bank, erp, enterprise, publisher, consumer
name
string
Documented schema property.
identifiers
array<PortablePurchaseIdentifier>
Documented schema property.
extensions
PortablePurchaseExtensions
Documented schema property.

PortablePurchaseReference

type
stringrequired
Documented schema property.
value
stringrequired
Documented schema property.
issuer
string
Documented schema property.
url
string
Documented schema property.
extensions
PortablePurchaseExtensions
Documented schema property.

PortablePurchaseSource

Must include externalId or payloadDigest. participantId must reference a record participant.

id
stringrequired
Documented schema property.
type
merchant | processor | bank | erp | enterprise | publisher | consumer | otherrequired
Allowed values: merchant, processor, bank, erp, enterprise, publisher, consumer, other
occurredAt
string
Documented schema property.
receivedAt
stringrequired
Documented schema property.
participantId
string
Documented schema property.
externalId
string
Documented schema property.
payloadDigest
PortablePurchaseDigest
Documented schema property.
extensions
PortablePurchaseExtensions
Documented schema property.

PortablePurchaseEvidence

sourceId, when present, must reference a record source.

id
stringrequired
Documented schema property.
type
receipt | invoice | payment_confirmation | statement | order | delivery | otherrequired
Allowed values: receipt, invoice, payment_confirmation, statement, order, delivery, other
capturedAt
stringrequired
Documented schema property.
uri
string
Documented schema property.
digest
PortablePurchaseDigest
Documented schema property.
sourceId
string
Documented schema property.
extensions
PortablePurchaseExtensions
Documented schema property.

PortablePurchaseItem

id
string
Documented schema property.
description
stringrequired
Documented schema property.
quantity
number
Documented schema property.
unitPrice
PortablePurchaseMoney
Documented schema property.
total
PortablePurchaseMoney
Documented schema property.
references
array<PortablePurchaseReference>
Documented schema property.
extensions
PortablePurchaseExtensions
Documented schema property.

PortablePurchaseProvenance

assertedBy must reference a participant; every sourceIds entry must reference a record source.

createdAt
stringrequired
Documented schema property.
assertedBy
stringrequired
Documented schema property.
sourceIds
array<string>required
Documented schema property.
transformation
string
Documented schema property.
extensions
PortablePurchaseExtensions
Documented schema property.

PortablePurchaseExtensions

Additive extension map. Every key must be vendor-namespaced, such as com.example.fulfillment.

object — Additive extension map. Every key must be vendor-namespaced, such as com.example.fulfillment.

CommercialEventContextAppend

idempotency_key
stringrequired
Documented schema property.
actor
stringrequired
Documented schema property.
source
stringrequired
Documented schema property.
timestamp
stringrequired
Documented schema property.
evidence_references
array<object>
Documented schema property.
reason
stringrequired
Documented schema property.
status
stringrequired
Documented schema property.
metadata
object
Documented schema property.

Webhooks

Register an HTTPS endpoint to receive real-time events. Viacle delivers events with a signed X-Viacle-Signature header (HMAC-SHA256 of the raw request body).

Register a webhook endpoint

POST /webhooks
{
  "url":    "https://your-server.com/webhooks/viacle",
  "events": ["purchase.created", "purchase.updated", "purchase.gl_coded"]
}

Signature verification (Node.js)

Verify incoming webhooks
const crypto = require("crypto");

function verifyWebhook(rawBody, signatureHeader, secret) {
  const expected = crypto
    .createHmac("sha256", secret)
    .update(rawBody)
    .digest("hex");
  const received = signatureHeader.replace("sha256=", "");
  return crypto.timingSafeEqual(
    Buffer.from(expected, "hex"),
    Buffer.from(received, "hex")
  );
}

Event types

EventFired when
purchase.createdA new purchase object is created and status is completed.
purchase.updatedAny mutable field on the purchase object is changed via PATCH.
purchase.gl_codedA GL code is assigned or changed on the expense block.
purchase.approvedapproval_status transitions to approved.
purchase.rejectedapproval_status transitions to rejected.
purchase.disputedA dispute is opened on the purchase.
purchase.deletedThe purchase object is soft-deleted.
purchase_order.match_status_changedPO match status transitions (unmatched → two_way_matched → three_way_matched).
entity.createdA new entity record is created.
entity.updatedAn entity record is updated.
freight.payment_risk.no_podEDI 210 invoice ingested but no matching POD confirmation found — payment risk flag.

API Scopes

Every API key carries an explicit scope list. A key is only permitted to call endpoints within its granted scopes.

ScopeGrants access to
purchases:readGET /purchases, GET /purchases/:id, and all read paths on purchase data.
purchases:writePOST /purchases, PATCH /purchases/:id, DELETE /purchases/:id.
entities:read / :writeEntity identity endpoints — person and business profiles, spend aggregation.
tax:read / :writeTax summary aggregation and 1099-ready vendor summaries.
expenses:read / :writeExpense management, GL coding, approval workflows.
webhooks:read / :writeWebhook endpoint registration and event log.
compliance:read / :writeRegulated spend, insurance readiness, fraud signals.
fdx:read / :writeFDX v6.5 transaction normalization and account linking.
analytics:readSpend analytics, entity analytics, graph queries.
streamServer-Sent Events real-time purchase stream.
policies:read / :writeExpense policy rules engine.
budgets:read / :writeBudget tracking and threshold alerts.

Connectors

Viacle connects to 50+ data sources via push connectors (webhooks), pull connectors (scheduled sync), and structured format parsers. Each connector normalizes its source format into the same purchase object schema. The full interactive connector list is at viacle.io/docs.

ISO 20022 coverage

Send supported ISO 20022 messages to the parser. It preserves the payment reference, source message and type, remittance, linked authorized commercial evidence, and provenance and permissions in a Purchase Object. Authorized systems can use that object for bank reconciliation, ERP or accounting workflows, AP/AR exception review, and audit evidence.

CoverageMessagesMeaning
Accepted todaypain.001, pacs.008, camt.052, camt.053, camt.054, remt.001Parsed into a Purchase Object with source evidence and provenance. camt.052 and camt.053 are accepted statement evidence; remt.001 is remittance evidence.
Ecosystem context onlycamt.035Proprietary Format Investigation (PrtryFrmtInvstgtn). Not supported for ingest; Viacle does not claim a camt.035 profile.
Scope This is a message-format parser, not a live rail integration. No SWIFT connectivity, signing, or XSD validation is performed.

Industry context: ISO 20022 and B2B payments reconciliation — external Finextra contributor expert opinion, not editorial endorsement.

Freight & Logistics

  • EDI X12 210 (freight invoice)
  • EDI X12 214 (shipment status / POD)
  • FedEx (webhook)
  • Flexport (pull + webhook)
  • project44 (webhook)
  • Loop FAP (webhook)
  • Cass Transportation (pull)

E-Invoice Mandates

  • PEPPOL / UBL (global)
  • EDI X12 810 (US/CA)
  • XRechnung (Germany)
  • Factur-X / ZUGFeRD (France)
  • KSeF FA_VAT v2 (Poland)
  • NFe / NFCe (Brazil)

Payment Processors

  • Stripe (webhook)
  • Square (webhook)
  • Cybersource (pull, L3)
  • Checkout.com (webhook)
  • Rapyd (webhook)
  • WEX Fleet (pull, L3)

Document & Email

  • Postmark inbound email
  • Veryfi OCR (receipts + invoices)
  • PDF document URL extraction
  • Mobile image capture

ERP & AP Platforms

  • Omie (Brazil, pull)
  • Maxio / Chargify (webhook)
  • EBizCharge (SOAP pull)
  • Knot (webhook)
  • Cybrid (stablecoin, webhook)
  • MoonPay (webhook)

Banking & Open Finance

  • FDX v6.5 (open banking)
  • ISO 20022 (camt / pacs)
  • PayPal (webhook)
  • BitPay (webhook)
  • Coinbase Commerce (webhook)

Idempotency

Pass an Idempotency-Key header on POST /purchases to make creation safe to retry. Duplicate requests within the deduplication window return the original response without creating a second record.

Header
Idempotency-Key: your-unique-key-ap-2026-00831

The reference_id field provides a secondary deduplication layer: if a purchase with the same reference_id already exists under your API key, the endpoint returns 409 CONFLICT.


Security & Data Handling

ControlImplementation
TransportTLS 1.2+ on all endpoints. HTTP is rejected.
Data at restAES-256 encryption.
Card dataFull card numbers are never accepted or stored. Only last four and BIN.
Tenant isolationPurchase data is scoped to your API key. No cross-account access.
Sandbox isolationSandbox keys (vi_test_sk_) cannot read or write production data.
Data retentionConfigurable 1–3,650 days per key via PUT /api/keys/:id/retention. Auto-purged after window.
Audit trailEvery state change appended to an immutable event log. Query via GET /purchases/:id/events.
DPAData Processing Agreements available for enterprise customers.

Ready to build?

Get API access, explore the interactive reference, or talk to the team.

Get API Key Interactive Docs → Contact Sales

This page is a static HTML reference — visible without JavaScript. Its endpoint inventory and schemas are generated from /openapi.json. The full interactive API reference with live examples and a sidebar navigator is at viacle.io/docs. Generated from the current API contract. API base URL: https://api.viacle.io/api/v1.