---
title: "List purchase orders"
method: GET
path: "/ext/v2/purchase-orders/"
tags: ["Inventory"]
---

# List purchase orders

`GET /ext/v2/purchase-orders/`

## Request

- Base URL: `https://connect.vetcove.com`
- URL: `https://connect.vetcove.com/ext/v2/purchase-orders/`
- Auth: HTTP bearer

Returns a list of purchase orders for a clinic. The purchase orders are sorted by creation date, with the most recent appearing first.

A **purchase order** tracks an order placed by a clinic to a supplier for inventory items. Each purchase order contains one or more line items identifying the inventory being ordered, the quantity, and the price. Purchase orders are created in draft status and can later be finalized in the pims web ui.

## Query parameters

- `ids` integer[], nullable: When provided, filters to objects with these IDs.
- `ending_before` integer, nullable: A cursor used for pagination. Fetches the page of results ending immediately before the object with the given ID. Cannot be used at the same time as `starting_after`.
- `starting_after` integer, nullable: A cursor used for pagination. Fetches the page of results starting immediately after the given ID. Cannot be used at the same time as `ending_before`.
- `limit` integer: The maximum number of items to return per page.
- `clinic_id` integer, required: The ID of the clinic to list purchase orders for

## Response `200`

OK

- ExternalPurchaseOrderSchemaList
  - `data` ExternalPurchaseOrderSchema[], required: A single page of data contained within this list.
    - `clinic_id` integer, required: The ID of the clinic this purchase order belongs to
    - `created` string, date-time, required: The datetime this object was created.
    - `effective_total` integer, required: The effective total of the order, in cents
    - `id` integer, required: The unique identifier for the purchase order
    - `modified` string, date-time, required: The datetime this object was last modified; changes to related entities will not update this field.
    - `order_datetime` string, date-time, required: The datetime when the order was placed
    - `po_number` string, required: The purchase order number
    - `purchase_order_items` ExternalPurchaseOrderItemSchema[], required: The line items included in this purchase order
      - `created` string, date-time, required: The datetime this object was created.
      - `id` integer, required: The unique identifier for the purchase order item
      - `inventory_id` integer, nullable, required: The inventory id for this item
      - `inventory_shortcode` string: The inventory shortcode (human-readable code) for this item
      - `modified` string, date-time, required: The datetime this object was last modified; changes to related entities will not update this field.
      - `quantity` union, required: The quantity ordered
        - number
        - string
      - `sku` string, required: The SKU identifier for this item
      - `total_price` integer, required: The total price for this line item, in cents
      - `unit_of_measure` string, required: The unit of measure for this item
    - `raw_total` integer, required: The raw total of the order, in cents
    - `status` 'DRAFT' | 'PENDING' | 'PARTIALLY_RECEIVED' | 'FULLY_RECEIVED' | 'CANCELED' | 'RETURNED' | 'CLOSED', required
    - `supplier` string, required: The name of the supplier for this order
  - `has_more` boolean: Whether there are more pages or data in this list.
  - `next_page` string, required: A URL linking to the next page of this list.
  - `type` string: Type of this object. Always `list`.

---

[API](https://skmtc.dev/vetcove/apis/ninjaapi.md) - [All operations](https://skmtc.dev/vetcove/apis/ninjaapi/llms.txt) - [OpenAPI document](https://skmtc.dev/vetcove/apis/ninjaapi/revisions/4ceaed956e15?raw)
