---
title: "QBO Error: Can’t export Invoice (######) 400 - BadRequest ValidationException was thrown. 6140 - Duplicate Document Number Error"
slug: "qbo-error-cant-export-invoice-id-400-badrequest-validationexception-was-thrown-6140-duplicate-document-number-error"
tags: ["Area - Accounting Integrations", "Focus - Construction", "Focus - Service Replacement", "Role - Accountant", "Role - Admin", "Type - Commercial", "Type - Residential"]
updated: 2026-03-27T21:10:42Z
published: 2026-03-27T21:10:42Z
---

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

# QBO Error: Can’t export Invoice (######) 400 - BadRequest ValidationException was thrown. 6140 - Duplicate Document Number Error

## Problem

This error is received if an invoice already exists in QuickBooks with the same Invoice ID number.

## Solution

### Search your QuickBooks company file for this invoice number

If the invoice found is identical to the one you are attempting to export from ServiceTitan, it may have been entered manually and will just need to be bypassed from the Pending Export Report.

If this is a different invoice, one from previous software, for example, retain this number in QuickBooks and update the invoice number in ServiceTitan. Open the invoice, click Update Invoice Details, edit the invoice # to a unique sequence, and save.

To find the Invoice ID:

1. The Invoice or Document ID number can be found in the error message. ![](https://cdn.document360.io/961862ab-d0f2-4d91-bb62-a62ee8184eff/Images/Documentation/qbo-error-cant-export-invoice-id-400---badrequest-validationexception-was-thrown.-6140---duplicate-document-number-error-image-by7w33je.png)
2. In QBO click on **Search** > Select **Invoices** from the first drop-down > Select **Invoice No.** from the second drop-down > Select **Contains** from the third drop-down > Enter the **Invoice ID** > Click **Search**. ![](https://cdn.document360.io/961862ab-d0f2-4d91-bb62-a62ee8184eff/Images/Documentation/qbo-error-cant-export-invoice-id-400---badrequest-validationexception-was-thrown.-6140---duplicate-document-number-error-image-pe28i19j.png)
3. If your search returns a result that means the invoice was likely entered manually in your QBO.
4. To resolve the issue, in ServiceTitan you will change the **Invoice ID** to make it unique.
5. You can do this by clicking on **Update Invoice Details** > slightly change the invoice number (adding a symbol, letter, or a number to it). ![](https://cdn.document360.io/961862ab-d0f2-4d91-bb62-a62ee8184eff/Images/Documentation/qbo-error-cant-export-invoice-id-400---badrequest-validationexception-was-thrown.-6140---duplicate-document-number-error-image-x2ltgqcb.png)
6. Click **Save**.
7. On the Account Page, pull up the Batch with the error > Right Click + Reload anywhere on the screen to hard refresh the page > export the Batch.

### Related Content

- [Fix common QuickBooks errors](/v1/docs/fix-common-quickbooks-errors-qbo)
