---
title: "List purchase orders"
method: GET
path: "/v1/purchase-orders"
tags: ["v1 - Purchase Orders"]
---

# List purchase orders

`GET /v1/purchase-orders`

## Request

- Base URL: `https://light.inc` (the document declares no server; this is the origin it was published from)
- URL: `https://light.inc/v1/purchase-orders`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer

Returns a paginated list of purchase orders

## Query parameters

- `sort` string: Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas. Available directions: `asc`, `desc`. Available fields: `purchaseOrderId`, `erpNumber`, `vendorName`, `ownerName`, `ownerId`, `companyEntityId`, `state`, `closedAt`, `cancelledAt`, `createdAt`, `totalAmount`.
- `filter` string: Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas. Available operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`. - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). Available fields: `purchaseOrderId`, `vendorId`, `ownerId`, `state`, `erpNumber`, `updatedAt`.
- `limit` integer
- `offset` integer
- `cursor` string

## Response `default`

default response

- ExternalPaginatedResponseV1ModelExternalBffPurchaseOrderV1Model
  - `records` ExternalBffPurchaseOrderV1Model[]: List of records for the current page
    - `id` string, uuid
    - `companyId` string, uuid
    - `createdBy` string, uuid, nullable
    - `companyEntityId` string, uuid, nullable
    - `purchaseRequestId` string, uuid, nullable
    - `state` 'IN_DRAFT' | 'RESET_PENDING' | 'APPROVED_ACCOUNTING_ENTRY_PENDING' | 'OPEN' | 'CLOSE_PENDING' | 'CLOSED' | 'CANCEL_PENDING' | 'CANCELLED': ⚠️ This enum is not exhaustive; new values may be added in the future.
    - `erpNumber` string, nullable
    - `description` string, nullable
    - `currency` string, nullable
    - `totalAmount` integer
    - `totalNetAmount` integer
    - `totalTaxAmount` integer
    - `totalMatchedAmount` integer
    - `ownerId` string, uuid, nullable
    - `ownerName` string, nullable
    - `vendorId` string, uuid, nullable
    - `vendorEmail` string, nullable
    - `vendorName` string, nullable
    - `vendorAvatarUrl` string, nullable
    - `documentKey` string, nullable
    - `failureContext` ExternalUiClientExceptionV1Model, nullable: Failure context when vendor onboarding fails.
      - `name` string: The error name
      - `type` 'BAD_REQUEST' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'NOT_FOUND' | 'CONFLICT' | 'UNPROCESSABLE_CONTENT': The error type ⚠️ This enum is not exhaustive; new values may be added in the future.
      - `errors` ExternalUiClientExceptionErrorV1Model[]: List of errors providing details about what went wrong
        - `type` string: A string code identifying the error type
        - `message` string: A human-readable message providing more details about the error
        - `path` string[], nullable: Optional path of the error when the error is for a specific field. Used mostly on BAD_REQUEST errors, that path will match the field name on the request object
        - `context` object, nullable: Optional context providing additional information about the error. This can include any relevant data that might help in understanding or resolving the error
    - `purchaseOrderDate` string, date, nullable
    - `deliveryAddress` string, nullable
    - `deliveryDate` string, date, nullable
    - `erpSyncedAt` string, date-time, nullable
    - `lockedAt` string, date-time, nullable
    - `closedAt` string, date-time, nullable
    - `cancelledAt` string, date-time, nullable
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `lines` ExternalBffPurchaseOrderLineV1Model[]
      - `id` string, uuid
      - `companyId` string, uuid
      - `purchaseOrderId` string, uuid
      - `description` string, nullable
      - `quantity` integer, nullable
      - `unitPrice` integer, nullable
      - `accountId` string, uuid, nullable
      - `accountLabel` string, nullable
      - `taxCodeId` string, uuid, nullable
      - `amount` integer, nullable
      - `taxAmount` integer, nullable
      - `netAmount` integer, nullable
      - `taxCodeLabel` string, nullable
      - `costCenterId` string, uuid, nullable
      - `costCenterName` string, nullable
      - `createdAt` string, date-time
      - `updatedAt` string, date-time
  - `hasMore` boolean: Boolean flag indicating if there are more records available
  - `total` integer, nullable: Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.
  - `nextCursor` string, nullable: Cursor for fetching the next page (only for cursor pagination)
  - `prevCursor` string, nullable: Cursor for fetching the previous page (only for cursor pagination)

---

[API](https://skmtc.dev/light/apis/light-api.md) - [All operations](https://skmtc.dev/light/apis/light-api/llms.txt) - [OpenAPI document](https://skmtc.dev/light/apis/light-api/revisions/84f51306f648?raw)
