How to filter for a object wiith a “value” and “name” in QBO api?

How to filter for a object wiith a “value” and “name” in QBO api?



It seems like its the api won't permit a query filter of the form:


select * from purchaseorder where APAccountRef.value='33'



In the case of purchase orders it seems to mean that I need to bring down every purchase order to my server and scan for the account I need which is highly suboptimal. Is there some other syntax for querying against the many attributes which have been encoded like


"APAccountRef":
"value": "33",
"name": "Accounts Payable (A/P)"



with just a name and value attribute?




1 Answer
1



If you refer to the documentation:



It gives you a list of all fields, and a list of fields that are filterable. Your query is using a field that does not exist as part of Purchase Orders:


filterable


Purchase Orders



AccountRef.value='39'


AccountRef.value='39'



The correct field is:


APAccountRef:
required
ReferenceType, filterable
Specifies to which AP account the bill is credited.



So your query should be:



SELECT * FROM purchaseorder WHERE APAccountRef = '39'


SELECT * FROM purchaseorder WHERE APAccountRef = '39'






When I try APAccountRef='39' I get "Fault":"Error":["Message":"Invalid query","Detail":"QueryValidationError: property 'APAccountRef' is not queryable","code":"4001"],"type":"ValidationFault","time":"2018-09-17T17:20:32.057-07:00"

– user1023110
Sep 18 '18 at 0:20






I also tried SELECT * FROM PURCHASEORDERS WHERE APAccountRef.value='39' and get QyereyValidationError Property APAccountRef.value not found for Entity PurchaseOrder"

– user1023110
Sep 18 '18 at 0:29






I would report this to Intuit as a bug then. It should be a filterable field according to their documentation. You should be able to enter a support ticket from within your Intuit developer account.

– Keith Palmer Jr.
Sep 18 '18 at 15:15


filterable






This has been fixed in the api now.

– user1023110
Oct 9 '18 at 0:14



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế