Update tasks within work orders

This API finalizes a task within a work order. With this web service, you can set the task's start and end dates, failure information, and/or whether the asset was out of service.

This API is part of the ADVANCED APIS add-on

Body Parameters

ParameterTypeRequiredDescription
id_work_order_task TextYesTask ID within the work order
initial_date TextYesTask start date in the format 'YYYY-MM-DDTHH:MM:SS-UTC', for example, '2016-07-12T20:00:00-03'. If the timezone format is not provided, the date will be assumed to be in UTC-0
final_date TextYesTask end date in the format 'YYYY-MM-DDTHH:MM:SS-UTC', for example, '2016-07-12T20:00:00-03'. If the timezone format is not provided, the date will be assumed to be in UTC-0
real_duration NumberNoTime in seconds of the actual task duration
is_done BooleanNo

True: if the task is completed

False: if the task is not finished, this value is set by default if no value is sent

code_account TextYesHuman resource code
asset_failure BooleanOptionalValue indicating whether the asset failed. False by default
failure_type TextOptionalFailure description
failure_cause TextOptionalDescription of the failure cause
failure_detection_method TextOptionalDescription of the failure detection method
id_failure_severity NumberOptionalFailure severity ID
1: Very Low
2: Low
3: Medium
4: High
5: Very High
id_damage_type NumberOptionalType of damage caused:
1: None
2: Environmental damage
3: Facility damage
4: Internal personnel injuries
5: Third-party injuries
6: Other
asset_out_of_service BooleanOptionalValue to indicate if the task has an associated out-of-service period. False by default
date_asset_out_of_service DateOptionalStart date of the out-of-service period in the format 'YYYY-MM-DDTHH:MM:SS-UTC', for example, '2016-07-12T20:00:00-03'. If the timezone format is not provided, the date will be assumed to be in UTC-0

Output Parameters

ParameterTypeDescription
id NumberTask ID associated with the work order
id_work_order NumberWork order ID
id_item_log NumberItem log ID associated with the task
done BooleanDescription of the meter unit. Applies when it's a meter-type subtask
units_codeTextMeter unit code. Applies when it's a meter-type subtask
order_numberNumberPosition in which the subtask is displayed
is_requiredBooleanWhether the subtask is mandatory
wo_folioTextWork order ID
creation_dateTextWork order creation date
initial_dateTextTask initial date
final_dateTextTask final date
id_status_work_orderNumberWork order status
id_task_form_item_typeNumberSubtask type

Example:

Request: (PUT)https://app.fracttal.com/api/work_orders_tasks/1776531

{
    "initial_date":"2020-06-29T20:00:00-05",
    "final_date":"2020-06-30T08:00:00-05",
    "real_duration":40000,
    "is_done":"true",
    "code_account":"7845123",
    "asset_failure": "true",
    "failure_type":"API FAILURE",
    "failure_cause":"API FAILURE CAUSE",
    "failure_detection_method":"API FAILURE DETECTION METHOD",
    "id_failure_severity": 3,
    "id_damage_type":1,
    "asset_out_of_service": "true"
}
{
    "success": true,
    "message": "200",
    "data": {
        "id": 1776531,
        "id_company": 69,
        "id_work_order": 633665,
        "id_item_log": 408,
        "id_task_log": 463106,
        "done": true,
        "last_date_maintenance": "2020-11-18T20:59:38.578043+00:00",
        "cal_date_maintenance": "2020-11-18T21:00:14.151688+00:00",
        "date_maintenance": "2020-11-18T21:00:14.151688+00:00",
        "trigger_description": "NO_SCHEDULE_TASK",
        "duration": 600,
        "id_task_trigger": null,
        "initial_date": "2020-06-30T01:00:00+00:00",
        "final_date": "2020-06-30T13:00:00+00:00",
        "real_duration": 40000,
        "stop_assets_sec": 0,
        "real_stop_assets_sec": 0,
        "id_items_availability": null
    },
    "total": 1
}

TEST CONNECTION

Path Params
string
required
Response
200
Language
LoadingLoading…