Notes: - This web service is part of the ADVANCED APIS add-on - The work request must have a linked asset - The work request must be in the "open" or "under development" status.
Input parameters
| Parameter | Type | Required | Description | 
|---|---|---|---|
| id_request | Number | Yes | Job Application ID | 
| task_type_main | Text | Yes | Type of task | 
| account_code | Text | Yes | Code of the human resource or third party with a Fracttal user account, who will be registered as the creator of the pending task. | 
| task_type_description | Text | Optional | Classification 1 of the task | 
| task_type_2_description | Text | Optional | Classification 2 of the task | 
| date_maintenance | Date | Yes | Scheduled date of the task (default is the current date - Format YYYYY-MM-DDTHH:MM:SS-UTC Example: 2021-07-12T20:00:00:00-03) | 
| date_incident | Date | Optional | Incident date (default is the date of the work request incident - Format YYYYY-MM-DDTHH:MM:SS-UTC Example: 2021-07-12T20:00:00:00-03) | 
| description | Text | Optional | Task description (default is work request description) | 
| note | Text | Optional | Task Note (default is the remarks of the work request) | 
| duration | Number | Optional | Estimated duration (in seconds - default 600 seconds) | 
| id_priorities | Number | Optional | Task priority: 1 - Very High 2 - High 3 - Medium 4 - Low 5 - Very Low (default 3 - Medium) | 
| requested_by | Text | Optional | Applicant of the task (default applicant of the work request) | 
| asset_out_of_service | Boolean | Optional | value to indicate whether the task has an associated out-of-service. False by default | 
| date_asset_out_of_service | Date | Optional | Date of start of out-of-service | 
**Send the required fields and the parameters with the additional values you wish to insert.
Output parameters
| Paraneter | Type | Description | 
|---|---|---|
| id_todo | Number | Task ID in the To-do module | 
| id_task | Number | Task ID | 
| date_created | Date | Date of creation of the TO | 
| created_by | Text | Name of the user who is listed as the creator of the TO | 
| id | Number | Id of the pending task | 
| id_company | Number | Company Id | 
| id_task | Number | Task ID | 
| id_type_item | Number | Type of asset | 
| id_item | Number | Asset Id | 
| code | Text | Asset code | 
| item_description | Text | Description of asset | 
| id_cost_center | Number | Id of the asset's cost center | 
| id_custom_field_group | Number | Asset's custom field group ID | 
| item_id_priority | Number | Asset priority ID | 
| id_group | Number | Asset group ID | 
| id_group_1 | Number | Asset classification ID 1 | 
| id_group_2 | Number | Asset classification ID 2 | 
| id_task_type_main | Number | Task type ID | 
| id_task_type | Number | Task Rating ID 1 | 
| id_task_type_2 | Number | Task Classification Id 2 | 
| date_maintenance | Date | Scheduled date of task | 
| description | Date | Task description | 
| duration | Number | Estimated duration | 
| is_active | Boolean | Active enabled | 
| tasks_types_main_description | Text | Type of task | 
| priorities_description | Text | Priority of the task | 
| tasks_types_description | Text | Classification 1 of the task | 
| tasks_types_2_description | Text | Classification 2 of the task | 
| id_priorities | Number | task priority id | 
| parent_description | Text | Descripción de activo padre | 
| requested_by | Text | Applicant | 
| task_note | Text | Note on the task | 
| id_request | Number | Job Application ID | 
| event_date | Date | Date of incident | 
| cal_date_maintenance | Date | Calculated date | 
| visible_to_all | Boolean | Asset visible to all | 
| groups_description | Text | Asset group | 
| groups_1_description | Text | Asset classification 1 | 
| groups_2_description | Text | Asset classification 2 | 
Example:
Request: (POST)https://app.fracttal.com/api/tasks_from_work_request/
{
    "id_request":377,
    "task_type_main": "CORRECTIVA MRX SQA",
    "task_type_description": "MECÁNICA MRX",
    "task_type_2_description": "REQUIERE PERMISO ALTURA 2 MRX",
    "date_maintenance": "2022-09-27T13:30:29-05",
    "date_incident": "2022-09-14T06:15:29-05",
    "description": "EJEMPLO VERIFICACIÓN DE SOLICITUD 379 A TAREAS PENDIENTES DESDE API",
    "note":"VERIFICACIÓN DE MRX",
    "duration":1500,
    "id_priorities":2,
    "account_code": "JCDIAZ",
    "requested_by":"Prueba desde API MRX"
}{
    "success": true,
    "message": "200",
    "data": {
        "id": 8810053,
        "id_company": 1190,
        "id_task": 3157021,
        "id_type_item": 1,
        "id_item": 6,
        "code": "ENVASADO",
        "item_description": "ENVASADO      { ENVASADO }",
        "id_cost_center": null,
        "id_custom_field_group": null,
        "item_id_priority": null,
        "id_group": null,
        "id_group_1": null,
        "id_group_2": null,
        "id_work_order_task": null,
        "id_group_task": null,
        "id_task_type_main": 10318,
        "id_task_type": 13293,
        "id_task_type_2": 13584,
        "group_task_description": null,
        "date_maintenance": "2022-09-27T18:30:29+00:00",
        "trigger_description": "NO_SCHEDULE_TASK",
        "delay": 0,
        "description": "EJEMPLO VERIFICACIÓN DE SOLICITUD 379 A TAREAS PENDIENTES DESDE API",
        "duration": 1500,
        "is_active": true,
        "stop_assets": false,
        "stop_assets_sec": null,
        "tasks_types_main_description": "CORRECTIVA MRX SQA",
        "priorities_description": "HIGH",
        "tasks_types_description": "MECÁNICA MRX",
        "tasks_types_2_description": "REQUIERE PERMISO ALTURA 2 MRX",
        "id_priorities": 2,
        "num_resources": 0,
        "notes": null,
        "parent_description": "// EMPRESA SECTOR MANUFACTURA/ PLANTA 1 - PRODUCCIÓN ALIMENTOS/ ÁREA PRODUCCIÓN FRUTAS/ LINEA FRUTAS ROJAS/ ",
        "last_date_maintenance": "2022-09-27T18:55:29+00:00",
        "requested_by": "Prueba desde API MRX",
        "task_failure": null,
        "task_note": "VERIFICACIÓN DE MRX",
        "id_task_trigger": null,
        "show_todo": true,
        "replay_counter": 0,
        "wo_folio": null,
        "id_request": 377,
        "event_date": "2022-09-14T11:15:29+00:00",
        "cal_date_maintenance": "2022-09-27T18:30:29+00:00",
        "triggers": {},
        "items_log_description": "ENVASADO      { ENVASADO }",
        "replay_counter_cycles": null,
        "num_iterations": null,
        "is_cyclical": null,
        "visible_to_all": false,
        "id_items_availability": null,
        "groups_description": null,
        "groups_1_description": null,
        "groups_2_description": null,
        "items_log_id_priority": 2,
        "tasks_log_task_type_main": "CORRECTIVA MRX SQA",
        "tasks_log_types_description": "MECÁNICA MRX",
        "tasks_log_types_2_description": "REQUIERE PERMISO ALTURA 2 MRX",
        "id_status_work_order": 5,
        "id_type": 69,
        "id_event": 33
    },
    "total": 0
}Test It
