0

I have QuickBooks Web Connector up and running and can successfully run the SDK web service example. I am now trying to query for a vendor and add if it doesn't exist.

However, I am getting the following error on my initial query:

QuickBooks found an error when parsing the provided XML text stream

There are no illegal characters in the XML. What I am sending:

<?xml version="1.0"?>
<?qbxml version="4.0"?>
<QBXML>
    <QBXMLMsgsRq onError="stopOnError">
        <VendorQueryRq requestID="1">
            <FullName>My Vendor</FullName>
            <MaxReturned>1</MaxReturned>
        </VendorQueryRq>
    </QBXMLMsgsRq>
</QBXML>

I'm looking for a vendor query and add example and an XSD if possible.

JohnB
  • 1,231
  • 1
  • 18
  • 33
sreimer
  • 4,913
  • 2
  • 33
  • 43

1 Answers1

1

Since you're querying by FullName, and FullName is a unique key in QuickBooks, you can't also use MaxReturned (since it's a unique key, you can always only get a maximum of 1 result back).

<?xml version="1.0"?>
<?qbxml version="4.0"?>
<QBXML>
    <QBXMLMsgsRq onError="stopOnError">
        <VendorQueryRq requestID="1">
            <FullName>My Vendor</FullName>
        </VendorQueryRq>
    </QBXMLMsgsRq>
</QBXML>

The OSR is always the best source for qbXML:

We also have a wiki with some example requests on it over here:

Keith Palmer Jr.
  • 27,666
  • 16
  • 68
  • 105
  • @keith while querying vendors how many (max) vendors details can be returned from Quickbooks? i am using QB desktop version and web connector for my web application. Thanks in advance – Arjun Vachhani Aug 01 '14 at 09:10
  • Technically there is no limit. However, the Web Connector itself will not allow a single HTTP request to take longer than 2 minutes. So, if you're pulling a large amount of vendors (or anything else) you should use iterators to break up the result into smaller chunks. http://www.consolibyte.com/docs/index.php/QbXML_for_Querying_for_Customers,_with_iterators – Keith Palmer Jr. Aug 01 '14 at 11:50