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

# List Purchase Orders

> List purchase orders with pagination.



## OpenAPI

````yaml /api/openapi-cutmake.json get /purchase-orders
openapi: 3.1.0
info:
  title: VM App API
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /purchase-orders:
    get:
      tags:
        - Purchase Orders
      summary: List Purchase Orders
      description: List purchase orders with pagination.
      operationId: list_purchase_orders_purchase_orders_get
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 10
            title: Limit
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status
        - name: poType
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Potype
        - name: orderType
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Ordertype
        - name: productionOrderId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Productionorderid
        - name: workOrderId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Workorderid
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort
          in: query
          required: false
          schema:
            type: string
            default: '-created_at'
            title: Sort
        - name: X-Org-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Org-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedPurchaseOrdersResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    PaginatedPurchaseOrdersResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/PurchaseOrderResponse'
          type: array
          title: Data
        pagination:
          $ref: >-
            #/components/schemas/routers__external__purchase_orders__PaginationInfo
      type: object
      required:
        - data
        - pagination
      title: PaginatedPurchaseOrdersResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PurchaseOrderResponse:
      properties:
        id:
          type: string
          title: Id
        documentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentid
        poType:
          type: string
          title: Potype
        orderType:
          anyOf:
            - type: string
            - type: 'null'
          title: Ordertype
        workOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Workorderid
        workOrderDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Workorderdocumentid
        supplierId:
          anyOf:
            - type: string
            - type: 'null'
          title: Supplierid
        supplierVendor:
          anyOf:
            - type: string
            - type: 'null'
          title: Suppliervendor
        supplierRefPo:
          anyOf:
            - type: string
            - type: 'null'
          title: Supplierrefpo
        materialRequestId:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialrequestid
        mrIds:
          anyOf:
            - type: string
            - type: 'null'
          title: Mrids
        mrDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Mrdocumentid
        productionOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Productionorderid
        salesOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Salesorderid
        orderDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Orderdate
        expectedDeliveryDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Expecteddeliverydate
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        subtotal:
          anyOf:
            - type: number
            - type: 'null'
          title: Subtotal
        taxRate:
          anyOf:
            - type: number
            - type: 'null'
          title: Taxrate
        taxAmount:
          anyOf:
            - type: number
            - type: 'null'
          title: Taxamount
        total:
          anyOf:
            - type: number
            - type: 'null'
          title: Total
        purpose:
          anyOf:
            - type: string
            - type: 'null'
          title: Purpose
        expenseCategory:
          anyOf:
            - type: string
            - type: 'null'
          title: Expensecategory
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
        frequency:
          anyOf:
            - type: string
            - type: 'null'
          title: Frequency
        managementAccountId:
          anyOf:
            - type: string
            - type: 'null'
          title: Managementaccountid
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        createdAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdat
        itemsCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Itemscount
        dueDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Duedate
        lineItems:
          anyOf:
            - items:
                $ref: '#/components/schemas/PurchaseOrderLineItem'
              type: array
            - type: 'null'
          title: Lineitems
      type: object
      required:
        - id
        - poType
      title: PurchaseOrderResponse
    routers__external__purchase_orders__PaginationInfo:
      properties:
        page:
          type: integer
          title: Page
        limit:
          type: integer
          title: Limit
        total:
          type: integer
          title: Total
        totalPages:
          type: integer
          title: Totalpages
        hasNext:
          type: boolean
          title: Hasnext
        hasPrev:
          type: boolean
          title: Hasprev
      type: object
      required:
        - page
        - limit
        - total
        - totalPages
        - hasNext
        - hasPrev
      title: PaginationInfo
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PurchaseOrderLineItem:
      properties:
        id:
          type: string
          title: Id
        purchaseOrderId:
          type: string
          title: Purchaseorderid
        itemNumber:
          anyOf:
            - type: integer
            - type: 'null'
          title: Itemnumber
        materialId:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialid
        materialSkuId:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialskuid
        supplierId:
          anyOf:
            - type: string
            - type: 'null'
          title: Supplierid
        supplierName:
          anyOf:
            - type: string
            - type: 'null'
          title: Suppliername
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
        color:
          anyOf:
            - type: string
            - type: 'null'
          title: Color
        size:
          anyOf:
            - type: string
            - type: 'null'
          title: Size
        uom:
          anyOf:
            - type: string
            - type: 'null'
          title: Uom
        qty:
          anyOf:
            - type: number
            - type: 'null'
          title: Qty
        unitPrice:
          anyOf:
            - type: number
            - type: 'null'
          title: Unitprice
        amount:
          anyOf:
            - type: number
            - type: 'null'
          title: Amount
        linkedMrLineId:
          anyOf:
            - type: string
            - type: 'null'
          title: Linkedmrlineid
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
      type: object
      required:
        - id
        - purchaseOrderId
      title: PurchaseOrderLineItem
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/login

````