Query purchase orders

Prev Next
Get
/v1/purchaseOrders

Retrieves Purchase Order records matching the provided query filters.

At least one filter must be supplied. All filters are combined with AND and use exact equality matching.


Query Parameters

Parameter Type Description
id string Internal Purchase Order ID.
ref string External reference number.
supplierId string Vendor ID.
amount number Total amount of the PO.
isClosed integer 0 = open, 1 = closed.

Response Fields

The response uses the same Purchase Order data model documented under the Import tag. See PurchaseOrder and PurchaseOrderLineItem schemas below for the field definitions.

Security
HTTP
Type bearer

Enter your API token.

Query parameters
id
string

Internal Purchase Order ID.

ref
string

External reference number.

supplierId
string

Vendor ID.

amount
number

Total amount of the PO.

isClosed
integer

0 = open, 1 = closed.

Valid values[ 0, 1 ]
Responses
200

Records retrieved

openPurchaseOrders

Open Purchase Orders

{
  "status": "OK",
  "msg": "2 records retrieved.",
  "result": [
    {
      "id": "PO-001",
      "ref": "PO-2024-001",
      "supplierId": "SUP-123",
      "created": "2025-01-15T10:00:00Z",
      "modified": "2025-01-15T10:00:00Z",
      "date": "2024-01-15",
      "dueDate": "2024-02-15",
      "amount": 1500.0,
      "description": "Office supplies order",
      "notes": "Deliver before noon",
      "isClosed": 0,
      "lineItems": [
        {
          "id": "LINE-001",
          "itemId": "ITEM-001",
          "accountId": "EXP-100",
          "classId": "CLASS-100",
          "description": "Paper",
          "qty": 100,
          "price": 10.0,
          "total": 1000.0
        },
        {
          "id": "LINE-002",
          "itemId": "ITEM-002",
          "accountId": "EXP-100",
          "classId": "CLASS-100",
          "description": "Pens",
          "qty": 50,
          "price": 10.0,
          "total": 500.0
        }
      ]
    },
    {
      "id": "PO-002",
      "ref": "PO-2024-002",
      "supplierId": "SUP-456",
      "created": "2025-02-01T09:00:00Z",
      "modified": "2025-02-01T09:00:00Z",
      "date": "2024-02-01",
      "dueDate": "2024-03-01",
      "amount": 750.0,
      "description": "Restock toner",
      "notes": null,
      "isClosed": 0,
      "lineItems": [
        {
          "id": "LINE-003",
          "itemId": "ITEM-003",
          "accountId": "EXP-100",
          "classId": "CLASS-100",
          "description": "Toner cartridges",
          "qty": 10,
          "price": 75.0,
          "total": 750.0
        }
      ]
    }
  ]
}
Expand All
object
status
string
Valid values[ "OK" ]
msg
string

Result message (e.g., "N records retrieved.").

result
Array of object (PurchaseOrder)
object

Purchase Order record. Shares the same data model used by the Import endpoint.

id
string | null

Internal Purchase Order ID.

ref
string | null

External reference number.

supplierId
string | null

Vendor ID.

apAccountId
string | null

AP account reference ID.

classId
string | null

Accounting class reference ID.

date
string (date) | null

Issue date (YYYY-MM-DD).

dueDate
string (date) | null

Payment due date (YYYY-MM-DD).

receiptDate
string (date) | null

Date received (YYYY-MM-DD). Populated for Item Receipts.

description
string | null

PO memo or description.

notes
string | null

Notes to the vendor.

isClosed
integer | null

0 = open, 1 = closed.

Valid values[ 0, 1 ]
isReceived
integer | null

0 = no, 1 = yes.

Valid values[ 0, 1 ]
amount
number | null

Total amount of the PO.

created
string | null

Timestamp record was created (YYYY-MM-DD HH:mm:ss).

modified
string | null

Timestamp record was last modified (YYYY-MM-DD HH:mm:ss).

lineItems
Array of object (PurchaseOrderLineItem)

Line items on the PO.

object
id
string | null

Line item identifier.

itemId
string | null

Reference to item master record.

accountId
string | null

GL account reference ID.

customerId
string | null

Customer reference for billable items.

classId
string | null

Accounting class reference ID.

description
string | null

Item description.

qty
number | null

Quantity.

price
number | null

Unit price.

total
number | null

Line total.

receivedQty
number | null

Quantity received. Populated for Item Receipts.

receivedTotal
number | null

Received line total. Populated for Item Receipts.

400

Bad Request (no recognized query parameter, or invalid type)

noFilters

No Recognized Query Parameters

{
  "status": "Error",
  "msg": "Invalid query parameters.",
  "result": null
}
invalidType

Invalid Parameter Type

{
  "status": "Error",
  "msg": "Value 'foo' does not match type 'int' at path 'isClosed'.",
  "result": null
}
object
status
string
Valid values[ "Error" ]
msg
string
result
401

Unauthorized

404

No Purchase Orders matched the supplied filters.

noRecords

No Records

{
  "status": "Error",
  "msg": "No record matching your query.",
  "result": null
}
object
status
string
Valid values[ "Error" ]
msg
string
result