po.get

A purchase order with its lines, what was received (in job cost) and the supplier's bill. Owner or office.

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

When to use it

A purchase order with its lines, what was received (in job cost) and the supplier's bill. Owner or office.

What to tell the owner

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

Input

FieldTypeRequired
po_idstring (uuid)yes

Example

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

Output

FieldTypeAlways there
po_idstring (uuid)yes
shop_idstring (uuid)yes
numberintegeryes
vendor_idstring (uuid)yes
vendor_namestringyes
job_idstring (uuid)yes
statusstring (one of draft, ordered, partial, received, cancelled)yes
note['string', 'null']yes
ordered_at['string', 'null', ' ', '(', 'd', 'a', 't', 'e', '-', 't', 'i', 'm', 'e', ')']yes
total_minorintegeryes
received_cost_minorintegeryes
bill_minor['integer', 'null']yes
bill_ref['string', 'null']yes
bill_difference_minor['integer', 'null']yes
linesarrayyes
lines[].line_idstring (uuid)yes
lines[].line_nointegeryes
lines[].namestringyes
lines[].unitstringyes
lines[].quantitynumberyes
lines[].unit_cost_minorintegeryes
lines[].unit_price_minor['integer', 'null']yes
lines[].taxablebooleanyes
lines[].received_quantitynumberyes
lines[].cost_minorintegeryes
lines[].received_cost_minorintegeryes
created_atstring (date-time)yes
{
  "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.