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

# Lists purchase orders



## OpenAPI

````yaml /swagger.yaml get /purchase_orders
openapi: 3.0.1
info:
  title: Fohlio REST API
  description: This is the documentation for the Fohlio REST API.
  version: 1.0.0
servers:
  - url: /openapi
  - url: https://app.fohlio.com/be/openapi
security: []
paths:
  /purchase_orders:
    get:
      tags:
        - Purchase Order
      summary: Lists purchase orders
      operationId: purchase_orders#list
      parameters:
        - name: project_id
          in: query
          schema:
            type: array
            items:
              type: integer
          required: false
        - name: page
          in: query
          schema:
            default: 1
            minimum: 1
            type: string
          required: false
        - name: per_page
          in: query
          schema:
            type: integer
            default: 25
            minimum: 1
            maximum: 100
          required: false
        - name: since
          in: query
          schema:
            oneOf:
              - type: integer
              - type: string
          required: false
        - name: since_updated_at_date
          in: query
          schema:
            oneOf:
              - type: string
          required: false
        - name: status
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - draft
                - open
                - closed
                - approved
                - rejected
                - review
          required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/purchaseOrders'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
        - apiKey: []
components:
  schemas:
    purchaseOrders:
      type: array
      items:
        $ref: '#/components/schemas/purchaseOrder'
    error:
      type: object
      properties:
        error:
          type: string
    purchaseOrder:
      type: object
      properties:
        id:
          type: integer
        rev_num:
          type: string
          nullable: true
        last_revision_num:
          type: string
          nullable: true
        project_id:
          type: integer
        creator_id:
          type: integer
        label:
          type: string
        status:
          type: string
          enum:
            - draft
            - review
            - approved
            - rejected
            - open
            - shipment_created
            - arrival_expected
            - received_partially
            - closed
        common_status:
          type: string
          enum:
            - draft
            - review
            - approved
            - rejected
            - open
            - shipment_created
            - arrival_expected
            - received_partially
            - closed
        project_name:
          type: string
        purchase_order_date:
          type: string
          format: date
          nullable: true
        delivery_date:
          type: string
          format: date
          nullable: true
        sent_date:
          type: string
          format: date
          nullable: true
        ship_via:
          type: string
          nullable: true
        note:
          type: string
          nullable: true
        payment_terms:
          type: string
          nullable: true
        currency:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        vendor_id:
          type: integer
        vendor_address_id:
          type: integer
          nullable: true
        vendor_contact_id:
          type: integer
          nullable: true
        shipping_client_id:
          type: integer
          nullable: true
        shipping_client_address_id:
          type: integer
          nullable: true
        shipping_client_contact_id:
          type: integer
          nullable: true
        billing_client_id:
          type: integer
          nullable: true
        billing_client_address_id:
          type: integer
          nullable: true
        billing_client_contact_id:
          type: integer
          nullable: true
        vendor:
          $ref: '#/components/schemas/contact'
        shipping_client:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/contact'
        billing_client_client:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/contact'
        amount:
          type: number
        total:
          type: number
        shipping_cost:
          type: number
        packing_cost:
          type: number
        duties_cost:
          type: number
        install_cost:
          type: number
        other_cost:
          type: number
        sales_tax:
          type: number
        invoiced_amount:
          type: number
        paid_amount:
          type: number
        due_amount:
          type: number
        items:
          type: array
          items:
            $ref: '#/components/schemas/lineItem'
        client_invoice_ids:
          type: array
          items:
            type: integer
        supplier_invoice_ids:
          type: array
          items:
            type: integer
        shipment_ids:
          type: array
          items:
            type: integer
    contact:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        data:
          type: object
          additionalProperties: true
          description: The details of the contact encoded in JSON format.
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/contactAddress'
        people:
          type: array
          items:
            $ref: '#/components/schemas/contactPerson'
        categories:
          type: array
          items:
            $ref: '#/components/schemas/contactCategory'
    lineItem:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        unit_type:
          type: string
          nullable: true
        quantity:
          type: number
        price:
          type: number
        taxable:
          type: boolean
        second_taxable:
          type: boolean
          nullable: true
        project_item_id:
          type: integer
          nullable: true
    contactAddress:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        phone:
          type: string
          nullable: true
        post_code:
          type: string
          nullable: true
        address_line_1:
          type: string
          nullable: true
        address_line_2:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        priority:
          type: boolean
    contactPerson:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        position:
          type: string
          nullable: true
        note:
          type: string
          nullable: true
        priority:
          type: boolean
    contactCategory:
      type: object
      properties:
        id:
          type: integer
        type:
          type: string
          enum:
            - client
            - supplier
            - general_contractor
            - manufacture
            - warehouse
  securitySchemes:
    apiKey:
      type: apiKey
      name: authorization
      in: header

````