Feature Requests
Share ideas, discuss and vote on requests from other users in community

Sort GetInvoices API to sort by invoice id

Tay Shu Yih shared this idea 2 years ago
Under Consideration

Call GetInvoices api is returning result is wrong order https://developers.whmcs.com/api-reference/getinvoices/

The data returned is ordered by the tblinvoices.duedate value and is sorted by descending order

However, if there are multiple invoices on the SAME date, the order seems to be RANDOM

As such, if I have a new order, it will be slotted into the middle of the list, (end of all the orders created today), instead of sorting by date time.

Or, is that possible if I can pass in the order parameter myself? Then at least I control it to return in a more meaningful listing. i.e. order by invoice id instead. So that I can show latest invoice created to be listed on top of the list.