Add Total Record Count to GET Request Responses
It would be useful to have a total record count in the response when executing GET requests against the Xero Accounting API, especially in those instances where paging is being used.
For example, a GET request for Invoices could return:
{
"Id": "xxx",
"Status": "OK",
"TotalRecords": 6721,
"Invoices": [
....
]
}
The use case for this is if I have an application that wants to display invoices to the user (without data replicating into the app), I'd like to display those in a paginated list. But there's no way for the app to know how many pages of Xero invoices there are without querying all invoices and determining how many pages there are, or doing a call without pagination and getting a count that way (but takes a long time if there's a lot of records).
Seems a bit inefficient. A simple total record count for every GET request would be very useful to do proper pagination outside of Xero.
-
Joshua bENNETT
commented
Great suggestion adding a total record count to GET responses can really improve pagination and client-side planning. It helps consumers estimate load times, manage offsets, and design better UX around large datasets. For teams dealing with structured records like https://dakotacountycourts.org data, this small addition can significantly reduce extra calls and guesswork. Overall, it’s a practical enhancement that promotes transparency and more efficient API consumption.
-
anthony_wallace
commented
Great point about adding total record counts to GET responses—it really improves clarity for anyone working with paginated data. Knowing the full scope upfront helps with better UI decisions and reduces unnecessary follow-up requests. I’ve seen similar ideas applied when browsing large public datasets, such as through resources like https://hillsboroughcountycourts.org where context around volume makes navigation far more intuitive. Overall, this approach feels practical and developer-friendly, especially for data-heavy applications.
-
Hshk commented
Great point about including a total record count in GET responses, as it really improves clarity for anyone consuming the API. It becomes much easier to manage pagination and user expectations when working with data-heavy resources like https://spartanburgcountycourts.org in real-world applications. This approach also reduces unnecessary follow-up requests and keeps responses more transparent. Overall, it’s a simple enhancement that delivers strong usability and performance benefits.
-
Flody Javion commented
This is a fantastic suggestion, as having a total record count would greatly enhance efficiency for developers working on integrations! On a related note, when dealing with data like https://branchcountyjails.org efficient pagination and record management are critical for usability and performance. Xero implementing this feature could really streamline workflows for everyone!