Cancel a work order

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

ParameterTypeRequiredDescription
folioTextYes*WO code.
user_codeTextYesCode of the human resource that will update the WO in Fracttal.
work_orders_status_cancelTextYesCancellation reason.
noteTextYesNote indicating why the WO is being canceled.
id_work_orderNumberNo*WO ID. This ID is optional; it is only required when the folio is not specified.
cancellation_typeNumberNo (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_causeNumberConditional†Rescheduling reason ID. Required when cancellation_type is 2 or 3.
reschedule_noteTextNoRescheduling note. Applies to cancellation_type 2 or 3.
id_assigned_userNumberConditional†ID of the person responsible for the new WO. Required when cancellation_type is 3.
tasksArrayNoList of tasks to include in the advanced cancellation. Applies to cancellation_type 2 or 3. See the structure in the Tasks section.
utc_minNumberNoUTC offset in minutes.
type_userTextNoUser type. Default value: HUMAN_RESOURCES.
reschedule_causeTextNoText description of the rescheduling reason from the auxiliary catalog. Precedence rule when reschedule_cause and id_reschedule_cause are sent simultaneously.
  • folio and id_work_order are 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:

ParameterTypeDescription
id_taskNumberTask ID.
id_itemNumberID of the asset associated with the task.
date_maintenanceDateTask maintenance date.

Cancellation Types

cancellation_typeBehavior
1 (default)Cancels the WO. Tasks keep their current schedule. Backward-compatible behavior; equivalent to omitting the parameter.
2Cancels 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.
3Cancels the WO and creates a new WO with the same task. Requires id_reschedule_cause and id_responsible.

Output Parameters

ParameterTypeDescription
idNumberTask ID in the work order
id_group_taskNumberID of the task plan where the task from which information will be obtained is located
id_requestNumberRequest ID, if the task comes from a request
id_item_logNumberID of the item log associated with the task
id_task_logNumberInternal ID of the task log
id_tasks_todoNumberInternal ID of pending tasks
id_task_triggerNumberInternal ID of the task trigger
id_taskNumberID of the task from which information will be obtained to create the WO
id_itemNumberAsset ID
id_items_availabilityNumberOut-of-service record ID
items_log_descriptionTextAsset description
task_descriptionTextTask description

Example

Standard cancellation — 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

Request: (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

Request: (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
}
Path Params
string
required
Response
200
Language
LoadingLoading…