Методы для управления сделками организации.
Возвращает список сделок с пагинацией и фильтрацией.
{
"status": true,
"message": "Deals retrieved successfully",
"data": {
"deals": [
{
"id": "k00e8400-e29b-41d4-a716-446655440160",
"comment": "Срочная продажа",
"type_id": "i00e8400-e29b-41d4-a716-446655440140",
"created_at": "2026-06-14T12:00:00Z",
"updated_at": "2026-06-14T12:00:00Z",
"client_id": "d00e8400-e29b-41d4-a716-446655440090",
"client": { ... },
"employees": [],
"status": {
"id": "j00e8400-e29b-41d4-a716-446655440150",
"name": "Новый",
"color": "#2196F3"
},
"type": {
"id": "i00e8400-e29b-41d4-a716-446655440140",
"name": "Продажа"
}
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 20,
"pages": 1
}
},
"meta": {
"timestamp": "2026-06-14T12:00:00Z",
"request_id": "...",
"path": "/api/v1/companies/.../modules/dm/deals",
"method": "GET"
}
}Создаёт новую сделку.
{
"status": true,
"message": "Deal created successfully",
"data": {
"id": "k00e8400-e29b-41d4-a716-446655440161",
"comment": null,
"type_id": null,
"created_at": "2026-06-14T12:05:00Z",
"updated_at": "2026-06-14T12:05:00Z",
"client_id": null,
"client": null,
"employees": [],
"status": null,
"type": null
},
"meta": {
"timestamp": "2026-06-14T12:05:00Z",
"request_id": "...",
"path": "/api/v1/companies/.../modules/dm/deals",
"method": "POST"
}
}