# Purchase Orders

`GET /accounting/purchase-orders`

Group: Accounting › Purchase Orders · Operation ID: `purchaseOrders`

Returns a list of purchase orders, header only. To filter by number, external reference, approval or budget status, currency, payment terms, vendor or legal entity, use POST accounting/purchase-orders/search. The full record with line items comes from GET accounting/purchase-orders/:id or search.

[Open in the interactive reference](https://docs.api.lensing.ai/?op=purchaseOrders)

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Api-Version` | header | `"v1"` | yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version `v1`. |

## Query surface

- `id` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `poNumber` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `externalPONumber` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `approvalStatus` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `budgetStatus` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `status` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `currency` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `startDate` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `endDate` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `needByDate` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `paymentTerms` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `lastModifiedDate` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- Orderable: id, poNumber, approvalStatus, budgetStatus, status, currency, totalAmount, invoicedTotalAmount, receivedTotalAmount, startDate, endDate, needByDate, lastModifiedDate
- Selectable: id, poNumber, description, internalDescription, externalMemo, externalPONumber, approvalStatus, budgetStatus, status, currency, totalAmount, invoicedTotalAmount, receivedTotalAmount, startDate, endDate, needByDate, paymentTerms, vendorName, vendorContactEmail, entityName, lastModifiedDate

## Response

`200` Success

Under `data`, an array of purchaseOrdersRow:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | no | The unique identifier for the purchase order. |
| `poNumber` | string or null | no | The purchase order number, for example 'PO-3'. Absent while none has been assigned. |
| `description` | string or null | no | The description of the order, shown to the vendor. |
| `internalDescription` | string or null | no | Internal notes on the order, not shown to the vendor. |
| `externalMemo` | string or null | no | A memo intended for the vendor. |
| `externalPONumber` | string or null | no | The order reference in the vendor's or an upstream system. It is not unique. |
| `approvalStatus` | string or null | no | The approval status of the order. Possible values: 'approved', 'pendingApproval', 'rejected'. |
| `budgetStatus` | string or null | no | The budget-check status of the order. Possible values: 'approved', 'rejected', 'pendingApproval'. Independent of approvalStatus. |
| `status` | string or null | no | The order lifecycle status. Possible values: 'open', 'inprogress', 'closed', 'overMatched'. This is not the vendor-bill matching status, which is per line in each line's matchStatus. |
| `currency` | string or null | no | The currency the order is denominated in. Format ISO 4217, for example 'USD'. Governs every amount on the order and its lines. |
| `totalAmount` | string (decimal) or null | no | The total ordered amount, the sum of the line totals, in the order currency. |
| `invoicedTotalAmount` | string (decimal) or null | no | The portion of the order already invoiced by vendor bills, in the order currency. |
| `receivedTotalAmount` | string (decimal) or null | no | The portion of the order already received as goods, in the order currency. |
| `startDate` | string (date) or null | no | The first day of the period the order covers. Format YYYY-MM-DD. |
| `endDate` | string (date) or null | no | The last day of the period the order covers. Format YYYY-MM-DD. |
| `needByDate` | string (date) or null | no | The date the goods or services are needed by. Format YYYY-MM-DD. |
| `paymentTerms` | string or null | no | The payment-terms code applied to this order, for example 'net30', 'net60', 'dueOnReceipt' or 'custom'. Inherited from the vendor unless overridden. |
| `vendorName` | string or null | no | The name of the vendor this order is placed with. |
| `vendorContactEmail` | string or null | no | The main contact email at the vendor. |
| `entityName` | string or null | no | The name of the legal entity this order is placed by. |
| `lastModifiedDate` | string (date-time) or null | no | The date and time the purchase order last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |

## Statuses

- `400` — Invalid request or business failure
- `401` — Missing or invalid access token
- `403` — Not authorized
- `404` — Not found
- `429` — Too many requests
- `500` — Internal server error
