question

$$anonymous$$ avatar image
0 Likes"
$$anonymous$$ Suspended asked

GetOrders - Sorting order descending *incorrect* - how to solve?

Hi guys, just setting up my app and first problem came up: When using "GetOrders" with the following settings - NumberOfDays = 30 - SortingOrder = 'Descending' - OrderRole = 'Seller' - Pagination->EntriesPerPage = 50 I get this behaviour: Results are ordered descending WITHIN the page, but the pages are still ordered ascending. Thus page 1 has orders in descending order (e.g. July), but page 2 then has newer orders than page 1 which are ordered descending again (but all newer than orders of page 1, e.g. August). Is it possible to really order descending over all orders, thus over all pages? So page 1 with latest orders of last 30 days...? The above kind of ordering does not really help anyone I guess... Thanks
getorderspaginationsortingsortorderpagelatest
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

rhall9399 avatar image
0 Likes"
rhall9399 answered
Hi @holzkloetzchen_de, Orders returned in the GetOrders call are returned based on the latest modification time. And since orders go through a few states (order creation, awaiting payment, payment pending, payment cleared, etc.), it is possible that you will see orders with later creation times (time of purchase) on the current page of orders than the subsequent pages of results. This is become those orders on the current page just went through a state change. However, it is possible that this call may be having an issue with sorting, so if you indeed think there is still an issue, please let us know. Russell eBay Developers Program
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

$$anonymous$$ avatar image
0 Likes"
$$anonymous$$ Suspended answered
Hi Russell, thanks a lot for your reply and the information. When calling GetOrders with sort order descending the results seem to be sorted correctly per page, thus by lastmodified date (creation date may not be in order as explained by you). But still, the results - menaing the lastmodified dates - on the first page are older than on the second page and so forth... It seems like the sorting is done as follows: "get all results/orders" "sort by lastmodified date ascending" "split results in pages" and now ONLY SORT THE PAGES ITSELF decending. Thus, the results as a whole are still sorted ascending only the pages are then sorted descending. Can this be verified? In case, I don't think this is the desired behaviour - is it? Regards Bernhard
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sazidshai_0 avatar image
0 Likes"
sazidshai_0 answered
Can I have the Code of sorting orders in descending order
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.