Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/url length #331

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

lancedfr
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant