[POST] .../v1/deal/delete
Soft-deletes a CRM deal. Use this destructive method to soft-delete a CRM deal after confirming that it should no longer appear in normal deal lists or pipeline boards. The method validates the deal and pipeline access, sets dea_deleted to true, unlinks project tasks that point to the deal, writes an action log record, removes the deal-chat link with cleanup, invalidates chat caches and returns row_affected with the deleted deal id. The request body is required and id must be positive; linked clients, leads, tickets, source deals and project tasks are not deleted by this method. The caller must have CRM deal delete permission; missing body, invalid id, missing deal, denied access, pipeline ACL failures, database errors, transaction failures and action-log errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | Int64 | Required | Deal ID. |
Request Example
{
"id": 230
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"row_affected": 1,
"ids": [
230
]
}
}