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
| Name | Type | Required | Notes |
|---|---|---|---|
id | string | yes | Xero PurchaseOrderID (GUID) or PurchaseOrderNumber (PO-####). |
Responses
200 — The purchase order with line items.
Body: PurchaseOrderDrillResponse
| Field | Type | Required | Notes |
|---|---|---|---|
purchaseOrder | PurchaseOrderDrill | yes | |
redactedItemCount | integer | yes | |
billingAlert | BillingAlert | no | |
xeroAlert | XeroAlert | no |
401 — Unauthorized
Body: ErrorResponse
| Field | Type | Required | Notes |
|---|---|---|---|
error | string | yes |
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.