Skip to main content

LeadTaskFilterDTO

Lead task filter request body. Every field is optional — an empty body {} returns the first page, newest ID first. All fields combine with AND; within one ...Ids/statuses array, values combine with OR.

pageint32

Page number, 1-based. Min 1.

Possible values: >= 1

Default value: 1
Example: 1
sizeint32

Page size. Min 1, max 100.

Possible values: >= 1 and <= 100

Default value: 15
Example: 15
orders object

Sort order. Each key is a sort field (see LeadTaskOrderField) and each value a direction. Keys are applied in the order they appear in the JSON object. Unless ID is one of the keys, a trailing ID DESC tie-breaker is appended so paging stays stable. Omit (or send {}) to keep the default — newest ID first.

property name*string

Possible values: [ASC, DESC]

searchstringnullable

Partial, case-insensitive match against the task text or close note.

Example: qo'ng'iroq
idsint64[]

Exact task IDs (bulk resync).

Example: [501,502]
leadIdsint64[]

Lead IDs — a task belonging to any of these leads matches.

Example: [34606]
leadTaskTypeIdsint64[]

Task type IDs — see GET /v1/open-api/lead-task/types.

Example: [7]
assignedByIdsint32[]

Assignee employee IDs.

Example: [95]
createdByIdsint32[]

IDs of the employee who created the task.

Example: [3]
closedByIdsint32[]

IDs of the employee who closed the task.

Example: [95]
statusesLeadTaskStatus[]

Filter by statuses. If omitted or empty, all statuses are returned.

Possible values: [OPEN, SUCCESS, FAILED, DELETED]

Example: ["OPEN","SUCCESS"]
deadlineStartFromint64nullable

Lower bound for deadlineStartTimestamp (epoch seconds, inclusive).

Example: 1730419200
deadlineStartToint64nullable

Upper bound for deadlineStartTimestamp (epoch seconds, inclusive).

Example: 1733011200
deadlineFinishFromint64nullable

Lower bound for deadlineFinishTimestamp (epoch seconds, inclusive).

Example: 1730419200
deadlineFinishToint64nullable

Upper bound for deadlineFinishTimestamp (epoch seconds, inclusive).

Example: 1733011200
createdTimestampFromint64nullable

Lower bound for createdTimestamp (epoch seconds, inclusive).

Example: 1733011200
createdTimestampToint64nullable

Upper bound for createdTimestamp (epoch seconds, inclusive).

closedTimestampFromint64nullable

Lower bound for closedTimestamp (epoch seconds, inclusive).

closedTimestampToint64nullable

Upper bound for closedTimestamp (epoch seconds, inclusive).

includeDeletedboolean

Also return deleted tasks.

Default value: false
deletedOnlyboolean

Return only deleted tasks. Takes precedence over includeDeleted.

Default value: false
customFields object[]

Custom field conditions — see CustomFieldFilter. Elements combine with AND; one element's values combine with OR.

  • Array [
  • customFieldIdint64required

    CRM custom field ID to filter on. Required.

    Example: 42
    typeCustomFieldType

    Field 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]

    Default value: TEXT
    Example: SELECT
    valuesstring[]

    Values 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).

    Example: ["VIP"]
    numberStartnumber

    Lower bound for NUMBER fields (inclusive). Defaults to 0 when omitted.

    Example: 1000
    numberFinishnumber

    Upper bound for NUMBER fields (inclusive). Unbounded when omitted.

    Example: 5000
    currencyIdint64

    Restrict a NUMBER condition to one currency (optional). When omitted, any currency matches.

    Example: 24
    hasValueboolean

    Presence check. true → the lead has any value for this field, false → it has none. Overrides values / numberStart / numberFinish / currencyId.

    Example: true
  • ]
  • leadIdint64nullabledeprecated

    Deprecated — use leadIds instead.

    Example: 34606
    assignedByIdint32nullabledeprecated

    Deprecated — use assignedByIds instead.

    Example: 95
    deadlineStartint64nullabledeprecated

    Deprecated — use deadlineStartFrom instead.

    deadlineFinishint64nullabledeprecated

    Deprecated — use deadlineFinishTo instead.

    statusLeadTaskStatus[]deprecated

    Deprecated — use statuses instead.

    Possible values: [OPEN, SUCCESS, FAILED, DELETED]

    fields objectdeprecated

    Deprecated — use customFields instead. Custom field ID → value, exact equality; all pairs AND.

    property name*string
    LeadTaskFilterDTO
    {
    "page": 1,
    "size": 15,
    "orders": {
    "DEADLINE_FINISH": "ASC"
    },
    "search": "qo'ng'iroq",
    "ids": [
    501,
    502
    ],
    "leadIds": [
    34606
    ],
    "leadTaskTypeIds": [
    7
    ],
    "assignedByIds": [
    95
    ],
    "createdByIds": [
    3
    ],
    "closedByIds": [
    95
    ],
    "statuses": [
    "OPEN",
    "SUCCESS"
    ],
    "deadlineStartFrom": 1730419200,
    "deadlineStartTo": 1733011200,
    "deadlineFinishFrom": 1730419200,
    "deadlineFinishTo": 1733011200,
    "createdTimestampFrom": 1733011200,
    "createdTimestampTo": 0,
    "closedTimestampFrom": 0,
    "closedTimestampTo": 0,
    "includeDeleted": false,
    "deletedOnly": false,
    "customFields": [
    {
    "customFieldId": 42,
    "type": "SELECT",
    "values": [
    "VIP"
    ],
    "numberStart": 1000,
    "numberFinish": 5000,
    "currencyId": 24,
    "hasValue": true
    }
    ]
    }