Skip to main content

Ordering results

Basics and examples of ordering in Proactis APIs

In addition to filtering, you can limit response data using the sortField and sortOrder parameters to specify the ordering of records in the response. The API can return results in ascending order or descending order.

Sorting in ascending order

If you want to return a list of invoices in ascending order, oldest first, use the following syntax: sortField=invoiceNumber&sortOrder=asc.

Sorting in descending order

To return results sorted in descending order you simply change the sortOrder parameter value. For example, to return the same list of invoices, this time with the newest invoice first, use the following syntax: sortField=invoiceNumber&sortOrder=desc.