Filter

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Filter

Extra filters can be passed when fetching data.  This can be done at GetBookings, GetAspects and GetRelations.

 

Tag/field name

Type

Remark

Description

field

string

mandatory

Field name

The field name must be a field name of the type requested. Check the Response structure of the Request.

The Internal name of a user field can be used for filtering.

operator

string

mandatory

Operator

Operator

Description

=

is

!=

is not

>

greater than 1)

>=

greater than or equals 1)

<

smaller than 1)

<=

smaller than or equals 1)

$

contains

!$

does not contains

$*

starts with

!$*

does not starts with

..

in list

Tag/field name value contains a comma separated list of values for filtering.

!..

not in list

Tag/field name value contains a comma separated list of values for filtering.

value

string

mandatory

Waarde waarop moet worden gefilterd

Tag/Field name type

Remark

float

Value mandatory, numeric. It may contain one decimal separator.

E.g.: 14.99

integer

Value mandatory, numeric. It may NOT contain an decimal separator.

E.g.: 100

string

No remarks (Value can be empty)

boolean

Value mandatory. Valid values are: true or false

date

Value mandatory. Value must use this format: yyyy-MM-dd.

E.g.: 2018-01-31 (is 31 januari 2018)

 

If you want to filter on a date + time , use this format: yyyy-MM-dd hh:mm:ss.SSS.

yyyy = year in 4 digits.

MM = month in 2 digits (01 t/m 12).

dd = day of the month in 2 digits.

hh = hours in 2 digits (00 t/m 23).

mm = minutes in 2 digits (00 t/m 59).

ss = seconds in 2 digits (00 t/m 59).

SSS = milliseconds in 3 digits (000 t/m 999).

1) Make sure that the system (library) that generates the soap messages will xml-escape the > (greater than) and < (smaller than) signs correct (i.e. &gt; en &lt;)

 

Example

For example this filter can be used the fetch new or changed data from a certain date. This can be done by make a filter on the field TIMESTAMP, like this:

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP-ENV:Header/>

<S:Body>

  <ns2:GetBookings xmlns:ns2="api.timewriter.nl">

    <securityToken></securityToken>

    <startDate>2021-04-01</startDate>

    <endDate>2021-05-01</endDate>

    <filters>

      <filter>

        <field>TIMESTAMP</field>

        <operator>&gt;</operator>

        <value>2021-04-15 11:11:00.000</value>

      </filter>

    </filters>

  </ns2:GetBookings>

</S:Body>

</S:Envelope>