
How to filter by BankAccount when fetching BankTransactions using PHP?
When filtering BankTransactions, I understand that it requires an object with Code and AccountID, but how do you write that using the API?
I’ve tried all sorts, including:
'BankAccount=="AccountID=="XXXXXXXX-0000-XXXX-XXXX-XXXXXXXXXXXX""'
How do I add a nested object as a where query?
I’ve tried all sorts, including:
'BankAccount=="AccountID=="XXXXXXXX-0000-XXXX-XXXX-XXXXXXXXXXXX""'
How do I add a nested object as a where query?
2
Replies

Try something like this:
GET https://api.xero.com/api.xro/2.0/BankTransactions?where=BankAccount.AccountID==GUID("a8d6fb1a-8c5d-4683-90ce-bf9d28fc62ba") && Status="AUTHORISED"
GET https://api.xero.com/api.xro/2.0/BankTransactions?where=BankAccount.AccountID==GUID("a8d6fb1a-8c5d-4683-90ce-bf9d28fc62ba") && Status="AUTHORISED"

This example shows how to filter by deep object. It's VERY useful and should be added to the official documentation. Please add it!