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

# Update a customer invoice



## OpenAPI

````yaml /api-reference/openapi.json put /account_receivable/invoice/{id}/
openapi: 3.0.3
info:
  title: Fail Fast API
  version: v1
  description: >-
    REST API for the Fail Fast platform. Authenticate with a workspace API key
    sent as a bearer token. Every response uses the `{message, error, data}`
    envelope.
servers:
  - url: https://api.failfast.ai
security: []
paths:
  /account_receivable/invoice/{id}/:
    put:
      tags:
        - Accounts receivable
      summary: Update a customer invoice
      operationId: account_receivable_invoice_update
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          description: A UUID string identifying this invoice.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Invoice'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Invoice'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Invoice'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - error
                  - data
                properties:
                  message:
                    type: string
                    description: Human-readable outcome of the request.
                  error:
                    type: boolean
                    description: true when the request failed.
                    example: false
                  data:
                    $ref: '#/components/schemas/Invoice'
          description: ''
      security:
        - apiKey: []
components:
  schemas:
    Invoice:
      type: object
      description: |-
        A ModelSerializer that takes an additional `fields` argument that
        controls which fields should be displayed.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          readOnly: true
        custom_fields:
          nullable: true
        operation_number:
          type: integer
          maximum: 2147483647
          minimum: 0
          default: 0
        operation_date:
          type: string
          format: date-time
        operation_status:
          $ref: '#/components/schemas/OperationStatusEnum'
        status_description:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        deleted_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        audit_status:
          allOf:
            - $ref: '#/components/schemas/AuditStatusEnum'
          readOnly: true
        discount_percentage:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
        subtotal:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
        discount_value:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
        additional_discount_value:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
        total:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
        order_number:
          type: integer
          maximum: 9223372036854776000
          minimum: -9223372036854776000
          format: int64
          nullable: true
        description:
          type: string
          nullable: true
        apply_taxes_by:
          type: boolean
        invoice_status:
          $ref: '#/components/schemas/InvoiceStatusEnum'
        invoice_electronic:
          type: boolean
        is_directly_created:
          type: boolean
        member:
          type: string
          format: uuid
          readOnly: true
        operation:
          type: string
          format: uuid
        market_exchange_rate:
          type: string
          format: uuid
          nullable: true
        branch_office:
          type: string
          format: uuid
        created_by:
          type: string
          format: uuid
          readOnly: true
        updated_by:
          type: string
          format: uuid
          readOnly: true
          nullable: true
        deleted_by:
          type: string
          format: uuid
          readOnly: true
          nullable: true
        customer:
          type: string
          format: uuid
        customer_detail:
          type: string
          format: uuid
          nullable: true
        location:
          type: string
          format: uuid
        cost_center:
          type: string
          format: uuid
        commercial_condition:
          type: string
          format: uuid
        discount_type:
          type: string
          format: uuid
          nullable: true
        price_list_type:
          type: string
          format: uuid
          nullable: true
        international_trade_term:
          type: string
          format: uuid
          nullable: true
        tree_hash:
          type: string
          format: uuid
          nullable: true
        salesman:
          type: string
          format: uuid
        warehouse:
          type: string
          format: uuid
          nullable: true
        cash_register:
          type: string
          format: uuid
          nullable: true
      required:
        - additional_discount_value
        - audit_status
        - branch_office
        - commercial_condition
        - cost_center
        - created_at
        - created_by
        - customer
        - deleted_at
        - deleted_by
        - discount_percentage
        - discount_value
        - id
        - location
        - member
        - name
        - operation
        - operation_date
        - salesman
        - subtotal
        - total
        - updated_at
        - updated_by
    OperationStatusEnum:
      enum:
        - PR
        - CO
        - ER
      type: string
      description: |-
        * `PR` - Provisional
        * `CO` - Complete
        * `ER` - Error
    AuditStatusEnum:
      enum:
        - C
        - U
        - D
      type: string
      description: |-
        * `C` - Created
        * `U` - Updated
        * `D` - Deleted
    InvoiceStatusEnum:
      enum:
        - FA
        - RE
        - RF
      type: string
      description: |-
        * `FA` - Invoice
        * `RE` - Remision
        * `RF` - Remision Invoiced
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        Workspace API key sent as a bearer token: `Authorization: Bearer
        failfast_...`. Create keys in Settings -> Workspace -> API Keys.

````