You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.
and when I check results I see that only one of these conditions was applied (right or left depending on what logical operator was used -- AND or OR).
At the same time when I try to do this filtering using API Preview it works fine: ContactNumber = "Foo" OR Name = "Bar"
Am I doing anything wrong?
The text was updated successfully, but these errors were encountered:
The contact number property on each contact is considered a unique identifier. It makes the lookup in our database very fast when added to the url path, as opposed to the generic ?WHERE= filter, which is typically slower.
There's currently no way to force the XeroAPI.Net library to generate a ContactNumber = "Foo" OR Name = "Bar" WHERE querystring parameter.
@danbarratt, thank you for your quick answer.
I see that API Preview allows retrieving Contact by ContactNumber in the same way as by ID too and I understand all the advantages of this approach. But API Preview doesn't deny filtering by these fields, so why XeroAPI.Net library behave differently?
Let me explain an issue that I have because of this optimization: I'm trying to retrieve batch of contacts by ContactNumber and currently I have to get each of them individually (which looks inefficiently and may lead to API limits exceeding) or get all of them each time (even with some filtering it's better but not good enough) or store them locally (which add complexity to my system).
So having an ability to choose between speed and functionality would be great for me and maybe for other developers.
UPD: I found workaround for my particular case.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
So I'm trying to do next:
and when I check results I see that only one of these conditions was applied (right or left depending on what logical operator was used --
AND
orOR
).At the same time when I try to do this filtering using API Preview it works fine:
ContactNumber = "Foo" OR Name = "Bar"
Am I doing anything wrong?
The text was updated successfully, but these errors were encountered: