put
https://app.fracttal.com/api/work_order_cancel/
Cancel a work order using standard cancellation, next iteration, or rescheduling into a new WO.
Through this API, you can cancel a Work Order. It supports three cancellation types: standard, move to the next iteration, and reschedule in a new WO.
This web service is part of the ADVANCED APIS add-on.
:folio = Folio number or WO number to cancel.
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
folio | Text | Yes* | WO code. |
user_code | Text | Yes | Code of the human resource that will update the WO in Fracttal. |
work_orders_status_cancel | Text | Yes | Cancellation reason. |
note | Text | Yes | Note indicating why the WO is being canceled. |
id_work_order | Number | No* | WO ID. This ID is optional; it is only required when the folio is not specified. |
cancellation_type | Number | No (default: 1) | Cancellation type. 1 = Cancel WO, 2 = Cancel and move to the next iteration, 3 = Cancel and reschedule in a new WO. |
id_reschedule_cause | Number | Conditional† | Rescheduling reason ID. Required when cancellation_type is 2 or 3. |
reschedule_note | Text | No | Rescheduling note. Applies to cancellation_type 2 or 3. |
id_assigned_user | Number | Conditional† | ID of the person responsible for the new WO. Required when cancellation_type is 3. |
tasks | Array | No | List of tasks to include in the advanced cancellation. Applies to cancellation_type 2 or 3. See the structure in the Tasks section. |
utc_min | Number | No | UTC offset in minutes. |
type_user | Text | No | User type. Default value: HUMAN_RESOURCES. |
reschedule_cause | Text | No | Text description of the rescheduling reason from the auxiliary catalog. Precedence rule when reschedule_cause and id_reschedule_cause are sent simultaneously. |
folioandid_work_orderare mutually exclusive; at least one must be sent.
† Conditional: required depending on the value of cancellation_type. See the behavior table.
Tasks
Structure of each object inside the tasks array:
| Parameter | Type | Description |
|---|---|---|
id_task | Number | Task ID. |
id_item | Number | ID of the asset associated with the task. |
date_maintenance | Date | Task maintenance date. |
Cancellation Types
| cancellation_type | Behavior |
|---|---|
1 (default) | Cancels the WO. Tasks keep their current schedule. Backward-compatible behavior; equivalent to omitting the parameter. |
2 | Cancels the WO and reschedules the tasks to the next iteration. Tasks planned by date trigger advance their calculated and scheduled date. Unplanned tasks keep the same dates. Requires id_reschedule_cause. |
3 | Cancels the WO and creates a new WO with the same task. Requires id_reschedule_cause and id_responsible. |
Output Parameters
| Parameter | Type | Description |
|---|---|---|
id | Number | Task ID in the work order |
id_group_task | Number | ID of the task plan where the task from which information will be obtained is located |
id_request | Number | Request ID, if the task comes from a request |
id_item_log | Number | ID of the item log associated with the task |
id_task_log | Number | Internal ID of the task log |
id_tasks_todo | Number | Internal ID of pending tasks |
id_task_trigger | Number | Internal ID of the task trigger |
id_task | Number | ID of the task from which information will be obtained to create the WO |
id_item | Number | Asset ID |
id_items_availability | Number | Out-of-service record ID |
items_log_description | Text | Asset description |
task_description | Text | Task description |
Example
Standard cancellation — cancellation_type omitted (backward compatible)
cancellation_type omitted (backward compatible)Request: (PUT)https://app.fracttal.com/api/work_order_cancel?folio=OT-1896
{
"user_code": "AQOP1521",
"work_orders_status_cancel": "Error in WO generation",
"note": "Duplicate WO"
}{
"success": true,
"message": "200",
"data": {
"id": 16954494,
"id_group_task": null,
"id_request": null,
"id_item_log": 3696049,
"id_task_log": 5683844,
"id_tasks_todo": 16740135,
"id_task_trigger": null,
"id_task": 5911238,
"id_item": 1,
"id_items_availability": null,
"items_log_description": "{ CORP-256 } MANUFACTURING SECTOR COMPANY INTERNATIONAL AVENUE ",
"task_description": "Duplicate WO"
},
"total": 1
}Cancel and move to the next iteration — cancellation_type: 2
cancellation_type: 2Request: (PUT)https://app.fracttal.com/api/work_order_cancel?folio=OT-1896
{
"user_code": "AQOP1521",
"work_orders_status_cancel": "Maintenance rescheduled",
"note": "Rescheduled to the next iteration according to frequency",
"cancellation_type": 2,
"id_reschedule_cause": 5,
"reschedule_note": "Equipment not available on the scheduled date",
"tasks": [
{
"id_task": 5911238,
"id_item": 1
}
]
}{
"success": true,
"message": "200",
"data": [
{
"id": 16954495,
"id_group_task": null,
"id_request": null,
"id_item_log": 3696050,
"id_task_log": 5683845,
"id_tasks_todo": 16740136,
"id_task_trigger": null,
"id_task": 5911238,
"id_item": 1,
"id_items_availability": null,
"items_log_description": "{ CORP-256 } EMPRESA SECTOR MANUFACTURA AVDA INTERNACIONAL ",
"task_description": "Maintenance rescheduled"
}
],
"total": 1
}Cancel and reschedule in a new WO — cancellation_type: 3
cancellation_type: 3Request: (PUT)https://app.fracttal.com/api/work_order_cancel?folio=OT-1896
{
"user_code": "AQOP1521",
"work_orders_status_cancel": "OT requiere reprogramación",
"note": "Se genera nueva OT con la misma tarea",
"cancellation_type": 3,
"id_reschedule_cause": 5,
"reschedule_note": "Nueva fecha acordada con cliente",
"type_user": "HUMNA_RESOURCES",
"id_assigned_user": 1234,
"tasks": [
{
"id_task": 5911238,
"id_item": 1,
"data_maintenance": "2026-08-10T18:00:00-05:00"
}
]
}{
"success": true,
"message": "200",
"data": {
"work_order_id": 16954496,
"cancellation_type": 3,
"new_work_order": {
"id":123,
"wo_folio":"WO-123",
"id_status_work_order":0
}
},
"total": 1
} 200