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

# Update an Invoice by ID



## OpenAPI

````yaml patch /invoices/{id}
openapi: 3.0.0
info:
  title: API V3
  version: '3'
  description: >-
    Create your API key from the API Keys section of the Admin Dashboard to gain
    access to the API.
  contact:
    name: API Support
    email: support@zivio.com
servers:
  - url: https://api.zivio.net/api/v3
    description: Global API Router
  - url: https://api.eu.zivio.net/api/v3
    description: EU Data Region
  - url: https://api.uk.zivio.net/api/v3
    description: UK Data Region
  - url: https://api.us.zivio.net/api/v3
    description: US Data Region
security:
  - apiKey: []
    tenantId: []
paths:
  /invoices/{id}:
    patch:
      tags:
        - Invoices
      summary: Update an Invoice by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: number
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  example: '1'
                status:
                  type: string
                  example: draft
                job_id:
                  type: integer
                  example: '23'
                job_summary:
                  type: string
                  example: Some text about the project
                net_total:
                  type: string
                  example: '16000.00'
                tax_total:
                  type: string
                  example: '2000.00'
                total:
                  type: string
                  example: '18000.00'
                ccy:
                  type: string
                  example: GBP
                due_on:
                  type: string
                  format: date-time
                milestone_id:
                  type: integer
                  example: '435'
                line_item_sheet_id:
                  type: integer
                  example: '234'
                credit_note_id:
                  type: integer
                  example: '124'
                is_credit_note:
                  type: boolean
                  example: 'null'
                credit_note_reason:
                  type: string
                  example: invoice paid in error
                invoice_items:
                  type: array
                  items:
                    properties:
                      id:
                        type: integer
                        example: '1'
                      invoice_id:
                        type: integer
                        example: '123'
                      milestone_id:
                        type: integer
                        example: '3654'
                      line_item_sheet_id:
                        type: integer
                        example: '3645'
                      purchase_order_line_id:
                        type: integer
                        example: '284'
                      description:
                        type: string
                        example: Some text about the item
                      quantity:
                        type: number
                        format: double
                        example: '10.0'
                      unit_type:
                        type: string
                        example: milestone
                      billing_start:
                        type: string
                        example: YYYY-MM-DD
                      billing_end:
                        type: string
                        example: YYYY-MM-DD
                      ccy:
                        type: string
                        example: GBP
                      unit_cost:
                        type: string
                        example: '30000.00'
                      cis_type:
                        type: string
                        enum:
                          - materials
                          - labour
                          - gross
                          - 'null'
                      net_total_price:
                        type: string
                        example: '30000.00'
                      tax_rate:
                        type: number
                        format: double
                        example: '20.0'
                      tax_total:
                        type: string
                        example: '6000.00'
                      total_price:
                        type: string
                        example: '36000.00'
                      tax_type:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: '123'
                          label:
                            type: string
                            example: UK VAT
                          tax_reference:
                            type: string
                            enum:
                              - sales
                              - cis
                          key:
                            type: string
                            example: cis_registered_contractors_deduction
                          rate:
                            type: string
                            example: '20.0'
                          country_code:
                            type: string
                            example: GB
                          created_at:
                            type: string
                            format: date-time
                          updated_at:
                            type: string
                            format: date-time
                          archived:
                            type: boolean
                            example: 'false'
                          custom_fields:
                            type: object
                            properties:
                              key:
                                type: string
                                example: value
                created_at:
                  type: string
                  format: date-time
                updated_at:
                  type: string
                  format: date-time
                approved_at:
                  type: string
                  format: date-time
                approved_by:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: '7158'
                    first_name:
                      type: string
                      example: Jack
                    last_name:
                      type: string
                      example: Jones
                    email:
                      type: string
                      example: jack_jones@example.com
                    org_name:
                      type: string
                      example: Organisation Ltd
                    org_id:
                      type: integer
                      example: '567'
                    business_unit:
                      type: string
                      example: Public Private Partnerships
                    division:
                      type: string
                      example: Infastructure
                    department:
                      type: string
                      example: Bridges
                    vetting_status:
                      type: string
                      example: PASSED
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
                    custom_fields:
                      type: object
                      properties:
                        key:
                          type: string
                          example: value
                    has_oversight:
                      type: string
                      format: 'true'
                client:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: '7158'
                    first_name:
                      type: string
                      example: Jack
                    last_name:
                      type: string
                      example: Jones
                    email:
                      type: string
                      example: jack_jones@example.com
                    org_name:
                      type: string
                      example: Organisation Ltd
                    org_id:
                      type: integer
                      example: '567'
                    business_unit:
                      type: string
                      example: Public Private Partnerships
                    division:
                      type: string
                      example: Infastructure
                    department:
                      type: string
                      example: Bridge Building
                    vetting_status:
                      type: string
                      example: PASSED
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
                    custom_fields:
                      type: object
                      properties:
                        key:
                          type: string
                          example: value
                    has_oversight:
                      type: string
                      format: 'true'
                client_org:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: '7158'
                    name:
                      type: string
                      example: Company Ltd
                    is_external_client:
                      type: string
                      format: 'true'
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
                supplier:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: '77'
                    name:
                      type: string
                      example: Company Inc
                    email:
                      type: string
                      example: jack_jones@companyinc.com
                    vetting_status:
                      type: string
                      example: PASSED
                    tax_number:
                      type: string
                      example: '9876543234'
                    tax_registered:
                      type: boolean
                      example: 'true'
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
      responses:
        '200':
          description: ok
          content:
            '*/*':
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: '1'
                  status:
                    type: string
                    example: draft
                  job_id:
                    type: integer
                    example: '23'
                  job_summary:
                    type: string
                    example: Some text about the project
                  net_total:
                    type: string
                    example: '16000.00'
                  tax_total:
                    type: string
                    example: '2000.00'
                  total:
                    type: string
                    example: '18000.00'
                  ccy:
                    type: string
                    example: GBP
                  due_on:
                    type: string
                    format: date-time
                  dated_on:
                    type: string
                    format: date-time
                  milestone_id:
                    type: integer
                    example: '435'
                  line_item_sheet_id:
                    type: integer
                    example: '234'
                  credit_note_id:
                    type: integer
                    example: '124'
                  is_credit_note:
                    type: boolean
                    example: 'null'
                  credit_note_reason:
                    type: string
                    example: invoice paid in error
                  invoice_items:
                    type: array
                    items:
                      properties:
                        id:
                          type: integer
                          example: '1'
                        invoice_id:
                          type: integer
                          example: '123'
                        milestone_id:
                          type: integer
                          example: '3654'
                        line_item_sheet_id:
                          type: integer
                          example: '3645'
                        purchase_order_line_id:
                          type: integer
                          example: '284'
                        description:
                          type: string
                          example: Some text about the item
                        quantity:
                          type: number
                          format: double
                          example: '10.0'
                        unit_type:
                          type: string
                          example: milestone
                        billing_start:
                          type: string
                          example: YYYY-MM-DD
                        billing_end:
                          type: string
                          example: YYYY-MM-DD
                        ccy:
                          type: string
                          example: GBP
                        unit_cost:
                          type: string
                          example: '30000.00'
                        cis_type:
                          type: string
                          enum:
                            - materials
                            - labour
                            - gross
                            - 'null'
                        net_total_price:
                          type: string
                          example: '30000.00'
                        tax_rate:
                          type: number
                          format: double
                          example: '20.0'
                        tax_total:
                          type: string
                          example: '6000.00'
                        total_price:
                          type: string
                          example: '36000.00'
                        tax_type:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: '123'
                            label:
                              type: string
                              example: UK VAT
                            tax_reference:
                              type: string
                              enum:
                                - sales
                                - cis
                            key:
                              type: string
                              example: cis_registered_contractors_deduction
                            rate:
                              type: string
                              example: '20.0'
                            country_code:
                              type: string
                              example: GB
                            created_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                            archived:
                              type: boolean
                              example: 'false'
                            custom_fields:
                              type: object
                              properties:
                                key:
                                  type: string
                                  example: value
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  approved_at:
                    type: string
                    format: date-time
                  approved_by:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: '7158'
                      first_name:
                        type: string
                        example: Jack
                      last_name:
                        type: string
                        example: Jones
                      email:
                        type: string
                        example: jack_jones@example.com
                      org_name:
                        type: string
                        example: Organisation Ltd
                      org_id:
                        type: integer
                        example: '567'
                      business_unit:
                        type: string
                        example: Public Private Partnerships
                      division:
                        type: string
                        example: Infastructure
                      department:
                        type: string
                        example: Bridges
                      vetting_status:
                        type: string
                        example: PASSED
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      custom_fields:
                        type: object
                        properties:
                          key:
                            type: string
                            example: value
                      has_oversight:
                        type: string
                        format: 'true'
                  client:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: '7158'
                      first_name:
                        type: string
                        example: Jack
                      last_name:
                        type: string
                        example: Jones
                      email:
                        type: string
                        example: jack_jones@example.com
                      org_name:
                        type: string
                        example: Organisation Ltd
                      org_id:
                        type: integer
                        example: '567'
                      business_unit:
                        type: string
                        example: Public Private Partnerships
                      division:
                        type: string
                        example: Infastructure
                      department:
                        type: string
                        example: Bridge Building
                      vetting_status:
                        type: string
                        example: PASSED
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      custom_fields:
                        type: object
                        properties:
                          key:
                            type: string
                            example: value
                      has_oversight:
                        type: string
                        format: 'true'
                  client_org:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: '7158'
                      name:
                        type: string
                        example: Company Ltd
                      is_external_client:
                        type: string
                        format: 'true'
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                  supplier:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: '77'
                      name:
                        type: string
                        example: Company Inc
                      email:
                        type: string
                        example: jack_jones@companyinc.com
                      vetting_status:
                        type: string
                        example: PASSED
                      tax_number:
                        type: string
                        example: '9876543234'
                      tax_registered:
                        type: boolean
                        example: 'true'
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
        '401':
          description: unauthorized
        '404':
          description: not found
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-API-Key
      in: header
    tenantId:
      type: apiKey
      name: zivio-tenant-id
      in: header

````