List purchase orders

Returns a paginated list of purchase orders for the company. This endpoint provides comprehensive filtering, sorting, and pagination capabilities to help you query purchase order history effectively.

Key Features

  • Pagination: Control result size with _start and _end parameters (default: 25 items)
  • Sorting: Sort by any field in ascending or descending order
  • Filtering: Apply complex filters on multiple fields including amounts, types, statuses, and dates
  • Relationships: Automatically includes related entities (business partners, items, payables)

Authorization

  • Regular users can only view purchase orders from companies they are members of.
  • Admin users can view all purchase orders.

Response Structure

The response includes the purchase order details along with nested relationships:

  • business_partner: Complete vendor/supplier information
  • items: List of purchase order items with approval status and linked invoices
  • payables: Related fiscal invoices (when items are linked)
  • type: The specific purchase order type (AgainstInvoice, ByMilestone, or ByPercentage)

Purchase Order Types

  1. AgainstInvoice: Single invoice purchase order (exactly 1 item at 100%)
  2. ByMilestone: Multiple named deliverables with percentages (e.g., Design 30%, Development 70%)
  3. ByPercentage: Multiple payment stages with percentages (e.g., 30% advance, 70% final)

Common Use Cases

  1. Get recent purchase orders: Use default pagination without filters
  2. Find high-value orders: Filter by amount range
  3. Check approval status: Filter by item review status
  4. Audit trail: Sort by created_at or updated_at with date filters
  5. Vendor reconciliation: Filter by business_partner_id
  6. Budget tracking: Filter by type and sum amounts
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
integer
≥ 0

If all the transactions where in an array, this would represent the index of the first item returned in the response

integer
≥ 0

If all the transactions where in an array, this would represent the index of the last item returned in the response

string
enum

The order method, which can be ascending or descending

Allowed:
string

The field used to sort, the example illustrates a response that would be sorted by the creation date

string

Only as an example of filtering results that have an amount less than $11000. For more detailed explanation, go to the How to filter results section.

string

Filter by purchase order type. Supports JSON operators:

  • Single type: "Erp::Payouts::PurchaseOrders::AgainstInvoice"
  • Multiple types: {"$in": ["Erp::Payouts::PurchaseOrders::ByMilestone", "Erp::Payouts::PurchaseOrders::ByPercentage"]}

Available types:

  • Erp::Payouts::PurchaseOrders::AgainstInvoice: Single invoice PO (1 item at 100%)
  • Erp::Payouts::PurchaseOrders::ByMilestone: Named deliverables with percentages
  • Erp::Payouts::PurchaseOrders::ByPercentage: Payment stages with percentages
uuid

Filter purchase orders by vendor/supplier ID

string

Filter by purchase order folio number. Supports:

  • Exact match: "OC-2025-001"
  • Pattern match: {"$like": "OC-2025-%"}
  • Multiple folios: {"$in": ["OC-2025-001", "OC-2025-002"]}
string

Filter by creation date using JSON operators:

  • After date: {"$gte": "2025-01-01T00:00:00Z"}
  • Before date: {"$lt": "2025-02-01T00:00:00Z"}
  • Date range: {"$gte": "2025-01-01T00:00:00Z", "$lt": "2025-02-01T00:00:00Z"}
string

Filter by last update date. Same operators as created_at.

string

Filter by purchase order description. Supports:

  • Exact match: "Office equipment purchase"
  • Partial match: {"$like": "%equipment%"}
  • Case insensitive: {"$ilike": "%EQUIPMENT%"}
string
enum

Filter by currency

Allowed:
string

Filter by cancellation status:

  • Cancelled POs: {"$ne": null}
  • Active POs: null
Headers
uuid
required

UUID of the company on whose behalf the request is made. Required for every Pay endpoint. See The company-id header for details on how to obtain a value for this header and the error responses to expect when it is missing or invalid.

If the deprecated company_id query parameter is also sent, both values must match; the API returns 422 Unprocessable Entity when they disagree.

Responses

401

Unauthorized — typically missing/invalid Authorization or missing company-id header. The response body is empty for this guard. Branch your client logic on the status code, not the body. See Errors for details.

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json