Sorting
Apiture Digital Banking APIs support collection sorting. To sort a collection,
add a ?sortBy=sort-criteria
query parameter to the GET
operation
on the collection.
Examples:
GET https://api.thirdpartybank.com/transactions/scheduledTransactions?sortBy=createdAt
GET https://api.thirdpartybank.com/transactions/scheduledTransactions?sortBy=-postedAt,title
The sort-criteria
are a list of sort keys, expressed as a comma-separated list of
properties. These are properties from the collection’s item schema.
The default sort order is ascending order.
If you add the -
prefix before a property, the sort order changes to descending order.
How you order the properties determines the sort priority. For example, with
?sortBy=-postedAt,title
, the collection is first sorted
by postedAt
(in descending order), then by the secondary sort key, title
.
Not all properties are allowed in sort criteria; properties which have object or array types are not sortable.
The pagination _links
embedded in a collection’s response body preserve the
sort criteria and include the same sortBy
properties.