# Recommendations on filtering operation (and/or)

**URL:** <https://discuss.jsonapi.org/t/recommendations-on-filtering-operation-and-or/158>\
**Category:** Uncategorized\
**Created:** [October 16, 2015, 1:49am UTC](https://discuss.jsonapi.org/t/recommendations-on-filtering-operation-and-or/158 "2015-10-16T01:49:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdixon04](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/jdixon04/32/90_2.png) [@jdixon04](https://discuss.jsonapi.org/u/jdixon04)\
**Post date:** [October 16, 2015, 1:49am UTC](https://discuss.jsonapi.org/t/recommendations-on-filtering-operation-and-or/158/1 "2015-10-16T01:49:32Z")

</div>

Hi,

Reading over the spec, it’s unclear on how to specify how filtering is applied with regards to operation (AND/OR). For example, say I have an endpoint for retrieving a list of appointments. If I wanted to return all appointments that where `createdBy=business` AND `requestStatus=pending`, this works if my filters are applied on the backend using AND in my queries. But what if I wanted to do all the above except I wanted to return results where `requestStatus=pending` OR `requestStatus=scheduled`? My point is that I’m unclear as to how to specify the type of operation in the JSON API-way.

Appreciate any suggestions!

James

---

<div class="post-metadata">

**Author:** ![ethanresnick](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@ethanresnick](https://discuss.jsonapi.org/u/ethanresnick)\
**Post date:** [October 21, 2015, 8:34am UTC](https://discuss.jsonapi.org/t/recommendations-on-filtering-operation-and-or/158/2 "2015-10-21T08:34:31Z")

</div>

JSON API leaves this (at least for now) up to each implementation. Here’s some [more context](https://github.com/json-api/json-api/issues/620#issuecomment-119190825).
