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

# Delete a client invoice

> OAuth scope: `client_invoice.write`

Deletes the client invoice identified by the `id` path parameter.

<Warning>
  **Important**: Only client invoices with a `draft` status can be deleted. Invoices that have been validated or paid cannot be deleted.
</Warning>

<Info>
  **Price plans**: this endpoint is available for all Qonto price plans.
</Info>



## OpenAPI

````yaml delete /v2/client_invoices/{id}
openapi: 3.1.1
info:
  version: v2
  title: Qonto
servers:
  - url: https://thirdparty.qonto.com
    description: Production URL
  - url: https://thirdparty-sandbox.staging.qonto.co
    description: Sandbox URL
security:
  - OAuth:
      - organization.read
      - membership.read
      - membership.write
      - attachment.write
      - internal_transfer.write
      - payment.write
      - supplier_invoice.write
      - supplier_invoice.read
      - client_invoices.read
      - client_invoice.write
      - client.read
      - client.write
      - product.read
      - product.write
      - request_review.write
      - request_review.read
      - team.read
      - team.write
      - request_transfers.write
      - insurance_contract.read
      - insurance_contract.write
      - card.read
      - card.write
      - bank_account.write
      - beneficiary.trust
      - webhook
      - payment_link.write
      - payment_link.read
      - sepa_direct_debit.read
      - sepa_direct_debit.write
      - terminal.read
      - terminal.write
  - SecretKey: []
paths:
  /v2/client_invoices/{id}:
    delete:
      tags:
        - Client Invoices
      summary: Delete a client invoice
      description: |-
        OAuth scope: `client_invoice.write`

        Deletes the client invoice identified by the `id` path parameter.

        <Warning>
          **Important**: Only client invoices with a `draft` status can be deleted. Invoices that have been validated or paid cannot be deleted.
        </Warning>

        <Info>
          **Price plans**: this endpoint is available for all Qonto price plans.
        </Info>
      operationId: delete_client_invoice
      parameters:
        - $ref: '#/components/parameters/X-Qonto-Staging-Token'
        - name: id
          in: path
          description: UUID of the client invoice to delete.
          required: true
          schema:
            type: string
            format: uuid
            example: e3d68a1a-b23f-496a-a9a2-815089337720
      responses:
        '204':
          description: Client invoice successfully deleted.
        '400':
          $ref: '#/components/responses/400-Client-Invoice-Bad-Request'
        '401':
          $ref: '#/components/responses/401-Client-Invoice-Unauthorized'
        '403':
          $ref: '#/components/responses/403-Client-Invoice-Forbidden'
        '404':
          $ref: '#/components/responses/404-Client-Invoice-Not-Found'
        '412':
          $ref: '#/components/responses/412-Client-Invoice-Precondition-Failed'
        '422':
          $ref: '#/components/responses/422-Client-Invoice-Unprocessable-Entity'
        '500':
          $ref: '#/components/responses/500-Client-Invoice-Internal-Server-Error'
      security:
        - OAuth:
            - client_invoice.write
        - SecretKey: []
components:
  parameters:
    X-Qonto-Staging-Token:
      name: X-Qonto-Staging-Token
      in: header
      description: >-
        Required only for Sandbox API requests; to get one, please sign up to
        the [Developer Portal](https://developers.qonto.com/).
      schema:
        type: string
  responses:
    400-Client-Invoice-Bad-Request:
      description: Returns a bad request error specific to client invoices.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    status:
                      type: string
                      example: '400'
                    code:
                      type: string
                      enum:
                        - bad_request
                        - invalid_request_format
                        - malformed_json
                      example: bad_request
                    detail:
                      type: string
                      example: The request is malformed or contains invalid data
          examples:
            bad_request:
              value:
                errors:
                  - status: '400'
                    code: bad_request
                    detail: The request is malformed or contains invalid data
    401-Client-Invoice-Unauthorized:
      description: Returns an unauthorized error specific to client invoices.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    status:
                      type: string
                      example: '401'
                    code:
                      type: string
                      enum:
                        - unauthorized
                        - invalid_token
                        - token_expired
                      example: unauthorized
                    detail:
                      type: string
                      example: Authentication is required to access this resource
          examples:
            unauthorized:
              value:
                errors:
                  - status: '401'
                    code: unauthorized
                    detail: Authentication is required to access this resource
    403-Client-Invoice-Forbidden:
      description: Returns a forbidden error specific to client invoices.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    status:
                      type: string
                      example: '403'
                    code:
                      type: string
                      enum:
                        - forbidden
                        - insufficient_permissions
                        - access_denied
                      example: forbidden
                    detail:
                      type: string
                      example: You do not have permission to access this resource
          examples:
            forbidden:
              value:
                errors:
                  - status: '403'
                    code: forbidden
                    detail: You do not have permission to access this resource
    404-Client-Invoice-Not-Found:
      description: Returns a not found error specific to client invoices.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    status:
                      type: string
                      example: '404'
                    code:
                      type: string
                      enum:
                        - not_found
          examples:
            not_found:
              value:
                errors:
                  - status: '404'
                    code: not_found
    412-Client-Invoice-Precondition-Failed:
      description: Returns a precondition failed error specific to client invoices.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    status:
                      type: string
                      example: '412'
                    code:
                      type: string
                      enum:
                        - forbidden_invoice_update
                        - forbidden_invoice_deletion
                        - invoice_not_in_draft_status
                        - recipient_not_reachable_on_einvoicing
                      example: forbidden_invoice_update
          examples:
            forbidden_invoice_update:
              value:
                errors:
                  - status: '412'
                    code: forbidden_invoice_update
            forbidden_invoice_deletion:
              value:
                errors:
                  - status: '412'
                    code: forbidden_invoice_deletion
            invoice_not_in_draft_status:
              value:
                errors:
                  - status: '412'
                    code: invoice_not_in_draft_status
            recipient_not_reachable_on_einvoicing:
              value:
                errors:
                  - status: '412'
                    code: recipient_not_reachable_on_einvoicing
    422-Client-Invoice-Unprocessable-Entity:
      description: Returns a validation error specific to client invoices.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    status:
                      type: string
                      example: '422'
                    code:
                      type: string
                      enum:
                        - invalid
                        - missing_field
                        - invalid_format
                        - invalid_client_id
                        - invalid_invoice_data
                      example: invalid
                    detail:
                      type: string
                      example: due_date should be greater or equal than issue_date.
                    source:
                      type: object
                      properties:
                        pointer:
                          type: string
                          example: /data/attributes/due_date
                    meta:
                      type: object
                      properties:
                        validation_param:
                          type: string
                          example: IssueDate
          examples:
            invalid:
              value:
                errors:
                  - status: '422'
                    code: invalid
                    detail: '`due_date` should be greater or equal than `issue_date`.'
                    source:
                      pointer: /data/attributes/due_date
                    meta:
                      validation_param: IssueDate
    500-Client-Invoice-Internal-Server-Error:
      description: Returns an internal server error specific to client invoices.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    status:
                      type: string
                      example: '500'
                    code:
                      type: string
                      enum:
                        - internal_server_error
                        - service_unavailable
                        - processing_error
                      example: internal_server_error
                    detail:
                      type: string
                      example: >-
                        An internal server error occurred while processing the
                        request
          examples:
            internal_server_error:
              value:
                errors:
                  - status: '500'
                    code: internal_server_error
                    detail: >-
                      An internal server error occurred while processing the
                      request
  securitySchemes:
    OAuth:
      type: oauth2
      description: >
        Bearer authorization header: `Bearer <token>`, where `<token>` is the
        access token received from the authorization server at the end of the
        [OAuth 2.0
        flow](/get-started/business-api/authentication/oauth/oauth-flow).
      flows:
        authorizationCode:
          refreshUrl: https://oauth.qonto.com/oauth2/token
          authorizationUrl: https://oauth.qonto.com/oauth2/auth
          scopes:
            attachment.read: Retrieve attachments
            attachment.write: Upload attachments and remove attachments from transactions
            bank_account.write: Create, update and close bank accounts
            beneficiary.trust: Trust SEPA beneficiaries
            card.read: Retrieve cards
            card.write: Create or update cards
            client.read: Retrieve clients
            client.write: Create clients
            client_invoice.write: Create client invoices
            client_invoices.read: Retrieve client invoices and credit notes
            einvoicing.read: Retrieve e-invoicing settings
            embed_auth_link.write: Create Embed auth links
            insurance_contract.read: Retrieve insurance contracts
            insurance_contract.write: Create and update insurance contracts
            internal_transfer.write: >-
              Create internal transfers (between 2 Qonto accounts of the same
              organization)
            international_transfer.write: Create international transfers
            membership.read: Retrieve the authentified membership
            membership.write: Invite team members
            offline_access: Retrieve a refresh token
            organization.read: >-
              Retrieve organization, bank accounts, transactions, transfers,
              beneficiaries, labels, memberships, requests & statements
            payment.write: Create external transfers and untrust beneficiaries
            payment_link.read: >-
              Retrieve payment links, their payments, and the available payment
              methods
            payment_link.write: >-
              Connect to the payment links provider, create and deactivate
              payment links
            product.read: Retrieve products
            product.write: Create products
            request_cards.write: Create card requests
            request_review.write: Approve or decline requests
            request_transfers.write: Create transfer requests
            sepa_direct_debit.read: View SEPA Direct Debit payments
            sepa_direct_debit.write: Manage SEPA Direct Debit payments
            supplier_invoice.read: Retrieve supplier invoices
            supplier_invoice.write: Create supplier invoices
            team.read: Retrieve teams
            team.write: Create teams
            terminal.read: View your payment terminals
            terminal.write: Configure your terminals and initiate payments
            webhook: >-
              Receive a notification each time a particular event occurs in
              Qonto
          tokenUrl: https://oauth.qonto.com/oauth2/token
    SecretKey:
      type: apiKey
      description: cf. [API key](/get-started/business-api/authentication/api-key)
      name: Authorization
      in: header

````