Skip to content

GET /api/agent/purchase-orders/{id}

Drill into one purchase order by its Xero GUID (externalId) OR its purchaseOrderNumber (PO-####). Returns the list shape plus lineItems (nullable — null when the line-item fetch hasn't yet populated them). A sensitive contact returns 404 (existence-hiding) unless the key carries READ_SENSITIVE. Requires the READ_PURCHASE_ORDERS scope.

Auth

  • Required scope: READ_PURCHASE_ORDERS
  • Header: Authorization: Bearer cr_live_<prefix>_<secret>

Query parameters

NameTypeRequiredNotes
idstringyesXero PurchaseOrderID (GUID) or PurchaseOrderNumber (PO-####).

Responses

200 — The purchase order with line items.

Body: PurchaseOrderDrillResponse

FieldTypeRequiredNotes
purchaseOrderPurchaseOrderDrillyes
redactedItemCountintegeryes
billingAlertBillingAlertno
xeroAlertXeroAlertno

401 — Unauthorized

Body: ErrorResponse

FieldTypeRequiredNotes
errorstringyes

404 — Not found, or sensitive without READ_SENSITIVE.

Response headers

Every successful response carries X-CashRunway-Subscription, X-CashRunway-Plan, X-CashRunway-Quota-Remaining, and X-CashRunway-Quota-Reset. Trialing subscriptions also include X-CashRunway-Trial-Days-Remaining. See the overview for details.

Released under a proprietary license. · cashrunway.ai