List Endpoints

Several Zendrive API end points return a list of resources like drivers or trips. Such lists of resources can be large depending on your fleet size (number of drivers or number of trips) and time window of the query. The API provides some common parameters to process responses from these List endpoints. All of them are optional.

Sorting

The list API methods also allow sorting the list by different numerical attributes in both ascending and descending order. This can be done by the order_by and order_type query parameters.

Query Parameter Default Description
order_by none Specifies the numerical attribute by which to sort the list of resources in the response. This is supported for the various zendrive score types in the score section of the response (e.g: zendrive_score) and numerical attributes in the info section of the response. (e.g: distance_km). By default, lists in responses are unsorted.
order_type asc Specifies the sort order. asc for sorting in ascending order. desc for sorting in descending order.