Skip to content

HighVolumeException filtering Contacts #604

@TheJackGower

Description

@TheJackGower

SDK you're using (please complete the following information):

  • Version 11.1.1

Describe the bug
When retrieving a filtered list of contacts using the GetContactsAsync method, the API throws a HighVolumeException (ErrorNumber: 51) even when applying a valid where clause to limit the result set. The clause used is:

where: "IsSupplier==true OR (IsSupplier==false AND IsCustomer==false)"

The organisation has over 115,000 contacts. Despite using proper filtering and paging syntax as per Xero’s documentation, the API still fails due to inefficient filtering, making it impossible to retrieve all relevant contacts.

To Reproduce
Steps to reproduce the behavior:
1 - Authenticate with an organisation with >100k contacts.
2 - Call accountingApi.GetContactsAsync with the above where clause.
3 - Do not include If-Modified-Since (i.e., attempt a full filter-based pull).
4 - Observe the HighVolumeException returned by the API.

Expected behavior
The API should successfully return a filtered list of contacts matching the given where clause, especially since the filter limits results to a subset of the full contact list.

Screenshots
Image

Additional context

  • We believe the customer to only have a couple thousand contacts that match the filter predicate.
  • This creates a limitation in Xero’s API where even valid filters are considered "inefficient" at scale.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions