MngGetClientsByFilter¶
Returns a paginated client table in the columnar structure + rows + count
form.
The command is available through the manager command API only; there is no REST
path for it. The kind is fixed by the command name, so customer_kind is not
accepted on input. See
Clients and Leads Commands.
It replaces the deprecated MngGetCustomersByFilter. There is no wrong-kind refusal here: the command simply returns clients and nothing else.
Access Control¶
Allowed sessions:
SESSION_MANAGERSESSION_ADMINSESSION_DEALERSESSION_CRM_MANAGERSESSION_CRM_ADMIN
The caller must have CRM access and see_clients. The requested deskFilter is
intersected with the manager desk scope unless the manager has see_all_clients or
admin scope, and brand must match the manager brand when brand scope is set.
contacts: "full" additionally requires see_clients_contacts; without it the request is
refused with 403 rather than downgraded to masked values. A request that
actually reveals contacts is written to the journal as a separate entry.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
deskFilter |
string | Yes | Desk wildcard mask, for example *, DESK_*, DESK_EU*,!DESK_EU_TEST. Must not be empty |
limit |
int | Yes | Maximum rows, from 1 to 50000 |
offset |
int | Yes | Pagination offset, 0 or greater |
contacts |
string | No | masked or full, default masked |
where |
array | No | [[field, operator, value], ...] |
orWhere |
array | No | OR comparison group; at least one condition must match |
whereNot |
array | No | [[field, value], ...] |
whereIn |
array | No | [[field, [values...]], ...] |
whereNotIn |
array | No | [[field, [values...]], ...] |
whereBetween |
array | No | [[field, [from, to]], ...] |
whereNotBetween |
array | No | [[field, [from, to]], ...] |
orderBy |
array | No | Example: [["created_time", "desc"]] |
Filter fields and operators are the same as for the customer table, including the
lifecycle_flags operators has_all, has_any, and has_none. Common filter
semantics are described in Table filter syntax; desk masks in
Desks TCP API.
Request¶
{
"command": "MngGetClientsByFilter",
"extID": "1",
"data": {
"deskFilter": "DESK_*",
"limit": 50,
"offset": 0,
"where": [
["country_of_residence", "=", "CY"]
],
"orderBy": [
["created_time", "desc"]
]
}
}
Response Data¶
structure lists the column names and every row is a flat array of values in
that same order. The columns are those of the customer table, described in
Customer Fields. Read values positionally against
structure rather than by a fixed index.
The customer-table schema appends avatar after address_of_residence, then
last_online_time after avatar; earlier column positions are unchanged. See MngGetCustomersByFilter
for the full ordered customer-table structure.
{
"structure": [
"customer_id",
"external_id",
"type",
"status",
"enable",
"enable_otp",
"deposit_allowed",
"withdrawal_allowed",
"first_name",
"last_name",
"middle_name",
"full_name",
"birth_date",
"citizenship",
"country_of_residence",
"email",
"phone",
"preferred_language",
"timezone",
"brand",
"desk",
"manager_id",
"lead_source",
"campaign",
"affiliate_id",
"introducer_id",
"source_type",
"landing_url",
"referrer_url",
"utm_source",
"utm_medium",
"utm_campaign",
"utm_content",
"utm_term",
"import_batch_id",
"old_id",
"assigned_manager_id",
"crm_stage",
"segment",
"tags_json",
"email_verified",
"phone_verified",
"marketing_allowed",
"tax_id",
"national_id",
"pep_status",
"sanctions_status",
"risk_level",
"aml_status",
"kyc_status",
"sales_status",
"risk_status",
"finance_status",
"kyc_updated_time",
"aml_updated_time",
"last_contact_time",
"first_contact_time",
"next_contact_time",
"conversion_time",
"last_login_time",
"archive_time",
"created_time",
"updated_time",
"created_by",
"updated_by",
"meta_json",
"lifecycle_flags",
"customer_kind",
"conversion_flags",
"created_by_import",
"address_of_residence",
"avatar",
"last_online_time"
],
"rows": [
[
1,
"",
0,
0,
1,
0,
1,
1,
"John",
"Smith",
"",
"John Smith",
0,
"",
"",
0,
"",
"",
"",
"",
"",
"",
"",
"",
"",
"cl***@example.com",
"+35***000",
"",
"",
"default",
0,
10,
"",
"",
"",
"",
10,
"qualified",
"",
"",
0,
0,
0,
0,
"",
"",
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1777700000,
1777700000,
10,
10,
"",
5,
1,
1,
0,
"",
"8e68414e-0e3f-48dd-b7b8-f5be9e26d4f7.svg",
1777690000
]
],
"count": 1
}
| Field | Type | Description |
|---|---|---|
structure |
array | Ordered column names |
rows |
array | One nested array per record, values in structure order |
count |
int | Total number of matching records before pagination |
count Matches the Page¶
The kind is selected before count is calculated and before the page is cut, so
count describes clients only and a page never arrives short. A client does not
have to filter the returned rows by kind afterwards.
Errors¶
| HTTP | Error | Description |
|---|---|---|
400 |
INVALID_DATA |
Request validation failed |
403 |
RET_NOT_ENOUGH_RIGHTS |
Missing permission, missing scope, or the record is outside the caller's visibility |
404 |
RET_NOT_FOUND |
No customer with that identifier exists |
Every error carries a message field with free-form text. Its contents are not
part of the contract; branch on error.