-
Notifications
You must be signed in to change notification settings - Fork 19
Description
The section about pagination states:
The older_id is always the ID of the first item in the current page.
However: by default Payments are sorted descending by creation date: the newest Payment is the first item in the current page, for example when GETting 5 Payments out of 10:
GET /v1/user/1/monetary-account/1/payment?count=5
- Payment#10
- Payment#9
- Payment#8
- Payment#7
- Payment#6
According to the documentation, for the next page the older_id
should be the ID of the first item: 10
:
GET /v1/user/1/monetary-account/1/payment?count=5&older_id=10
:- Payment#9
- Payment#8
- Payment#7
- Payment#6
- Payment#5
This seems incorrect: Payment#9 to Payment#6 were already returned on the first "page".
Instead, older_id
should be 6
, so the next page with older items would be:
GET /v1/user/1/monetary-account/1/payment?count=5&older_id=6
:- Payment#5
- Payment#4
- Payment#3
- Payment#2
- Payment#1
I guess that would mean that "the older_id is always the ID of the LAST item in the current page".
A proper/complete and logical example in the documentation would clarify a lot.
I would say that the documentation should be agnostic of the order the Payments are retrieved by using an explanation like:
"The older_id is always the ID of the oldest item in the current page".