post
https://app.fracttal.com/api/tasks_scheduled/
Create a scheduled task from an event configured in an active maintenance plan.
Use this API to create a scheduled task from an event configured in an active maintenance plan.
- This web service is part of the ADVANCED APIS add-on.
- To get the information related to the trigger and the task, you must consult the Query task plans web service.
Input parameters
Send the following information in the request body.
| Parameter | Type | Required | Description |
|---|---|---|---|
item_code | Text | Yes | Code of the asset for which the WO will be created. The asset must be type 1, 2, or 3. You can query it here. Field: code. |
account_code | Text | Yes | Code of the human resource or third party with a Fracttal user account, which will be registered as the creator of the WO. |
tasks_triggers_id | Integer | Yes | ID of the event-type trigger (type 4) associated with the plan and the task. You can query it here. Field: id. |
id_group_task | Integer | Yes | ID of the maintenance plan to which the task belongs. The asset must be linked to this plan. You can query it here. Field: id. |
id_task | Integer | Yes | ID of the configured task (is_configured = TRUE) from which the information will be obtained to create the WO. You can query it here. Field: id. |
date_maintenance | Date | Optional | Date on which the task must be performed. By default, the current date is used. Format: YYYY-MM-DDTHH:MM:SS-UTC. Example: 2026-12-01T08:00:00-05:00. |
Output parameters
| Parameter | Type | Description |
|---|---|---|
id_task_todo | Integer | ID of the task in the pending tasks module. |
id_task | Integer | ID of the created task. |
id_item | Integer | Internal ID of the associated asset. |
date_maintenance | Date | Resulting scheduled maintenance date. |
trigger_description | Text | Trigger description. Format: EVENT$event_description. |
Error codes
| HTTP code | Message | Cause |
|---|---|---|
| 401 | Unauthorized access | The auth field is null or invalid. |
| 403 | Your company does not have the Add-on: API Advanced | The company does not have the ADVANCED APIS add-on enabled. |
| 404 | item_code is required | The item_code field was not sent or is empty. |
| 404 | account_code is required | The account_code field was not sent or is empty. |
| 404 | tasks_triggers_id, id_group_task and id_task are required | One or more required identification fields were not sent. |
| 404 | Item does not exist | The asset with the specified item_code does not exist or is not type 1, 2, or 3. |
| 404 | Account with code [account_code] does not exist or does not have any account related | The personnel with that code does not exist or does not have a Fracttal user account. |
| 404 | User does not have a permission group assigned | The user does not have an assigned permission group. |
| 404 | User does not have permission to add planned tasks | The user does not have add permission for planned tasks: module 5, submodule 3. |
| 404 | Item is not linked to the maintenance plan | The asset is not linked to the specified id_group_task. |
| 404 | Event trigger does not exist or is not associated to the task | The tasks_triggers_id is not an event-type trigger (type 4), or it is not associated with the specified plan and task. |
| 404 | Task does not exist | The task with the specified id_task does not exist. |
| 404 | Task is not configured yet | The task exists but is not configured yet (is_configured ≠ TRUE). |
| 409 | A pending task already exists for this asset and task | An active pending task already exists for this asset and task. Duplicates are not created. |
Example
Request: (POST) https://app.fracttal.com/api_new/tasks_scheduled
{
"item_code": "QFCP-001",
"account_code": "25198772-2",
"tasks_triggers_id": 27,
"id_group_task": 1,
"id_task": 86,
"date_maintenance": "2026-12-01T08:00:00-05:00"
}{
"success": true,
"message": "200",
"data": {
"id_task_todo": 1600093,
"id_task": 264276,
"id_item": 500,
"date_maintenance": "2026-12-01T08:00:00-05:00",
"trigger_description": "EVENT$COMPRESOR DAÑADO"
},
"total": 1
} 200