po.list

List purchase orders for the shop, or for one job or supplier, newest first. Owner or office.

WhoAgents can call this
RESTGET /v1/purchase-orders
MCP toolpo_list
Writesno
AreaShop

When to use it

List purchase orders for the shop, or for one job or supplier, newest first. Owner or office.

What to tell the owner

Tell them what you found in plain words. Don't read back raw fields.

Input

FieldTypeRequired
shop_idstring (uuid)yes
job_idstring (uuid)no
vendor_idstring (uuid)no
limitintegerno

Example

GET https://doingwork.work/v1/purchase-orders?shop_id=00000000-0000-4000-8000-000000000000

Output

FieldTypeAlways there
dataarrayyes
data[].po_idstring (uuid)yes
data[].shop_idstring (uuid)yes
data[].numberintegeryes
data[].vendor_idstring (uuid)yes
data[].vendor_namestringyes
data[].job_idstring (uuid)yes
data[].statusstring (one of draft, ordered, partial, received, cancelled)yes
data[].note['string', 'null']yes
data[].ordered_at['string', 'null', ' ', '(', 'd', 'a', 't', 'e', '-', 't', 'i', 'm', 'e', ')']yes
data[].total_minorintegeryes
data[].received_cost_minorintegeryes
data[].bill_minor['integer', 'null']yes
data[].bill_ref['string', 'null']yes
data[].bill_difference_minor['integer', 'null']yes
data[].linesarrayyes
data[].lines[].line_idstring (uuid)yes
data[].lines[].line_nointegeryes
data[].lines[].namestringyes
data[].lines[].unitstringyes
data[].lines[].quantitynumberyes
data[].lines[].unit_cost_minorintegeryes
data[].lines[].unit_price_minor['integer', 'null']yes
data[].lines[].taxablebooleanyes
data[].lines[].received_quantitynumberyes
data[].lines[].cost_minorintegeryes
data[].lines[].received_cost_minorintegeryes
data[].created_atstring (date-time)yes
{
  "data": [
    {
      "po_id": "00000000-0000-4000-8000-000000000000",
      "shop_id": "00000000-0000-4000-8000-000000000000",
      "number": 1,
      "vendor_id": "00000000-0000-4000-8000-000000000000",
      "vendor_name": "...",
      "job_id": "00000000-0000-4000-8000-000000000000",
      "status": "draft",
      "note": "...",
      "ordered_at": "...",
      "total_minor": 50000,
      "received_cost_minor": 50000,
      "bill_minor": "...",
      "bill_ref": "...",
      "bill_difference_minor": "...",
      "lines": [
        {
          "line_id": "00000000-0000-4000-8000-000000000000",
          "line_no": 1,
          "name": "Ruiz Plumbing",
          "unit": "...",
          "quantity": "...",
          "unit_cost_minor": 50000,
          "unit_price_minor": "...",
          "taxable": true,
          "received_quantity": "...",
          "cost_minor": 50000,
          "received_cost_minor": 50000
        }
      ],
      "created_at": "..."
    }
  ]
}

Errors

CodeStatusWhat to do
invalid_input, invalid_token, rate_limitedCan happen on any call. See errors.