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

# Update a supplier invoice



## OpenAPI

````yaml /swagger.yaml put /supplier_invoices/{id}
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:
  /supplier_invoices/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
    put:
      tags:
        - Supplier Invoice
      summary: Update a supplier invoice
      operationId: supplier_invoices#update
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestBodySupplierInvoiceUpdate'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/supplierInvoice'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
        - apiKey: []
components:
  schemas:
    requestBodySupplierInvoiceUpdate:
      type: object
      properties:
        status:
          type: string
          enum:
            - draft
            - review
            - approved
            - rejected
            - paid
            - paid_partially
            - overdue
            - refunded
        notes:
          type: string
        label:
          type: string
        invoice_date:
          type: string
          format: date
        shipping_cost:
          type: number
        packing_cost:
          type: number
        duties_cost:
          type: number
        install_cost:
          type: number
        sales_tax:
          type: number
        other_cost:
          type: number
    supplierInvoice:
      type: object
      properties:
        id:
          type: integer
        purchase_order_id:
          type: integer
          nullable: true
        label:
          type: string
          nullable: true
        vendor:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/contact'
        invoice_date:
          type: string
          format: date
        due_date:
          type: string
          format: date
          nullable: true
        status:
          type: string
          enum:
            - draft
            - review
            - approved
            - rejected
            - paid
            - paid_partially
            - overdue
            - refunded
        notes:
          type: string
          nullable: true
        subtotal:
          type: number
        total:
          type: number
        paid_amount:
          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
        items:
          type: array
          items:
            $ref: '#/components/schemas/lineItem'
        payment_terms:
          type: array
          items:
            $ref: '#/components/schemas/paymentTerm'
    error:
      type: object
      properties:
        error:
          type: string
    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
    paymentTerm:
      type: object
      properties:
        id:
          type: string
        amount:
          type: string
        due_date:
          type: string
          nullable: true
        payment_terms:
          type: string
    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

````