Skip to content
Get in touch

Sorting

The order or direction to sort results by.

ValueDescription
ascAscending order (e.g., low to high or A to Z)
descDescending order (e.g., high to low or Z to A)

A JSON example of this model.

"asc"

Query parameters for sorting. These parameters should be used on GET routes that support sorting.

ParameterTypeDescription
sortByunknownThe field to sort by, should be an enum for individual routes
customSortBystringAn implementation-defined sort key
sortOrderSortOrderThe order to sort by

A JSON example of this model.

/common-grants/opportunities?sortBy=lastModifiedAt&sortOrder=asc

Body parameters for sorting. These parameters should be used on POST and PUT routes that support sorting.

ParameterTypeDescription
sortByunknownThe field to sort by, should be an enum for individual routes
customSortBystringAn implementation-defined sort key
sortOrderSortOrderThe order to sort by

A JSON example of this model.

{
"sortBy": "lastModifiedAt",
"sortOrder": "asc"
}

Information about the sort order of the items returned. This model should be included in responses that support sorting.

ParameterTypeDescription
sortBystringThe field to sort by
customSortBystringAn implementation-defined sort key
sortOrderSortOrderThe order to sort by
errorsArray<string>The errors that occurred during sorting

A JSON example of this model.

{
"sortBy": "lastModifiedAt",
"customSortBy": "customField",
"sortOrder": "asc"
}