TrackRecordPro API Documentation TrackRecordPro

Result Ordering

When returning results using the GET endpoint, you can specify the order of the results. To do this, include the HTTP header "X-API-Result-Order".

The X-API-Result-Order header should contain a comma separated list of field names to sort by, which by default sort ascending. To sort a field descending, suffix the field name with a ^ symbol. For example:

GET /3.0/users/page=1 HTTP/1.1
Host: api.trackrecordpro.co.uk
Connection: close
X-API-Result-Order: users.first_name,users.last_name^,users.id

You may order your results by any of the objects values in the response which always have only one value, e.g. if you are querying users, you may order on values within company, and if you are querying companies you may order on location, however you may not order on any related object which can have multiple values, e.g. the files within an asset object.

Dealing with conflicting names

Where the field name is unique, you may specify just the field name, and where it conflicts with the field name within another object (e.g. "id"), you can optionally prefix it with the object's name, as above.