delete
https://app.fracttal.com/api/tasks_nonscheduled/
Deletes a pending unscheduled task (trigger_description = 'NO_SCHEDULE_TASK') by its id_task_todo, reusing the existing cascade-delete logic.
Required add-onThe company must have the API Advanced add-on enabled. Without it, the endpoint returns
403.
DELETE https://app.fracttal.com/api/tasks_nonscheduled
AuthenticationThis endpoint does not carry an
authobject in the body. Authentication is onlyAuthorization: Bearer <token>; the gateway resolvesid_companyinternally.
Input parameters — Required
Sent in the request body.
| Parameter | Type | Required | Description |
|---|---|---|---|
id_task_todo | integer | Yes | PK of tasks.tasks_todo (the task occurrence, not the master task's id_task). |
user_code | string | Yes | Employee code with an active account and remove permission on Pending Tasks (module 5, submodule 3). |
Input parameters — Optional
None.
Output parameters
| Parameter | Type | Description |
|---|---|---|
success | boolean | true if the deletion was successful. |
message | string | "200" on success; error code/message otherwise. |
total | integer | Number of records deleted (1 on success). |
data | object | { id_task_todo, id_task, description } of the deleted task (or { ERROR: "..." } on failure). |
Errors
| Code | Cause |
|---|---|
400 | id_task_todo is required — not sent or not a valid integer. |
400 | id_task_todo was not found — does not exist for that company. Also occurs when retrying on an already-deleted id (idempotent behavior). |
400 | Only unscheduled tasks can be deleted — trigger_description is different from NO_SCHEDULE_TASK. |
400 | TASK_NO_DELETE_BY_WO_PENDING — the task has an active work order with id_status_work_order < 3. |
400 | user_code does not have permission to delete pending tasks. |
401 | Invalid or missing token (INVALID_TOKEN). |
403 | The company does not have the API Advanced add-on enabled. |
500 | Unhandled internal server error. |
IdempotencyRetrying the
DELETEon an already-deletedid_task_todoreturns400with"id_task_todo was not found"— the same error as a nonexistent ID. This is expected behavior, not a failure.
Example
Request body
{
"id_task_todo": 48408311,
"user_code": "RH-001"
}Response 200
200{
"success": true,
"message": "200",
"data": {
"id_task_todo": 48408311,
"id_task": 20456,
"description": "ALEJANDRO STABILITY TEST"
},
"total": "1"
}Response — error, scheduled task (400)
400){
"success": false,
"message": "400",
"data": { "ERROR": "Only unscheduled tasks can be deleted" },
"total": 0
}Response — retry on already-deleted id (400, idempotency)
400, idempotency){
"success": false,
"message": "400",
"data": { "ERROR": "id_task_todo was not found" },
"total": 0
} 200