Skip to main content

ContractFilterDTO

Request body for POST /v1/open-api/contract/filter. All fields are optional except pagination; an omitted or empty-array filter matches everything. Deleted contracts are excluded unless includeDeleted/deletedOnly is set.

pageint32

Page number, 1-based (min 1).

Possible values: >= 1

Default value: 1
Example: 1
sizeint32

Page size (min 1, max 100 — higher than most other filters).

Possible values: >= 1 and <= 100

Default value: 15
Example: 15
orders object

Sort order. Each key is a sort field (see ContractOrderField) 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 across requests. Omit (or send {}) to keep the default — newest ID first (ID DESC).

property name*string

Possible values: [ASC, DESC]

searchstring

Free-text match over contract number, pay number, client name and phone.

Example: CNT-2023
idsinteger[]

Exact contract IDs (bulk re-sync).

Example: [1409,1410]
contractNumberstring

Filter by contract number (exact match).

Example: CNT-2023-001
contractTimestampFromint64nullable

Lower bound (inclusive) of the contract date (createdTimestamp), epoch seconds. For day-level filtering, convert the local day boundary to epoch seconds yourself.

Example: 1735668000
contractTimestampToint64nullable

Upper bound (inclusive) of the contract date (createdTimestamp), epoch seconds.

Example: 1767207599
registeredTimestampFromint64nullable

Lower bound (inclusive) of the time the contract was entered into the system — matches the response's registeredTimestamp.

Example: 1735689600
registeredTimestampToint64nullable

Upper bound (inclusive) of the time the contract was entered into the system.

Example: 1767207599
cancelTimestampFromint64nullable

Lower bound (inclusive) of the cancellation time (canceledTimestamp), epoch seconds.

Example: 1735689600
cancelTimestampToint64nullable

Upper bound (inclusive) of the cancellation time.

Example: 1767207599
responsibleByIdsinteger[]

Filter by responsible employee IDs.

Example: [201,202]
createdByIdsinteger[]

Filter by the employee who created the contract.

Example: [95]
clientIdsint64[]

Filter by client IDs.

Example: [5001]
currencyIdsinteger[]

Filter by currency IDs.

Example: [1,2]
statusesContractStatus[]

Filter by contract statuses.

Possible values: [STARTED, ACTIVE, CANCELLED, FINISHED, TRANSFERRED]

Example: ["ACTIVE","STARTED"]
houseIdsinteger[]

Filter by house (project) IDs.

Example: [12]
buildingIdsinteger[]

Filter by building (block) IDs.

Example: [34]
flatIdsinteger[]

Filter by apartment IDs.

Example: [7781]
flatNumberstring

Apartment number — exact match.

Example: 45
formalbooleannullable

true — only formal contracts, false — only informal. null (omit) — don't filter.

Example: true
flatRepairedbooleannullable

Only contracts whose apartment is repaired. null (omit) — don't filter.

Example: true
paymentStatusesContractPaymentStatus[]

Filter by payment status.

Possible values: [PAID, UN_PAID]

Example: ["PAID"]
paymentWaysContractPaymentWays[]

Filter by payment way.

Possible values: [MONTHLY_PAYMENT, PREPAYMENT, BOTH]

Example: ["BOTH"]
discountedbooleannullable

true — only contracts with a discount. null (omit) — don't filter.

Example: true
includeDeletedboolean

true — also include deleted contracts. Default false.

Default value: false
deletedOnlyboolean

true — only deleted contracts; takes priority over includeDeleted. Default false.

Default value: false
customFields object[]

Custom field conditions — see CustomFieldFilter. List entries are AND'ed; a single entry's values are OR'ed (IN). Supersedes the deprecated fields map.

  • 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
  • ]
  • fields objectdeprecated

    Deprecated — use customFields instead. Contract custom field id → value, exact match. All pairs are AND'ed; combines with customFields via AND when both are sent.

    property name*string
    startDatestringdeprecated

    Deprecated — use contractTimestampFrom instead. Lower bound of the contract date (dd.MM.yyyy), converted to the start of the day in the company's timezone. If both are sent, the later of the two lower bounds is used.

    Example: 01.01.2025
    finishDatestringdeprecated

    Deprecated — use contractTimestampTo instead. Upper bound of the contract date (dd.MM.yyyy), converted to the end of the day (23:59:59) in the company's timezone. If both are sent, the earlier of the two upper bounds is used.

    Example: 31.12.2025
    currenciesinteger[]deprecated

    Deprecated — use currencyIds instead. Ignored when currencyIds is also sent.

    Example: [1,2]
    ContractFilterDTO
    {
    "page": 1,
    "size": 15,
    "orders": {
    "CONTRACT_DATE": "DESC",
    "AMOUNT": "ASC"
    },
    "search": "CNT-2023",
    "ids": [
    1409,
    1410
    ],
    "contractNumber": "CNT-2023-001",
    "contractTimestampFrom": 1735668000,
    "contractTimestampTo": 1767207599,
    "registeredTimestampFrom": 1735689600,
    "registeredTimestampTo": 1767207599,
    "cancelTimestampFrom": 1735689600,
    "cancelTimestampTo": 1767207599,
    "responsibleByIds": [
    201,
    202
    ],
    "createdByIds": [
    95
    ],
    "clientIds": [
    5001
    ],
    "currencyIds": [
    1,
    2
    ],
    "statuses": [
    "ACTIVE",
    "STARTED"
    ],
    "houseIds": [
    12
    ],
    "buildingIds": [
    34
    ],
    "flatIds": [
    7781
    ],
    "flatNumber": "45",
    "formal": true,
    "flatRepaired": true,
    "paymentStatuses": [
    "PAID"
    ],
    "paymentWays": [
    "BOTH"
    ],
    "discounted": true,
    "includeDeleted": false,
    "deletedOnly": false,
    "customFields": [
    {
    "customFieldId": 42,
    "type": "SELECT",
    "values": [
    "VIP"
    ],
    "numberStart": 1000,
    "numberFinish": 5000,
    "currencyId": 24,
    "hasValue": true
    }
    ]
    }