# Mautic REST API where clause is unclear

**URL:** <https://forum.mautic.org/t/mautic-rest-api-where-clause-is-unclear/15450>\
**Category:** Documentation\
**Created:** [July 30, 2020, 7:41am UTC](https://forum.mautic.org/t/mautic-rest-api-where-clause-is-unclear/15450 "2020-07-30T07:41:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabe](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gabe/32/436_2.png) [@gabe](https://forum.mautic.org/u/gabe)\
**Post date:** [July 30, 2020, 7:41am UTC](https://forum.mautic.org/t/mautic-rest-api-where-clause-is-unclear/15450/1 "2020-07-30T07:41:23Z")

</div>

The [API Docs](https://developer.mautic.org/#list-contacts) specifically call out the ability to send over complex selection criteria for contacts using the where clause. It says that “This design allows to add multiple conditions in the same request.” But it’s not at all clear how to add multiple conditions and how to build the corresponding query string. I guessed you could just add to the array for an AND clause, and that did indeed work; however, I can’t figure out how to build an OR clause. Can anyone share what a sample OR clause would look like as a query string and/or what it would look like in PHP?

---

<div class="post-metadata">

**Author:** ![bobkitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/bobkitz/32/12780_2.png) [@bobkitz](https://forum.mautic.org/u/bobkitz)\
**Post date:** [August 21, 2023, 3:50pm UTC](https://forum.mautic.org/t/mautic-rest-api-where-clause-is-unclear/15450/2 "2023-08-21T15:50:54Z")

</div>

A few examples would be very helpful. For example, how do you construct a where clause for id\>1000 ? The URL example provided doesn’t really shed light, even after I decode the URL parameters into simple ascii. (`where[0][col]=phone&where[0][expr]=in&where[0][val]=444444444,888888888`)
