DataService.query: single field, multiple conditions

Turns out it’s impossible to set multiple conditions for the same field in DataService.query. For example, if we set queryData.StartDate ~>=~ 2018-03-15T00:00:00, it will work as expected and gives results that only newer than 2018-03-15.
But if we want to get data for some period, e.g. set queryData.StartDate ~>=~ 2018-03-15T00:00:00 AND set queryData.StartDate ~<=~ 2018-03-16T00:00:00 at the same time, only the second condition is taken into account. So how we can perform a query on a given period? It seems that multiple assignments of the same field just overwrite it.
Tried to read xml-rpc - Keap Developer Portal to no avail.

You cannot run a date range query as the api will only accept the single query, as you’ve discovered. You can create saved searches and pull information based on that but then it won’t be dynamic (the dates wouldn’t adjust but rather would be what you set the saved search for).

Then it would be nice to have some sort of AND conditions, similar to SQL.

It would be, but as you can see by now, it’s not sql. Now sometimes you can use the order by method to simplify filtering through results but that’s the best I know to tell you :wink: