Problem
Certain API endpoints support pagination (i.e. Invoices), but the current list functions don't provide sufficient response information to be able to access it.
Example for Pagination
Request
GET https://api.xero.com/api.xro/2.0/Invoices?page=1
Response
{
"Id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"Status": "OK",
"ProviderName": "xxxxxxxx",
"DateTimeUTC": "\/Date(1738629433480)\/",
"pagination": {
"page": 1,
"pageSize": 100,
"pageCount": 2,
"itemCount": 113
},
"Invoices": [
...
]
}
Proposed Solutions
Instead of returning the datasets directly, the "ListResponse"object should be returned as a whole and allow the user to handle looking at the returned structure.
This would allow the user to call invoices::list() again and just increment a new ListParameter called page based on the response objects "pagination" field as required.
Problem
Certain API endpoints support pagination (i.e. Invoices), but the current list functions don't provide sufficient response information to be able to access it.
Example for Pagination
Request
GET https://api.xero.com/api.xro/2.0/Invoices?page=1
Response
Proposed Solutions
Instead of returning the datasets directly, the "ListResponse"object should be returned as a whole and allow the user to handle looking at the returned structure.
This would allow the user to call
invoices::list()again and just increment a new ListParameter calledpagebased on the response objects "pagination" field as required.