XeroAPI / xero-python

Official Xero OAuth 2.0 python SDK
MIT License
132 stars 52 forks source link

HighVolumeException: Issue retrieving 20 contacts at a time via ContactNumbers #148

Closed ilankessler closed 6 days ago

ilankessler commented 2 months ago

I believed our current method of filtering contacts would be efficient enough, but our systems have crashed due to the new high volume threshold limits.

Here is our current approach for fetching contact numbers:

contact_numbers = ["A400", "A500", "A600", "A700", ...]
where = "||".join([f'ContactNumber="{contact_number}"' for contact_number in contact_numbers])
contacts = client.get_contacts("", where=where, summary_only=True)

However, we’re encountering the following error:

HighVolumeException
Your request is not filtering Contacts efficiently, given the extremely high volume for this organisation. Please check https://developer.xero.com/documentation/api/efficient-data-retrieval for tips on making Contact retrieval more efficient.

Given the volume, it’s too slow and subject to rate limiting to retrieve each row individually.

Is anyone able to suggest an efficient way to retrieve contact information under these constraints? Any insights or recommendations would be greatly appreciated.

Thanks in advance!

github-actions[bot] commented 2 months ago

PETOSS-570

github-actions[bot] commented 2 months ago

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

Sallyhornet commented 2 months ago

Please can you raise this as a case with Xero Support here as it is an API issue rather than an issue with the SDK itself.

Please can you include the client id for your app

Sallyhornet commented 2 months ago

This is an API query not an issue with the SDK