> ## Documentation Index
> Fetch the complete documentation index at: https://developer.vetcove.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch a purchase order

> Retrieves a purchase order by its ID.

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.



## OpenAPI

````yaml get /ext/v2/purchase-orders/{purchase_order_id}/
openapi: 3.1.0
info:
  description: ''
  title: NinjaAPI
  version: 2.0.0
servers:
  - url: https://connect.vetcove.com/
security: []
paths:
  /ext/v2/purchase-orders/{purchase_order_id}/:
    get:
      tags:
        - Inventory
      summary: Fetch a purchase order
      description: >-
        Retrieves a purchase order by its ID.


        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.
      operationId: purchase_order_get
      parameters:
        - description: The ID of the purchase order to fetch
          in: path
          name: purchase_order_id
          required: true
          schema:
            description: The ID of the purchase order to fetch
            title: Purchase Order Id
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalPurchaseOrderSchema'
          description: OK
      security:
        - ExternalAPIAuth: []
components:
  schemas:
    ExternalPurchaseOrderSchema:
      properties:
        clinic_id:
          description: The ID of the clinic this purchase order belongs to
          title: Clinic Id
          type: integer
        created:
          description: The datetime this object was created.
          format: date-time
          title: Created
          type: string
        effective_total:
          description: The effective total of the order, in cents
          title: Effective Total
          type: integer
        id:
          description: The unique identifier for the purchase order
          title: Id
          type: integer
        modified:
          description: >-
            The datetime this object was last modified; changes to related
            entities will not update this field.
          format: date-time
          title: Modified
          type: string
        order_datetime:
          description: The datetime when the order was placed
          format: date-time
          title: Order Datetime
          type: string
        po_number:
          description: The purchase order number
          title: Po Number
          type: string
        purchase_order_items:
          description: The line items included in this purchase order
          items:
            $ref: '#/components/schemas/ExternalPurchaseOrderItemSchema'
          title: Purchase Order Items
          type: array
        raw_total:
          description: The raw total of the order, in cents
          title: Raw Total
          type: integer
        status:
          $ref: '#/components/schemas/PurchaseOrderStatus'
          description: The current status of the purchase order
        supplier:
          description: The name of the supplier for this order
          title: Supplier
          type: string
      required:
        - created
        - modified
        - id
        - clinic_id
        - order_datetime
        - po_number
        - supplier
        - status
        - raw_total
        - effective_total
        - purchase_order_items
      title: ExternalPurchaseOrderSchema
      type: object
    ExternalPurchaseOrderItemSchema:
      properties:
        created:
          description: The datetime this object was created.
          format: date-time
          title: Created
          type: string
        id:
          description: The unique identifier for the purchase order item
          title: Id
          type: integer
        inventory_id:
          anyOf:
            - type: integer
            - type: 'null'
          description: The inventory id for this item
          title: Inventory Id
        inventory_shortcode:
          default: ''
          description: The inventory shortcode (human-readable code) for this item
          title: Inventory Shortcode
          type: string
        modified:
          description: >-
            The datetime this object was last modified; changes to related
            entities will not update this field.
          format: date-time
          title: Modified
          type: string
        quantity:
          anyOf:
            - type: number
            - type: string
          description: The quantity ordered
          title: Quantity
        sku:
          description: The SKU identifier for this item
          title: Sku
          type: string
        total_price:
          description: The total price for this line item, in cents
          title: Total Price
          type: integer
        unit_of_measure:
          description: The unit of measure for this item
          title: Unit Of Measure
          type: string
      required:
        - created
        - modified
        - id
        - inventory_id
        - sku
        - quantity
        - total_price
        - unit_of_measure
      title: ExternalPurchaseOrderItemSchema
      type: object
    PurchaseOrderStatus:
      enum:
        - DRAFT
        - PENDING
        - PARTIALLY_RECEIVED
        - FULLY_RECEIVED
        - CANCELED
        - RETURNED
        - CLOSED
      title: PurchaseOrderStatus
      type: string
  securitySchemes:
    ExternalAPIAuth:
      scheme: bearer
      type: http

````