[POST] .../v1/deal/get
Returns CRM deals with pagination and filters. Use this method to retrieve active CRM deals for pipeline boards, sales workspaces, client history, linked tasks, lead conversion review and reporting. The response returns paged Deal records with next_offset and total, including client data, linked task, source lead/ticket/deal references, deal type, pipeline and stage ids, title, amount, currency, responsible user, participants, open and close dates, custom fields, chat id and description mentions when include_mentions is true. The request body is required and supports filters, limit, offset, include_mentions and body filters such as ids, client_ids, task_ids, lead_ids, responsible_user_ids, stage_ids, pipeline_id, currency_id, date bounds and statuses. The caller must have CRM deal select permission and pipeline ACL restrictions are applied unless the user has CRM manage-all access; missing body, denied access, invalid filters, disabled additional fields, database errors and ACL failures are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| filters | Array of Filter | Optional | Optional filters by fields available for this API method. |
| include_mentions | Boolean | Optional | Return description_mentions for the deal description. |
| limit | Int32 | Optional | Requested item count. Non-positive values use the default page size. |
| offset | Int32 | Optional | Result set offset. If the value is less than 0, 0 is used. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| amount | decimal | |
| client_id | int | Filter by linked client IDs. |
| close_date | int | |
| currency_id | int | Filter by deal currency ID. |
| deal_type_id | int | |
| from_date | int | Lower open_date bound as Unix time in seconds. |
| id | int | Filter by deal IDs. |
| lead_id | int | Filter by linked lead IDs. |
| open_date | int | |
| pipeline_id | int | Filter by pipeline ID. |
| responsible_user_id | int | Filter by responsible user IDs. |
| stage_id | int | Filter by stage IDs. |
| status | string | |
| statuses | string | Filter by internal enum status. Hidden from JSON. |
| task_id | int | Filter by linked project task IDs. |
| title | string | |
| to_date | int | Upper open_date bound as Unix time in seconds. |
Request Example
{
"filters": [
{
"Field": "pipeline_id",
"Operator": "Equal",
"Value": "8"
},
{
"Field": "title",
"Operator": "Like",
"Value": "wholesale"
}
],
"include_mentions": true,
"limit": 50,
"offset": 0
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| next_offset | Int32 | Offset for the next data page. |
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Array of Deal | Result array. |
| total | Int64 | Total number of result items. |
Response Example
{
"ok": true,
"result": [
{
"id": 230,
"client_id": 501,
"client": {
"id": 501,
"name": "Ivan Petrov",
"phone": "\u002B998901234567",
"email": "ivan.petrov@example.com",
"fields": []
},
"task_id": 770,
"lead_id": 105,
"ticket_id": null,
"source_deal_id": null,
"deal_type_id": 3,
"pipeline_id": 8,
"stage_id": 33,
"title": "Website wholesale deal",
"description": "Potential wholesale order after website request",
"description_mentions": [],
"amount": 2800.00,
"currency": {
"id": 1,
"code_num": 860,
"code_chr": "UZS",
"name": "Uzbek sum",
"exchange_rate": 1.0,
"is_base": true,
"deleted": false,
"last_update": 1773138400
},
"responsible_user_id": 31,
"participant_user_ids": [
18,
31
],
"open_date": 1773138600,
"close_date": null,
"fields": [],
"created_user_id": 1,
"last_update": 1773138700,
"chat_id": "b8121f70-21d2-4a1b-9427-5e78a7c47007"
}
],
"next_offset": 0,
"total": 1
}