Allow the number of remaining API calls to be queried
It would be great to have an endpoint to be able to query the number of remaining callouts for a Xero ORG, or the number used in the last 24h rolling period.
We have a 5000 call limit per ORG. As an integration partner that deals with many different sizes of businesses (small to large), each business pushes / pulls a different number of invoices, notes, history etc each day.
We don't want the larger users to hit their rate limits and restrict them from syncing the important information such as invoices.
If we could query the number of callouts being used or remaining, we can build in-app sync logic to dynamically change the sync timing or data to sync based on the number of callouts remaining.
Especially now that access to additional endpoints (Quotes etc) have become available, there is more data to transfer but the same amount of API calls and no visibility as to when a customer is approaching their daily limit.
With our move to OAuth 2.0, we now provide this information in the http headers of each response.
See the relevant documentation here: https://developer.xero.com/documentation/oauth2/limits