Question

I am fetching the invoice details using InvoiceQueryRq. It fetch all the information from the quickbooks. But i need to fetch the data based on condition. How can i use filter option in InvoiceQueryRq?

Was it helpful?

Solution

Below are a couple of examples from our QuickBooks integration wiki. We have a whole page dedicated to example qbXML requests:

Filtering by TxnID

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="8.0"?>
<QBXML>
  <QBXMLMsgsRq onError="stopOnError">
    <InvoiceQueryRq requestID="2">
      <TxnID>2484-1263499231</TxnID>
    </InvoiceQueryRq>
  </QBXMLMsgsRq>
</QBXML>

Filtering by RefNumber

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="8.0"?>
<QBXML>
    <QBXMLMsgsRq onError="stopOnError">
        <InvoiceQueryRq requestID="2">
            <RefNumber>1234</RefNumber> <!-- put your invoice # here -->
        </InvoiceQueryRq>
    </QBXMLMsgsRq>
</QBXML>

For more examples you should refer to the QuickBooks OSR. The QuickBooks OSR shows the full query syntax for all qbXML requests you can send to QuickBooks:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top