метод REST scope: task

tasks.task.approve

Принять задачу

Кто может выполнять: постановщик задачи или администратор

Описание

Метод tasks.task.approve принимает работу исполнителя по задаче при включенном контроле задачи и переводит задачу в статус Завершена.

Проверить право принять работу исполнителя по задаче можно методом проверки доступа к задаче.

Параметры

taskId integer обязательный

Идентификатор задачи.

Идентификатор задачи можно получить при создании новой задачи или методом получения списка задач

Примеры запроса

curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"taskId":8017}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/tasks.task.approve

Ответ

HTTP-статус: 200

{
    "result": {
        "task": {
            "id": "8017",
            "parentId": null,
            "title": "Пример задачи",
            "description": "Описание задачи с [B]форматированием[/B]",
            "mark": "P",
            "priority": "2",
            "multitask": "N",
            "notViewed": "N",
            "replicate": "Y",
            "stageId": "397",
            "sprintId": null,
            "backlogId": null,
            "createdBy": "503",
            "createdDate": "2025-06-04T16:15:55+03:00",
            "responsibleId": "547",
            "changedBy": "503",
            "changedDate": "2025-09-18T12:36:11+03:00",
            "statusChangedBy": "503",
            "closedBy": "503",
            "closedDate": "2025-09-18T12:36:11+03:00",
            "activityDate": "2025-09-18T12:36:11+03:00",
            "dateStart": "2025-09-10T15:22:12+03:00",
            "deadline": "2025-09-11T08:00:00+03:00",
            "startDatePlan": null,
            "endDatePlan": null,
            "guid": "{21e7b78d-498e-4c84-a896-2dbeb26861b8}",
            "xmlId": null,
            "commentsCount": "62",
            "serviceCommentsCount": "44",
            "allowChangeDeadline": "Y",
            "allowTimeTracking": "Y",
            "taskControl": "Y",
            "addInReport": "N",
            "forkedByTemplateId": null,
            "timeEstimate": "101580",
            "timeSpentInLogs": "69963",
            "matchWorkTime": "Y",
            "forumTopicId": "1273",
            "forumId": "11",
            "siteId": "s1",
            "subordinate": "Y",
            "exchangeModified": null,
            "exchangeId": null,
            "outlookVersion": "87",
            "viewedDate": "2025-09-18T12:35:22+03:00",
            "sorting": null,
            "durationFact": "1166",
            "isMuted": "N",
            "isPinned": "N",
            "isPinnedInGroup": "N",
            "flowId": null,
            "descriptionInBbcode": "Y",
            "status": "5",
            "statusChangedDate": "2025-09-18T12:36:11+03:00",
            "durationPlan": "0",
            "durationType": "days",
            "favorite": "Y",
            "groupId": "129",
            "auditors": [
                "103",
                "503"
            ],
            "accomplices": [],
            "checklist": {
                "433": {
                    "id": "433",
                    "taskId": "8017",
                    "createdBy": "503",
                    "parentId": "431",
                    "title": "Первый",
                    "sortIndex": "0",
                    "isComplete": "N",
                    "isImportant": "N",
                    "toggledBy": null,
                    "toggledDate": null,
                    "ufChecklistFiles": false,
                    "members": [],
                    "attachments": [],
                    "entityId": "8017",
                    "action": {
                        "modify": true,
                        "remove": true,
                        "toggle": true,
                        "add": true,
                        "addAccomplice": true
                    }
                },
                "431": {
                    "id": "431",
                    "taskId": "8017",
                    "createdBy": "503",
                    "parentId": 0,
                    "title": "Чек-лист 1",
                    "sortIndex": "0",
                    "isComplete": "N",
                    "isImportant": "N",
                    "toggledBy": null,
                    "toggledDate": null,
                    "ufChecklistFiles": false,
                    "members": [],
                    "attachments": [],
                    "entityId": "8017",
                    "action": {
                        "modify": true,
                        "remove": true,
                        "toggle": true,
                        "add": true,
                        "addAccomplice": true
                    }
                },
                "435": {
                    "id": "435",
                    "taskId": "8017",
                    "createdBy": "503",
                    "parentId": "431",
                    "title": "Второй",
                    "sortIndex": "1",
                    "isComplete": "N",
                    "isImportant": "N",
                    "toggledBy": null,
                    "toggledDate": null,
                    "ufChecklistFiles": false,
                    "members": [],
                    "attachments": [],
                    "entityId": "8017",
                    "action": {
                        "modify": true,
                        "remove": true,
                        "toggle": true,
                        "add": true,
                        "addAccomplice": true
                    }
                }
            },
            "group": {
                "id": "129",
                "name": "Новый поток",
                "opened": false,
                "membersCount": 1,
                "image": "/bitrix/images/socialnetwork/workgroup/folder.png",
                "additionalData": []
            },
            "creator": {
                "id": "503",
                "name": "Мария Иванова",
                "link": "/company/personal/user/503/",
                "icon": "https://mysite.ru/b17053/resize_cache/45749/c0120a8d7c10d63c83e32398d1ec4d9e/main/c89/c89c6b7301880958ea704b5a8470635c/4R5A1256.png",
                "workPosition": "Администратор"
            },
            "responsible": {
                "id": "547",
                "name": "Мария",
                "link": "/company/personal/user/547/",
                "icon": "/bitrix/images/tasks/default_avatar.png",
                "workPosition": "Тестировщик"
            },
            "accomplicesData": [],
            "auditorsData": {
                "103": {
                    "id": "103",
                    "name": "Светлана Иванова",
                    "link": "/company/personal/user/103/",
                    "icon": "https://mysite.ru/b17053/resize_cache/8644/c0120a8d7c10d63c83e32398d1ec4d9e/main/45f/45fff10d17d398a5583184c8350cd197/buh.jpg",
                    "workPosition": "Бухгалтер"
                },
                "503": {
                    "id": "503",
                    "name": "Мария Иванова",
                    "link": "/company/personal/user/503/",
                    "icon": "https://mysite.ru/b17053/resize_cache/45749/c0120a8d7c10d63c83e32398d1ec4d9e/main/c89/c89c6b7301880958ea704b5a8470635c/4R5A1256.png",
                    "workPosition": "Администратор"
                }
            },
            "newCommentsCount": 2,
            "action": {
                "accept": false,
                "decline": false,
                "complete": false,
                "approve": false,
                "disapprove": false,
                "start": false,
                "pause": false,
                "delegate": false,
                "remove": true,
                "edit": true,
                "defer": false,
                "renew": true,
                "create": true,
                "changeDeadline": true,
                "checklistAddItems": true,
                "addFavorite": false,
                "deleteFavorite": true,
                "rate": true,
                "take": false,
                "edit.originator": false,
                "checklist.reorder": true,
                "elapsedtime.add": true,
                "dayplan.timer.toggle": false,
                "edit.plan": true,
                "checklist.add": true,
                "favorite.add": false,
                "favorite.delete": true
            },
            "checkListTree": {
                "nodeId": 0,
                "fields": {
                    "id": null,
                    "copiedId": null,
                    "entityId": null,
                    "userId": 503,
                    "createdBy": null,
                    "parentId": null,
                    "title": "",
                    "sortIndex": null,
                    "displaySortIndex": "",
                    "isComplete": false,
                    "isImportant": false,
                    "completedCount": 0,
                    "members": [],
                    "attachments": [],
                    "nodeId": null
                },
                "action": [],
                "descendants": [
                    {
                        "nodeId": 1,
                        "fields": {
                            "id": 431,
                            "copiedId": null,
                            "entityId": 8017,
                            "userId": 503,
                            "createdBy": 503,
                            "parentId": 0,
                            "title": "Чек-лист 1",
                            "sortIndex": 0,
                            "displaySortIndex": "",
                            "isComplete": false,
                            "isImportant": false,
                            "completedCount": 0,
                            "members": [],
                            "attachments": [],
                            "nodeId": null
                        },
                        "action": {
                            "modify": true,
                            "remove": true,
                            "toggle": true,
                            "add": true,
                            "addAccomplice": true
                        },
                        "descendants": [
                            {
                                "nodeId": 2,
                                "fields": {
                                    "id": 433,
                                    "copiedId": null,
                                    "entityId": 8017,
                                    "userId": 503,
                                    "createdBy": 503,
                                    "parentId": 431,
                                    "title": "Первый",
                                    "sortIndex": 0,
                                    "displaySortIndex": "1",
                                    "isComplete": false,
                                    "isImportant": false,
                                    "completedCount": 0,
                                    "members": [],
                                    "attachments": [],
                                    "nodeId": null
                                },
                                "action": {
                                    "modify": true,
                                    "remove": true,
                                    "toggle": true,
                                    "add": true,
                                    "addAccomplice": true
                                },
                                "descendants": []
                            },
                            {
                                "nodeId": 3,
                                "fields": {
                                    "id": 435,
                                    "copiedId": null,
                                    "entityId": 8017,
                                    "userId": 503,
                                    "createdBy": 503,
                                    "parentId": 431,
                                    "title": "Второй",
                                    "sortIndex": 1,
                                    "displaySortIndex": "2",
                                    "isComplete": false,
                                    "isImportant": false,
                                    "completedCount": 0,
                                    "members": [],
                                    "attachments": [],
                                    "nodeId": null
                                },
                                "action": {
                                    "modify": true,
                                    "remove": true,
                                    "toggle": true,
                                    "add": true,
                                    "addAccomplice": true
                                },
                                "descendants": []
                            }
                        ]
                    }
                ]
            },
            "checkListCanAdd": true
        },
        "time": {
            "start": 1758188171.142611,
            "finish": 1758188172.101309,
            "duration": 0.958698034286499,
            "processing": 0.9341180324554443,
            "date_start": "2025-09-18T12:36:11+03:00",
            "date_finish": "2025-09-18T12:36:12+03:00",
            "operating_reset_at": 1758188771,
            "operating": 0.9340989589691162
        }
    }
}

Возвращаемые данные

result object

Объект с данными ответа

task object

Объект с описанием задачи после выполнения операции

time time

Информация о времени выполнения запроса

Обработка ошибок

HTTP-статус: 400

{
    "error":"1048582",
    "error_description":"Действие над задачей не разрешено"
}
Код Описание Значение
0 wrong task id В параметре taskId указано значение неверного типа
1048582 Действие над задачей не разрешено У пользователя нет прав принятие работы по задаче
100 CTaskItem All parameters in the constructor must have real class type Не указан обязательный параметр taskId

Что будем искать? Например,Продвижение