List Purchase Orders
get_purchase_ordersList purchase orders — orders THIS business places WITH its suppliers (replenishment POs by default). A customer's orders are SALES orders — use get_sales_orders for those. Supports reconciliation / status reporting. OPEN POs: in everyday speech "open" or "outstanding" purchase orders means the ones not finished yet — pass state=open (drafts, awaiting approval, sent to the supplier, partly received). state=closed is the finished ones (received, closed, closedShort, reconciled, fulfilled, canceled). Do NOT pass status=open for that: status matches ONE exact lifecycle status, and the status named open is only an unsent order still being edited, so it misses drafts and issued orders. Lifecycle statuses: created = draft; open = not yet sent, still editable; waitingApproval = awaiting internal approval; issued = sent to the supplier; receiving / partiallyFulfilled = partly received; pendingReceiptResolution / pendingReconciliation = receipt awaiting a decision; received / closed = fully received; closedShort = closed with quantity never received; reconciled / fulfilled = settled; canceled. Filters (all optional, AND-combined): type (po [default], dr, rfp, cro, crr); state (open, closed); status (one exact status; with state it must belong to that state; unknown values are rejected); numberSearch (case-insensitive substring of the PO number); partnerSearch (vendor name); sku (only POs with a line for that exact SKU); createdFrom/createdTo (ISO 8601 bounds on the created date). Newest first. Paged: returns Total (pre-paging — the answer to "how many") plus the page; default 100, max 500. Each row is an order-level summary (vendor, destination warehouse, total, line count, lifecycle dates) — not line detail. A client-pinned token sees only its own client's POs; an operator token sees the whole tenant's.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_purchase_orders"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | Return only POs containing a line for this exact SKU (case-insensitive). | |
| type | No | Document type: po (default), dr, rfp, cro, crr. | |
| limit | No | Page size (default 100, max 500). | |
| state | No | Grouped lifecycle filter. open = not finished yet (open, created, waitingApproval, issued, receiving, partiallyFulfilled, pendingReceiptResolution, pendingReconciliation) — what "open purchase orders" means in everyday speech. closed = finished (received, reconciled, fulfilled, closed, closedShort, canceled). Omit for both. | |
| offset | No | Zero-based offset for paging (default 0). | |
| status | No | Exact lifecycle status, one value (e.g. created = draft, issued = sent to the supplier, closed). Not for "open POs" — use state=open; status=open matches only unsent orders still being edited. Omit for all statuses. | |
| createdTo | No | Only POs created on/before this ISO 8601 instant, or through the end of this local day for a bare YYYY-MM-DD. | |
| createdFrom | No | Only POs created on/after this ISO 8601 instant, or from the start of this local day for a bare YYYY-MM-DD. | |
| numberSearch | No | Case-insensitive substring match on the PO number. | |
| partnerSearch | No | Case-insensitive substring match on the vendor name. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| limit | No | ||
| total | No | ||
| offset | No | ||
| orders | No |