qbXML explained: QuickBooks Desktop's request format
qbXML is the XML format QuickBooks Desktop uses for every request a program or the Web Connector sends it: queries such as InvoiceQueryRq, and adds and modifies. Each request names a qbXML version; each answer carries a status code and the records. Large lists are read in pages with iterators.
A request
This asks for open invoices, 25 at a time, with their line items:
<?xml version="1.0"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<InvoiceQueryRq requestID="1" iterator="Start">
<MaxReturned>25</MaxReturned>
<PaidStatus>NotPaidOnly</PaidStatus>
<IncludeLineItems>true</IncludeLineItems>
</InvoiceQueryRq>
</QBXMLMsgsRq>
</QBXML>
The second line names the qbXML version: 13.0 here, which QuickBooks 2015 and later understand. onError says what to do if one request in a batch fails: stop, or carry on with the rest. requestID comes back on the answer, so you can match them up.
The answer
Trimmed to one invoice and a few of its fields:
<QBXML>
<QBXMLMsgsRs>
<InvoiceQueryRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK"
iteratorRemainingCount="41" iteratorID="{2E1B6F5A-0C7D-4B0E-9C1A-5D3F8E2A7B64}">
<InvoiceRet>
<TxnID>1A2B-1764000000</TxnID>
<TimeCreated>2026-11-02T09:14:05-06:00</TimeCreated>
<TimeModified>2026-11-03T16:40:22-06:00</TimeModified>
<EditSequence>1793745622</EditSequence>
<TxnNumber>212</TxnNumber>
<CustomerRef>
<ListID>80000005-1763990000</ListID>
<FullName>Example Supply Co</FullName>
</CustomerRef>
<TxnDate>2026-11-02</TxnDate>
<RefNumber>1045</RefNumber>
<DueDate>2026-12-02</DueDate>
<Subtotal>1250.00</Subtotal>
<BalanceRemaining>1250.00</BalanceRemaining>
<IsPaid>false</IsPaid>
</InvoiceRet>
</InvoiceQueryRs>
</QBXMLMsgsRs>
</QBXML>
A few things worth knowing from this one answer:
- IDs. Lists (customers, items, accounts) use
ListID; transactions (invoices, bills, checks) useTxnID. References to other records carry both the ID and aFullName. - EditSequence. Changes every time the record is edited. A modify request has to send the current value, which is how QuickBooks stops two programs overwriting each other.
- Money and dates. Amounts are decimal strings; dates are
YYYY-MM-DD, and times carry the PC's offset.
Versions
Each QuickBooks release understands qbXML up to some version. Intuit lists qbXML 17.0 as the latest, for the US and Canadian editions of QuickBooks 2024 (R18 and later) and 2023 (R16 and later). Before sending anything else, a program sends a HostQueryRq; the answer names the product, its version and every qbXML version it supports, and the program uses the highest one both sides know. Through the Web Connector you don't send it yourself: the first call of each session hands the web service that same answer. Declare a version the file doesn't support, or use a field from a newer version than the one you declared, and QuickBooks rejects the request.
Element order matters
qbXML is checked against Intuit's schema, and the schema fixes the order of elements inside each request. <MaxReturned> before <PaidStatus> works; the other way round fails with a parse error, even though the XML is valid. The On-Screen Reference shows every request with its elements in the required order, and which version added each one. It's the page to keep open while writing qbXML.
Long lists: iterators
Asking for 30,000 invoices in one answer is slow and can leave QuickBooks unresponsive while it builds the reply. iterator="Start" with MaxReturned returns the first page plus an iteratorID and iteratorRemainingCount. The next request repeats the query with iterator="Continue" and that iteratorID, until the remaining count reaches zero. Iterators belong to one session, so a program that loses its session starts the list again; reading only what changed since the last run (ModifiedDateRangeFilter with FromModifiedDate) keeps those restarts small.
Status codes
Every answer element has a statusCode, a statusSeverity and a statusMessage:
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | The query matched nothing. Not an error. |
| 3200 | The EditSequence you sent is out of date: someone changed the record since you read it |
The On-Screen Reference and the SDK documentation list the rest.
Is there a "qbXML file" to open?
Not in QuickBooks itself. qbXML is something programs send to QuickBooks through the SDK or the Web Connector; there's no menu that imports a .qbxml or .xml file. (QuickBooks' own imports take IIF and Excel files, which are different formats.) To try a request by hand, the SDK's test tool, SDKTestPlus3, sends a file's contents to the open company file and shows the answer. The SDK guide covers where to get it.
Skipping qbXML entirely
If you only read, a hosted API sends the qbXML for you and hands back JSON. The same open invoices from ours:
GET /v1/files/{file_id}/invoices?status=open
The invoices reference shows the fields, and requests and pagination covers paging through long lists with a cursor instead of an iterator.
Sources
14-day trial with one company file. Read-only: nothing is ever written to your books.