Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue was raised against the Xero-Java repo at first and it was later moved to the Xero-OpenAPI repo. Please see details defined in this issue. XeroAPI/Xero-OpenAPI#534
SDK you're using (please complete the following information):
Version 4.23.0
Describe the bug
As per the developer documentation when paging for invoices each page will contain up to 100 invoices. However, when paging using IDs query parameter the maximum number of IDs that we can pass into this query parameter is 52. This limits us to 52 invoices per request instead of 100 invoices per request.
We suspect this is a "max character limit per query parameter" set on your gateway where 53 IDs in the IDs query parameter exceeds this limit. This limitation makes us hit our rate limits quicker than expected.
Endpoint being called (IDs removed as the URL is very long with 53 IDs)
GET https://api.xero.com/api.xro/2.0/Invoices?IDs=61548c60-b5ff-460c-acba-7963b9879adc,[53 invoice IDs]&page=1
To Reproduce
Using an HTTP client create a request to the /Invoices endpoint. Set page query parameter to = 1. Set IDs query parameter = 53 valid invoices IDs
Expected behavior
We expect the API to return 100 invoices per page when being passed 100 invoice IDs in the IDs query parameter
Screenshots
Using 53 invoices IDs API returns 404 (even though these IDs do exist)
image
Using 52 invoices IDs API returns 52 invoices
image