I am attempting to query open purchase orders. My first attempt was to use the PurchaseOrderStatusDesc="Open" however the return was Unsupported filter (PurchaseOrderStatusDesc). I would then like to try UnfilledPercentageFilter however here is no documentation regarding this filter and particular the enums for MatchNumericCriterion.
Request should look something like this:
<?xml version="1.0" ?>
<?qbposxml version="1.0"?>
<QBPOSXML>
<QBPOSXMLMsgsRq onError="stopOnError">
<PurchaseOrderQueryRq requestID = "21">
<PurchaseOrderStatusDesc >Open</PurchaseOrderStatusDesc>
</PurchaseOrderQueryRq>
</QBPOSXMLMsgsRq>
</QBPOSXML>
Related
I'm trying to apply 1 payment to multiple invoices with QBXML and I'm getting the following error
QuickBooks found an error when parsing the provided XML text stream
My XML:
<?xml version="1.0" encoding="utf-8"?><?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="continueOnError">
<ReceivePaymentAddRq>
<ReceivePaymentAdd>
<CustomerRef>
<ListID>8000254C-1444676392</ListID>
</CustomerRef>
<TxnDate>2018-12-13</TxnDate>
<RefNumber>457</RefNumber>
<TotalAmount>863.10</TotalAmount>
<Memo></Memo>
<PaymentMethodRef><FullName/></PaymentMethodRef>
<AppliedToTxnAdd>
<TxnID>11B0C6-1544760951</TxnID>
<PaymentAmount>179.00</PaymentAmount>
</AppliedToTxnAdd>
<AppliedToTxnAdd>
<TxnID>11B0CA-1544761043</TxnID>
<PaymentAmount>684.10</PaymentAmount>
</AppliedToTxnAdd>
</ReceivePaymentAdd><IncludeRetElement>TxnID</IncludeRetElement><IncludeRetElement>RefNumber</IncludeRetElement></ReceivePaymentAddRq></QBXMLMsgsRq></QBXML>
Notice I have 2 AppliedToTxnAdd elements.
However if I only apply 1 AppliedToTxnAdd, it works!
The issue was the order of the xml elements. QB cares about that.
Short question: In a SoapUI/SoapUI Pro test step, how can I verify that a REST response which is a list contains a specific item?
Long version: I have a test suite that chains together two REST method calls. First I call addCustomer, then I call getCustomerByPhoneNumber. However, phone number is not unique so I may get back a list of several customers. How can I determine if that list contains the customer I just added?
Example: Say I call addCustomer to create customer2, and the response returns customerId = 222. I then call getCustomerByPhoneNumber and receive the following response. How do I verify that customerId = 222 exists in the list? Ideally I'd also like to verify that all information about customer2 is correct (phone number, name, etc.)
<customers>
<customer>
<id>111</id>
<name>customer1</name>
<phone>555-5555</phone>
</customer>
<customer>
<id>222</id>
<name>customer2</name>
<phone>555-5555</phone>
</customer>
<customer>
<id>333</id>
<name>customer3</name>
<phone>555-5555</phone>
</customer>
</customers>
If the answer requires a Groovy script, I'd appreciate some sample code or psuedocode, since I haven't used Groovy before.
You could also use an XQuery assertion on the test step like this:
for $customer in //*:customer
where ($customer/id = '222')
return ($customer/name,
$customer/phone)
This produces output like:
<name>customer2</name>
<phone>555-5555</phone>
Then, in the assertion expected results panel you could substitute the expected values:
<name>${customerName}</name>
<phone>${custmerPhone}</phone>
Using XPath, something like exists(//*:customer[name[text()='customer2']]), to see if "he" exists.
Next, something like //*:customer[name[text()='customer2']]/id should give you "222".
I have a qbmsxml that I'm sending that continues to get a response error 2000.
<qbmsxml>
<signonmsgsrq>
<signondesktoprq>
<clientdatetime>2014-04-03T09:37:23</clientdatetime>
<applicationlogin>my.application.login.id</applicationlogin>
<connectionticket>SDK-MY-Connection-Ticket</connectionticket>
<language>English</language>
<appid>9999999999</appid>
<appver>1.0</appver>
</signondesktoprq>
</signonmsgsrq>
<qbmsxmlmsgsrq>
<customercreditcardauthrq>
<transrequestid>140403937231</transrequestid>
<creditcardnumber>4111111111111111</creditcardnumber>
<expirationmonth>12</expirationmonth>
<expirationyear>2017</expirationyear>
<isecommerce>true</isecommerce>
<amount>0.01</amount>
<nameoncard>John Doe</nameoncard>
<creditcardaddress>1234 Main Street</creditcardaddress>
<creditcardpostalcode>12345</creditcardpostalcode>
</customercreditcardauthrq>
</qbmsxmlmsgsrq>
</qbmsxml>
As I've been reviewing the information on creating a request, I found an 'InstallationID' tag referenced. It goes in the element like so:
<signonmsgsrq>
<signondesktoprq>
<clientdatetime>2014-04-03T09:37:23</clientdatetime>
<applicationlogin>my.application.login.id</applicationlogin>
<connectionticket>SDK-MY-Connection-Ticket</connectionticket>
<installationid>IDTYPE</installationid>
<language>English</language>
<appid>9999999999</appid>
<appver>1.0</appver>
</signondesktoprq>
</signonmsgsrq>
My question is: What is the IDTYPE for InstallationID? Where can I get it? What options can I set it to?
I think the problem is not related to your InstallationID field at all. I think the problem is that your XML isn't conforming to what Intuit expects.
Specifically, everything in your XML request is lowercase, when Intuit expects it to be camel case. You're also missing a qbmsxml version header, and a xml version header.
Here's an example of a correctly formed request:
<?xml version="1.0" encoding="utf-8"?>
<?qbmsxml version="3.0"?>
<QBMSXML>
<SignonMsgsRq>
<SignonTicketRq>
<ClientDateTime>2009-10-09T13:14:16</ClientDateTime>
<SessionTicket>xxxxxxxxxxxxky4yL6eBtCULX1zgQ:106892184</SessionTicket>
</SignonTicketRq>
</SignonMsgsRq>
<QBMSXMLMsgsRq>
<CustomerCreditCardChargeRq>
<TransRequestID>35f9cf7cb20994e8a32e6b3e91e8e602</TransRequestID>
<CreditCardNumber>xxxxxxxxxxxx5100</CreditCardNumber>
<ExpirationMonth>10</ExpirationMonth>
<ExpirationYear>2009</ExpirationYear>
<Amount>295.00</Amount>
<NameOnCard>Keith Palmer</NameOnCard>
<CreditCardAddress>56 Cowles Road</CreditCardAddress>
<CreditCardPostalCode>06279</CreditCardPostalCode>
</CustomerCreditCardChargeRq>
</QBMSXMLMsgsRq>
</QBMSXML>
Where are you getting your syntax from? It seems very wrong... here are some good examples:
http://wiki.consolibyte.com/wiki/doku.php/quickbooks_qbms_integration
I'm working on a website for a client that integrates into QuickBook desktop. I need to get a listing of all the checks for a specific account (ideally I would like all transactions for that account [regardless of their type] but if I have to get them one at a time that's fine). When I send the following XML:
<ns1:sendRequestXMLResponse>
<ns1:sendRequestXMLResult>
<xml version="1.0" encoding="utf-8" ?>
<qbxml version="12.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<CheckQueryRq>
<AccountFilter>
<ListID>800000F1-1362066981</ListID>
</AccountFilter>
<IncludeLineItems>true</IncludeLineItems>
</CheckQueryRq>
</QBXMLMsgsRq>
</QBXML>
</ns1:sendRequestXMLResult>
</ns1:sendRequestXMLResponse>
I receive the following error:
<CheckQueryRs statusCode="1" statusSeverity="Info" statusMessage="A query request did not find a matching object in QuickBooks" />
If I go into QuickBooks I can see there are checks associated with the account so I'm not sure why this doesn't return a result.
Update 1: I rewrote this without the AccountFilter so it returned every check and I found checkes with the 800000F1-1362066981 account. It's also 10 MB so it's really hard to work with. :-)
Using the Restful Server Module I do this operation:
GET /api/v1/(ClassName)?(Field)=(Val)&(Field)=(Val) - searches for matching database records
The api should get the urls of all images related to a certain product like this:
http://domain.com/api/v1/Product?ArticleID=myID
unfortunately the returned XML does not show the full information of the ProductImages. just the attributes href and id.
here the xml:
<?xml version="1.0" encoding="UTF-8"?>
<ArrayList totalSize="1">
<Product href="http://domain.com/api/v1/Product/9.xml">
<ArticleID>myID</ArticleID>
<ID>9</ID>
<ProductImages linktype="has_many" href="http://domain.com/api/v1/Product/9/ProductImages.xml">
<ProductImage href="http://domain.com/api/v1/ProductImage/265.xml" id="265"/>
<ProductImage href="http://domain.com/api/v1/ProductImage/268.xml" id="268"/>
<ProductImage href="http://domain.com/api/v1/ProductImage/271.xml" id="271"/>
</ProductImages>
</Product>
</ArrayList>
ProductImage has much more attributes actually which are not displayed in the xml. How to make them visible? I can see all ProductImage Attributes when doing e.g. this:
http://domain.com/api/v1/Product/9/ProductImages
I use curl to load the urls.
In the worst case I think I have to take the ProductImage urls from the XML (e.g. http://domain.com/api/v1/ProductImage/271.xml) and do multiple calls.
many thx for any help,
florian
You need to increase the relationDepth inside RestfulServer. You can do that by passing in the relationdepth query string parameter.
As an aside, the reason it works like this is to keep the load low on the server by not having to instantiate all the image objects. It also means bandwidth is slightly lower too.