> ## 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 client invoice



## OpenAPI

````yaml /swagger.yaml put /client_invoices/{id}
openapi: 3.1.0
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: []
tags:
  - name: Webhooks
    description: Webhook event notifications
paths:
  /client_invoices/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
    put:
      tags:
        - Client Invoice
      summary: Update a client invoice
      operationId: client_invoices#update
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestBodyClientInvoiceUpdate'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/clientInvoice'
        '403':
          description: Forbidden
      security:
        - apiKey: []
components:
  schemas:
    requestBodyClientInvoiceUpdate:
      type: object
      properties:
        note:
          type: string
        metadata:
          type: object
          description: >-
            Custom key-value data. Up to 50 keys; key up to 40 characters;
            string value up to 500 characters.
          additionalProperties:
            type: string
            maxLength: 500
        payments:
          type: array
          description: >-
            Payments received for the invoice. The invoice status is derived
            from them.
          items:
            type: object
            properties:
              id:
                type: integer
                description: Pass the ID of an existing payment to update it.
              amount:
                type: number
              date:
                type: string
                format: date
              note:
                type: string
            required:
              - amount
    clientInvoice:
      type: object
      properties:
        id:
          type: integer
        project_id:
          type: integer
        status:
          type: string
          enum:
            - draft
            - sent
            - paid
            - overdue
            - deposited
            - void
            - paid_partially
            - revised
        invoice_date:
          type: string
          nullable: true
        note:
          type: string
          nullable: true
        payment_terms:
          type: array
          items:
            $ref: '#/components/schemas/paymentTerm'
        label:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        tax_amount:
          type: number
        taxable_amount:
          type: number
        amount:
          type: number
        amount_with_tax:
          type: number
        balance:
          type: number
        products_amount:
          type: number
        services_amount:
          type: number
        balance_transactions_amount:
          type: number
        client:
          $ref: '#/components/schemas/contact'
        items:
          type: array
          items:
            $ref: '#/components/schemas/lineItem'
        client_proposal_id:
          type: integer
          nullable: true
        purchase_order_ids:
          type: array
          items:
            type: integer
        metadata:
          type: object
          description: >-
            Custom key-value data. Up to 50 keys; key up to 40 characters;
            string value up to 500 characters.
          additionalProperties:
            type: string
            maxLength: 500
        payments:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              amount:
                type: number
              date:
                type: string
                format: date
              note:
                type: string
                nullable: true
    paymentTerm:
      type: object
      properties:
        id:
          type: string
        amount:
          type: string
        due_date:
          type: string
          nullable: true
        payment_terms:
          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'
        metadata:
          type: object
          description: >-
            Custom key-value data. Up to 50 keys; key up to 40 characters;
            string value up to 500 characters.
          additionalProperties:
            type: string
            maxLength: 500
    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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.