> ## 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.

# Create a purchase order item

> This endpoint is available to Group API Keys only.

Creates a new line item on an existing draft purchase order.

A **purchase order item** is a single line item on a purchase order, identifying the inventory being ordered, the quantity, and the price. The quantity specified in the payload is expected to be in the same unit of measure as the configured unit of measure for the inventory code.



## OpenAPI

````yaml post /ext/v2/purchase-order-items/
openapi: 3.1.0
info:
  description: ''
  title: NinjaAPI
  version: 2.0.0
servers:
  - url: https://connect.vetcove.com/
security: []
paths:
  /ext/v2/purchase-order-items/:
    post:
      tags:
        - Inventory
      summary: Create a purchase order item
      description: >-
        This endpoint is available to Group API Keys only.


        Creates a new line item on an existing draft purchase order.


        A **purchase order item** is a single line item on a purchase order,
        identifying the inventory being ordered, the quantity, and the price.
        The quantity specified in the payload is expected to be in the same unit
        of measure as the configured unit of measure for the inventory code.
      operationId: purchase_order_item_create
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseOrderItemStandaloneCreateSchema'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalPurchaseOrderItemSchema'
          description: Created
      security:
        - ExternalAPIAuth: []
components:
  schemas:
    PurchaseOrderItemStandaloneCreateSchema:
      properties:
        inventory_id:
          anyOf:
            - exclusiveMinimum: 0
              type: integer
            - type: 'null'
          description: >-
            The inventory id identifying the item to order. Must provide exactly
            one of inventory_shortcode or inventory_id, not both
          title: Inventory Id
        inventory_shortcode:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The inventory shortcode (human-readable code) identifying the item
            to order. Must provide exactly one of inventory_shortcode or
            inventory_id, not both. Inventory shortcodes are deprecated for new
            integrations; supported during a deprecation window for existing
            callers.
          title: Inventory Shortcode
        purchase_order_id:
          description: The ID of the purchase order to add this item to
          title: Purchase Order Id
          type: integer
        quantity:
          anyOf:
            - exclusiveMinimum: 0
              type: number
            - type: string
          description: The quantity to order (must be greater than 0)
          title: Quantity
        sku:
          default: ''
          description: An optional SKU identifier for this item
          title: Sku
          type: string
        total_price:
          default: 0
          description: The total price for this line item, in cents
          minimum: 0
          title: Total Price
          type: integer
      required:
        - quantity
        - purchase_order_id
      title: PurchaseOrderItemStandaloneCreateSchema
      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
  securitySchemes:
    ExternalAPIAuth:
      scheme: bearer
      type: http

````