Add a new filter

POST {{baseUrl}}/filters

Adds a new filter, returns the ID upon success. Note that in the conditions JSON object only one first-level condition group is supported, and it must be glued with 'AND', and only two second level condition groups are supported of which one must be glued with 'AND' and the second with 'OR'. Other combinations do not work (yet) but the syntax supports introducing them in future. For more information, see the tutorial for adding a filter.

Request Body

{"name"=>"<string>", "conditions"=>"<object>", "type"=>"<string>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;success&quot;:true,&quot;data&quot;:{&quot;id&quot;:1,&quot;name&quot;:&quot;Deal title is &#39;my title&#39;&quot;,&quot;active_flag&quot;:true,&quot;type&quot;:&quot;deals&quot;,&quot;temporary_flag&quot;:false,&quot;user_id&quot;:1,&quot;add_time&quot;:&quot;2018-01-27 08:49:26&quot;,&quot;update_time&quot;:&quot;2018-01-27 08:49:26&quot;,&quot;visible_to&quot;:1,&quot;custom_view_id&quot;:1,&quot;conditions&quot;:{&quot;glue&quot;:&quot;and&quot;,&quot;conditions&quot;:[{&quot;glue&quot;:&quot;and&quot;,&quot;conditions&quot;:[{&quot;object&quot;:&quot;deal&quot;,&quot;field_id&quot;:&quot;123141&quot;,&quot;operator&quot;:&quot;=&quot;,&quot;value&quot;:&quot;my title&quot;}]},{&quot;glue&quot;:&quot;or&quot;,&quot;conditions&quot;:[null]}]}}}