Before you go, take 40% off annual plans

Leave your email and get 40% off any Entayo CRM plan paid annually, for your first 2 years.

Applies to annual billing only. We only use your email to honour this discount.

Skip to content
Entayo CRM guides

Filters

Simple filters

On GET /master/{kind}:

  • search=… — free text.
  • f_<column>=<value> — one column equals a value, e.g. f_country=Germany. Repeat for more columns (all must match).
  • list_id=… with membership=in_list or not_in_list.
TerminalCode
curl -s "$CRM/master/people?f_country=Germany&f_seniority=Director" -H "Authorization: Bearer $KEY"

The filter parameter

For anything more, filter takes a group of conditions as compact JSON, base64url-encoded (no padding).

A condition: {"f": "<field>", "o": "<operator>", "v": "<value>"} — add "w" for the upper bound of between / date_between, or "s": [..] for the many-value operators.

A group: {"c": "A", "g": [ …conditions or groups… ]} — "A" = all must match, "O" = any. Add "n": 1 to negate the group.

Operators

Field kindOperators
Text, selecteq neq contains not_contains starts_with ends_with in not_in contains_any contains_all contains_none is_empty is_not_empty
Numbereq neq gt gte lt lte between is_empty is_not_empty
Datedate_on date_before date_after date_between last_n_days next_n_days is_empty is_not_empty
Yes / nois_true is_false
Multi-selecthas_any has_all has_none

f is a column slug. On records of a custom type (GET /entities) these also work: __status, __follow_up, __last_activity, __activity_type, __activity_count, __open_tasks, __created_at, __updated_at.

Example — people in Germany or France who have an email address:

TerminalCode
FILTER=$(node -e 'console.log(Buffer.from(JSON.stringify( {c:"A",g:[{c:"O",g:[{f:"country",o:"eq",v:"Germany"},{f:"country",o:"eq",v:"France"}]}, {f:"email",o:"is_not_empty"}]})).toString("base64url"))') curl -s "$CRM/master/people?filter=$FILTER" -H "Authorization: Bearer $KEY"

A filter that cannot be read is ignored (you get everything), so check the total of the answer when you first build one.

FAQ

How do I filter on more than one value of a column?

Use the filter parameter: a group of conditions as compact JSON, base64url-encoded, with "O" for any and "A" for all.

What happens if my filter cannot be read?

It is ignored and you get everything, so check the answer's total when you first build one.

Is there a simpler way for one column?

Yes — f_<column>=<value>, for example f_country=Germany. Repeat it for more columns.

Last modified on