-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter not working for purchase orders #246
Comments
It turns out you actually don't want to filter the results, you want to get a single record. The URI for this request changes from https://api.xero.com/api.xro/2.0/PurchaseOrders?where='PurchaseOrderNumber=PO-0014' to: https://api.xero.com/api.xro/2.0/PurchaseOrders/PO-0014 Yes, this endpoint works for both PurchaseOrderNumber and PurchaseOrderID values. So your code should simply look like:
|
Hey Matt, Thanks for the quick reply. Those were just one of the examples I'm using. I'll update the code for that one. But that was just one of the two examples given. The second one should return a list of POs right? xero.purchaseorders.filter(Contact_ContactID=contact) The following isn't working either: Neither is this one: They all just return a list of all of my purchase orders. Thank you for any help you can provide. |
I'm having trouble filtering purchase orders. I can filter contacts just fine:
xero.purchaseorders.filter(PurchaseOrderNumber='PO-0014')
xero.purchaseorders.filter(Contact_ContactID=contact)
where contact equals: contact = xero.contacts.filter(Name=request.POST['supplier'])[0]['ContactID']
The contact filter is working fine. however the purchase order filter is just returning a list of all purchase orders, no matter what filter I try
The text was updated successfully, but these errors were encountered: