Create a scheduled task by event

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.

ParameterTypeRequiredDescription
item_codeTextYesCode 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_codeTextYesCode of the human resource or third party with a Fracttal user account, which will be registered as the creator of the WO.
tasks_triggers_idIntegerYesID of the event-type trigger (type 4) associated with the plan and the task. You can query it here. Field: id.
id_group_taskIntegerYesID 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_taskIntegerYesID 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_maintenanceDateOptionalDate 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

ParameterTypeDescription
id_task_todoIntegerID of the task in the pending tasks module.
id_taskIntegerID of the created task.
id_itemIntegerInternal ID of the associated asset.
date_maintenanceDateResulting scheduled maintenance date.
trigger_descriptionTextTrigger description. Format: EVENT$event_description.

Error codes

HTTP codeMessageCause
401Unauthorized accessThe auth field is null or invalid.
403Your company does not have the Add-on: API AdvancedThe company does not have the ADVANCED APIS add-on enabled.
404item_code is requiredThe item_code field was not sent or is empty.
404account_code is requiredThe account_code field was not sent or is empty.
404tasks_triggers_id, id_group_task and id_task are requiredOne or more required identification fields were not sent.
404Item does not existThe asset with the specified item_code does not exist or is not type 1, 2, or 3.
404Account with code [account_code] does not exist or does not have any account relatedThe personnel with that code does not exist or does not have a Fracttal user account.
404User does not have a permission group assignedThe user does not have an assigned permission group.
404User does not have permission to add planned tasksThe user does not have add permission for planned tasks: module 5, submodule 3.
404Item is not linked to the maintenance planThe asset is not linked to the specified id_group_task.
404Event trigger does not exist or is not associated to the taskThe tasks_triggers_id is not an event-type trigger (type 4), or it is not associated with the specified plan and task.
404Task does not existThe task with the specified id_task does not exist.
404Task is not configured yetThe task exists but is not configured yet (is_configured ≠ TRUE).
409A pending task already exists for this asset and taskAn 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
}
Response
200
Language
LoadingLoading…