Skip to content
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

Can't search multiple email addresses in one query #267

Closed
andrewjleonard opened this issue Nov 13, 2023 · 4 comments
Closed

Can't search multiple email addresses in one query #267

andrewjleonard opened this issue Nov 13, 2023 · 4 comments

Comments

@andrewjleonard
Copy link

andrewjleonard commented Nov 13, 2023

The following does not work.

email_query = batch.map { |email| "'#{email}'" }.join(', ')

opts = {
    where: "EmailAddress IN (#{email_query})"
}

response = xero_client.accounting_api.get_contacts('', opts)
Copy link

PETOSS-366

Copy link

Thanks for raising an issue, a ticket has been created to track your request

@manishT72
Copy link
Contributor

@andrewjleonard Thanks for raising the query. Searching for multiple email addresses using 'IN' clause is not supported at the moment. However, you may want to try something like
EmailAddress!=null AND EmailAddress=="abc@def.com" OR EmailAddress=="ghi@jkl.com"

@manishT72
Copy link
Contributor

@andrewjleonard We are closing the ticket. However, if you want this feature to be supported in API, please check here for feature requests. You can search to see if it has been requested before and upvote it, or you can create a new request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants