Ordering

Structure your API response in a desired order

Use the orderBy parameter to order API response output

Ordering enables API users (business analysts, developers) to sort the results of each request, where applicable, by specifying the order of records in the response payload. To achieve that, use orderBy as the path parameter. This way, you get only relevant data in an already sorted form.

How to sort the response with the orderBy parameter

The query has the following structure: orderBy={value}, where: value is the value of the property to sort.

To sort the output, add orderBy to the property by which it should be ordered. For example:
https://sandbox.upswot.com/admin/api/v1/normalized-data/companies?OrderBy=name

The response payload is returned in ascending order (the oldest outstanding records first) by default. To get the exact list but in descending order, add &Desc=true. For example:

https://sandbox.upswot.com/admin/api/v1/normalized-data/companies?OrderBy=name&Desc=true

📘

You cannot add orderBy to the multiple properties. Otherwise, a 400 error code returns.