Skip to content
TrackSafe365
v1.0 Dashboard →

Filtering & Sorting

Every collection endpoint (for example GET /trucks) accepts criteria filters. You filter by appending an operator suffix to a field name and passing it as a query parameter:

field.operator=value

Multiple filters are combined with AND — a row must match every filter to be returned.

# Active Freightliner tractors from 2020 onward, newest unit number first.
curl "https://dev-gw.tracksafe365.com/services/glssafety/api/public/trucks\
?make.equals=Freightliner\
&active.equals=true\
&year.greaterThanOrEqual=2020\
&sort=unitNumber,desc" \
  -H "Authorization: $TS365_API_KEY"

Operators

The operators available on a field depend on its type.

OperatorApplies toMeaning
.equalsallExact match
.notEqualsallNot equal
.inallMatches any value in a comma-separated list
.notInallMatches none of a comma-separated list
.specifiedalltrue → field is non-null; false → field is null
.containsstringSubstring match (case-insensitive)
.doesNotContainstringNegated substring match
.greaterThannumber, dateStrictly greater than
.lessThannumber, dateStrictly less than
.greaterThanOrEqualnumber, dateGreater than or equal
.lessThanOrEqualnumber, dateLess than or equal

.in / .notIn take a comma-separated list, and the parameter may also be repeated:

?id.in=1,2,3
?unitNumber.in=1042&unitNumber.in=1043

Filterable fields — Trucks

FieldTypeOperators
idintegerequals, notEquals, in, notIn, specified, greaterThan, lessThan, greaterThanOrEqual, lessThanOrEqual
modelstringequals, notEquals, in, notIn, specified, contains, doesNotContain
makestringequals, notEquals, in, notIn, specified, contains, doesNotContain
unitNumberstringequals, notEquals, in, notIn, specified, contains, doesNotContain
vinstringequals, notEquals, in, notIn, specified, contains, doesNotContain
yearintegerequals, notEquals, in, notIn, specified, greaterThan, lessThan, greaterThanOrEqual, lessThanOrEqual
activebooleanequals, notEquals, in, notIn, specified
licensePlateNostringequals, notEquals, in, notIn, specified, contains, doesNotContain
licensePlateIssueDatedate-timeequals, notEquals, in, notIn, specified, greaterThan, lessThan, greaterThanOrEqual, lessThanOrEqual
companyIdintegerequals, notEquals, in, notIn, specified, greaterThan, lessThan, greaterThanOrEqual, lessThanOrEqual
globalIdstringequals, notEquals, in, notIn, specified, contains, doesNotContain

Fields not listed above — such as vehicleType, fuelType, note, and integrationVin — are returned in the response but are not filterable.

Sorting

Use sort to order results, formatted as property,(asc|desc). The direction is optional and defaults to ascending. Repeat the parameter for a multi-key sort:

?sort=year,desc&sort=unitNumber,asc

Distinct

Pass distinct=true to collapse duplicate rows that can appear when filtering across joined relations.

  • Pagination — the page / size controls and the Page response envelope these results are wrapped in.