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

# Mettre à jour une facture

> Met à jour une facture.

Met à jour une facture.

```json Corps de la requête theme={null}
{
  "dueDate": "2026-09-10",
  "comments": "Échéance renégociée"
}
```


## OpenAPI

````yaml openapi.json PUT /invoices/{id}
openapi: 3.0.0
info:
  title: Bonx API
  version: 1.0.0
servers:
  - url: '{baseUrl}'
    variables:
      baseUrl:
        default: https://YOUR-API-URL
        description: Your space API URL, available in Settings → API tokens.
security: []
paths:
  /invoices/{id}:
    put:
      summary: Update an invoice
      parameters:
        - in: header
          name: x-api-key
          schema:
            type: string
          description: API token from your Bonx space.
        - in: query
          name: comments
          required: false
          schema:
            type: string
        - description: _"id" is required as part of the path_
          in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              properties:
                comments:
                  nullable: true
                  type: string
                dueDate:
                  $ref: '#/components/schemas/date'
                id:
                  nullable: false
                  type: integer
              type: object
        description: >-
          Query parameters can also be provided in the request body as a JSON
          object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  updateInvoicesByPk:
                    nullable: true
                    properties:
                      dueDate:
                        $ref: '#/components/schemas/date'
                      id:
                        nullable: false
                        type: integer
                      reference:
                        nullable: false
                        type: string
                      state:
                        $ref: '#/components/schemas/invoice_state'
                    type: object
          description: Response
components:
  schemas:
    date:
      nullable: false
    invoice_state:
      nullable: false

````