> ## 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.

# Import client invoices in bulk

> OAuth scope: `client_invoice.write`

Imports already-issued client invoices **in bulk** by uploading their files (1 to 5 per request).

Unlike [creating a client invoice](/api-reference/business-api/expense-management/client-quotes-notes/client-invoices/create-a-client-invoice), this endpoint does **not** regenerate the document: the original file you upload is preserved as-is. This makes it the right choice when your ERP or billing system already produces compliant **Factur-X** invoices that must be transmitted unchanged.

<Info>
  The whole request body is limited to **15 MB**, with a maximum of **5 files** of **5 MB** each per request.
</Info>

<Tip>
  To preserve the embedded XML for e-invoicing in France, upload PDF files that follow the Factur-X standard.
</Tip>

<Warning>
  Bulk import is **all-or-nothing**: if any file in the request is rejected (unsupported format, larger than 5 MB, or more than 5 files), the whole request fails and **no** invoices are created. Fix the offending file and retry the batch.
</Warning>

Re-importing a file that has already been imported is **idempotent**: instead of creating a duplicate, the endpoint returns the `invoice_id` of the existing invoice.

<Note>
  Bulk import is not available to **Italian** organizations; their requests return `403 Forbidden`.
</Note>



## OpenAPI

````yaml post /v2/client_invoices/bulk
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/bulk:
    post:
      tags:
        - Client Invoices
      summary: Import client invoices in bulk
      description: >-
        OAuth scope: `client_invoice.write`


        Imports already-issued client invoices **in bulk** by uploading their
        files (1 to 5 per request).


        Unlike [creating a client
        invoice](/api-reference/business-api/expense-management/client-quotes-notes/client-invoices/create-a-client-invoice),
        this endpoint does **not** regenerate the document: the original file
        you upload is preserved as-is. This makes it the right choice when your
        ERP or billing system already produces compliant **Factur-X** invoices
        that must be transmitted unchanged.


        <Info>
          The whole request body is limited to **15 MB**, with a maximum of **5 files** of **5 MB** each per request.
        </Info>


        <Tip>
          To preserve the embedded XML for e-invoicing in France, upload PDF files that follow the Factur-X standard.
        </Tip>


        <Warning>
          Bulk import is **all-or-nothing**: if any file in the request is rejected (unsupported format, larger than 5 MB, or more than 5 files), the whole request fails and **no** invoices are created. Fix the offending file and retry the batch.
        </Warning>


        Re-importing a file that has already been imported is **idempotent**:
        instead of creating a duplicate, the endpoint returns the `invoice_id`
        of the existing invoice.


        <Note>
          Bulk import is not available to **Italian** organizations; their requests return `403 Forbidden`.
        </Note>
      operationId: bulk_import_client_invoices
      parameters:
        - $ref: '#/components/parameters/X-Qonto-Staging-Token'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                client_invoices:
                  type: array
                  maxItems: 5
                  description: >-
                    The invoice files to import (repeat the `client_invoices`
                    field once per file). Supported formats:

                    - PDF (.pdf), including Factur-X

                    - JPEG (.jpeg, .jpg)

                    - PNG (.png)


                    Each file must not exceed 5 MB, and the whole request must
                    not exceed 15 MB.
                  items:
                    type: string
                    format: binary
              required:
                - client_invoices
        description: >-
          You have to specify multipart form data in order to attach the files
          to the request. Repeat the `client_invoices` field once per file. When
          using `curl` it will look like this:


          ```

          curl --location --request POST
          'https://thirdparty.qonto.com/v2/client_invoices/bulk' \
            --header 'Authorization: Bearer YOUR_TOKEN' \
            --form 'client_invoices=@"/path/to/invoice1.pdf"' \
            --form 'client_invoices=@"/path/to/invoice2.pdf"'
          ```
      responses:
        '200':
          description: Returns the list of successfully imported client invoices.
          content:
            application/json:
              schema:
                type: object
                required:
                  - client_invoices
                properties:
                  client_invoices:
                    type: array
                    items:
                      type: object
                      properties:
                        invoice_id:
                          type: string
                          format: uuid
                          description: Unique identifier of the imported client invoice.
                          example: 019c688e-4adc-795b-b0fb-c9be149262dd
                        file_name:
                          type: string
                          description: >-
                            Name of the uploaded file this invoice was imported
                            from.
                          example: invoice1.pdf
              examples:
                example:
                  value:
                    client_invoices:
                      - invoice_id: 019c688e-4adc-795b-b0fb-c9be149262dd
                        file_name: invoice1.pdf
                      - invoice_id: 019c6890-1f2a-7b3c-9d4e-2a1b3c4d5e6f
                        file_name: invoice2.pdf
        '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'
        '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
    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
            cash_flow_category.read: Retrieve cash flow categories
            cash_flow_category.write: Create cash flow categories and assign them to transactions
            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
            subscription.read: Retrieve the organization's current subscription plan
            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
            user_organization.read: View the organizations the user has granted access to
            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

````