LeadFilterDTO
Lead filter request body. Pagination plus optional filters. The channel / UTM
filters (sources, channels, utmSource, utmMedium, utmContent,
utmCampaign, utmTerm) are matched against a single attribution per lead,
selected by attributionOrder.
Page number, 1-based. Min 1.
Possible values: >= 1
11Page size. Min 1, max 100.
Possible values: >= 1 and <= 100
1010orders object
Sort order. Each key is a sort field — see LeadOrderField — and each value a direction.
Keys are applied in the order they appear in the JSON object, so
{"UPDATED_TIMESTAMP": "DESC", "ID": "ASC"} sorts by update time first and
breaks ties by ID. Unless ID is one of the keys, a trailing ID DESC
tie-breaker is appended so paging stays stable across requests.
Omit (or send {}) to keep the default — newest ID first.
Possible values: [ASC, DESC]
Filter by exact lead IDs — for bulk re-sync (optional).
[1001,1002]Filter by pipeline status IDs (optional).
[979]Filter by pipe (funnel) IDs — matches leads whose pipeline status belongs to one of these pipes (optional).
[12]Filter by the lead's balance currency IDs (optional).
[1]Free-text search across lead name and contact name (optional).
OdilFilter by contact phone. The server matches on the last 9 digits (phone.takeLast(9)) against each contact phone's 9-digit suffix, so send digits only (no spaces or symbols). Optional.
901234567Lower bound (inclusive) for the response's createdTimestamp (epoch seconds, optional)
1730419200Upper bound (inclusive) for the response's createdTimestamp (epoch seconds, optional)
1733011200Lower bound (inclusive) for the response's updatedTimestamp (epoch seconds, optional)
1730419200Upper bound (inclusive) for the response's updatedTimestamp (epoch seconds, optional)
1733011200Deprecated alias of createdTimestampFrom. Ignored when createdTimestampFrom is sent.
1730419200Deprecated alias of createdTimestampTo. Ignored when createdTimestampTo is sent.
1733011200When true, soft-deleted leads are returned as well — each one carrying
deleted: true and a deletedTimestamp. Defaults to false (active leads only).
Note that leads whose pipeline or pipeline status was deleted are excluded
regardless of this flag.
falsetruetrue — return only soft-deleted leads. Takes precedence over includeDeleted.
falsefalseFilter by creator employee IDs (optional).
[95]Filter by responsible employee IDs (optional).
[101]Filter by refusal (lost) reason IDs (optional) — only leads whose
reasonsForRefusal is one of these are returned. See
GET /v1/open-api/reason-for-refusal/all for the company's reasons.
An empty array is ignored.
[14]Filter by tag IDs (optional).
[3,7]customFields object[]
Filter by CRM custom field values (optional). Every item is applied as a separate
condition and all of them must match (AND between items); within a single item
values are matched as OR. See CustomFieldFilter.
CRM custom field ID to filter on. Required.
42Field type, decides how the condition is interpreted. Defaults to TEXT.
Possible values: [TEXT, EXTENDED_TEXT, DATE, SELECT, MULTI_SELECT, RADIO, TOGGLE_SWITCH, URL, TAG, LOCATION, COUNTER, ADDRESS, 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.
trueSelects which of a lead's attributions the channel / UTM filters are matched against.
FIRST— the lead's first (earliest) attributionLAST— the lead's most recent attribution
Possible values: [FIRST, LAST]
FIRSTLASTFilter by channel source of the selected attribution (optional).
Possible values: [INSTAGRAM, FACEBOOK, FACEBOOK_FORM, TELEGRAM, TELEGRAM_BUSINESS, TELEGRAM_BOT, WHATSAPP, WABA, VK, VIBER, AVITO, WEBSITE, AMO_CRM, ONLINE_PBX, UTEL, SIPUNI, ASTERISK, MOI_ZVONKI, WEB_FORM, EMPLOYEE, UNKNOWN]
Filter by channel IDs of the selected attribution (optional).
[12]Filter by UTM source of the selected attribution (optional)
instagramFilter by UTM medium of the selected attribution (optional)
cpcFilter by UTM content of the selected attribution (optional)
banner_aFilter by UTM campaign of the selected attribution (optional)
spring_saleFilter by UTM term of the selected attribution (optional)
apartment{
"page": 1,
"size": 10,
"orders": {
"UPDATED_TIMESTAMP": "DESC",
"ID": "ASC"
},
"ids": [
1001,
1002
],
"pipeStatusIds": [
979
],
"pipeIds": [
12
],
"currencyIds": [
1
],
"search": "Odil",
"phone": "901234567",
"createdTimestampFrom": 1730419200,
"createdTimestampTo": 1733011200,
"updatedTimestampFrom": 1730419200,
"updatedTimestampTo": 1733011200,
"includeDeleted": true,
"deletedOnly": false,
"createdByIds": [
95
],
"responsibleByIds": [
101
],
"reasonsForRefusalIds": [
14
],
"tagIds": [
3,
7
],
"customFields": [
{
"customFieldId": 42,
"type": "SELECT",
"values": [
"VIP"
],
"numberStart": 1000,
"numberFinish": 5000,
"currencyId": 24,
"hasValue": true
}
],
"attributionOrder": "LAST",
"sources": [
"INSTAGRAM"
],
"channels": [
12
],
"utmSource": "instagram",
"utmMedium": "cpc",
"utmContent": "banner_a",
"utmCampaign": "spring_sale",
"utmTerm": "apartment"
}