List purchase orders
list_purchase_ordersThe organization's purchase orders from its last ERP export, with their lines grouped by order number. Orders with an open line by default, each with all its lines: use it for "what is still to come from Supplier X" and "has PO 4512 shipped". Each line has the quantities ordered, received (the ERP's figure), remaining, invoiced and packed (matched so far to supplier invoices and packing lists on shipments), the unit price, the date it is expected, and the product. Each order has shipment_ids (shp_...): the shipments carrying its goods, if any; an order with none has not been seen on a shipment yet. To see one supplier's orders, find its id with list_companies and pass it as supplier_id (an order whose supplier Trackberry does not know yet has no id and is not matched by it). query matches order number, article, supplier or description. Returns orders, newest first, with has_more and the id (por_...) of the last one to pass as starting_after.
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": "list_purchase_orders"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | How many results to return, 1 to 100. | |
| query | No | Matches an order number such as "4512" or "AA/35.264", an article code, a supplier or a description. | |
| status | No | Orders with an open line (default), with a closed line, or all. | open |
| supplier_id | No | Only this supplier's lines. A company id such as "cmp_123", from list_companies. | |
| starting_after | No | Paging cursor: the id of the last result of the previous page. Only when has_more was true. |