api.tipmoto.com » API documentation » Reference » Filtering

Filtering records

Records in the API can be filtered. The list of supported attributes and their values (by type) can be found in the documentation of each agenda.

Filtering is done with the URL parameter ?filter= .

Supported operators

Operator Name Description Example
= Equality The element equals the value a = 1
nazev='YZF-R1'
!= or <> Inequality The element does not equal the value a!=1
nazev != 'YZF-R1'
< Less than Less than (can also be used e.g. with time) a < 1
<= Less than or equal Less than or equal to (can also be used e.g. with time) a <= 1
> Greater than Greater than (can also be used e.g. with time) a > 1
>= Greater than or equal Greater than or equal to (can also be used e.g. with time) a >= 1
like Contains like works like the MySQL operator, i.e. % can be used and diacritics are evaluated accordingly a like 'inStr'
a like 'inStr%'
begins Begins with Whether the value begins with the string a begins 'yzf'
ends Ends with Whether the value ends with the string a ends 'r1'
in [] Is in the enumeration Enumeration of values the element takes a in [1, 5, 'inStr']
not in [] Is not in the enumeration Enumeration of values the element does not take a not in [1, 5, 'inStr']

Chaining operators:

Operator Name Description Example
and Logical operator and Allows combining conditions a = 1 and b = 1
or Logical operator or Allows combining conditions a = 1 or b = 1
not Logical operator not negation of the condition not a = 1
() Parentheses Setting priorities (a = 1 or b = 1) and (c = 2)

Operators have the usual precedence; if you are not sure, use parentheses.

Note: Filters must be correctly encoded in the URL.

Writing values

In expressions such as a = 1 you can enter numbers, text strings and date+time. In addition, the operators listed in the table above can be used.

Numbers can be integers or decimals. You can write a number, or a number in apostrophes.

Enclose text strings in apostrophes. Double quotes are not supported.

Date and time are entered in the format: 'YYYY-MM-DD HH:MM:SS' or YYYYMMDDHHMMSS.

Note: Enumeration values must be used in apostrophes, even if they are numbers. For simplicity, we recommend enclosing all values in apostrophes.


Full-text filter (search)

The options for full-text search (filtering) are described in the full-text search reference.


Filtering lists by dealer

Agenda lists lists all lists from TipMoto.com by default
Based on your interest, we have added the URL parameter ?c=IDfirmy ; if you use the parameter c, the lists are restricted to the data currently used by that particular dealer.
If a list contains a substructure (e.g. brands), the substructure data are, when restricted to a dealer, likewise restricted to the data the dealer currently uses.

For lists that are used across several agendas (manufacturer, model), you can also use the additional URL parameter ?cagenda=agenda , which restricts the output to the lists of the given agenda (e.g. ?c=ID&cagenda=moto or ?c=ID&cagenda=dily).

To use the dealer filter, logging in to the API is required even for lists.

TipMoto.com Contact us