CustomFieldFilter
A single condition on one CRM custom field, used inside LeadFilterDTO.customFields.
customFieldId identifies the field (see GET /v1/open-api/lead/field for the
company's fields); type tells the server how to interpret the condition.
Which keys apply depends on the mode:
hasValueis checked first and overrides everything else.true→ only leads that have any value for this field;false→ only leads that have no value for it. WhenhasValueis sent,values,numberStart,numberFinishandcurrencyIdare ignored.type: NUMBER(andhasValueomitted) → matches the numeric rangenumberStart … numberFinish(inclusive), optionally narrowed tocurrencyId.type: ADDRESS(andhasValueomitted) → each entry invaluesis matched against the lead's address written as comma-separated Uzbek names, from the most specific to the least:"district,city,country","city,country"or"country". Only address values stored withvalueType: DISTRICTare matched.- any other
type→ plain equality: the lead matches when the field value equals one ofvalues. For multi-select fields it is enough that one of the selected values matches.
CRM custom field ID to filter on. Required.
42Field type, decides how the condition is interpreted. Defaults to TEXT.
Possible values: [TEXT, DATE, SELECT, MULTI_SELECT, URL, TOGGLE_SWITCH, RADIO, LOCATION, COUNTER, ADDRESS, EXTENDED_TEXT, EMPLOYEE, FILE, NUMBER]
TEXTSELECTValues to match (OR between them). Used for every type except NUMBER, and
ignored when hasValue is sent. For ADDRESS send comma-separated Uzbek
place names (see the description above).
["VIP"]Lower bound for NUMBER fields (inclusive). Defaults to 0 when omitted.
1000Upper bound for NUMBER fields (inclusive). Unbounded when omitted.
5000Restrict a NUMBER condition to one currency (optional). When omitted, any currency matches.
24Presence check. true → the lead has any value for this field, false → it has
none. Overrides values / numberStart / numberFinish / currencyId.
true{
"customFieldId": 42,
"type": "SELECT",
"values": [
"VIP"
],
"numberStart": 1000,
"numberFinish": 5000,
"currencyId": 24,
"hasValue": true
}