With this API you can query the list of subtasks.
You can filter by:
TO ID (folio)
WO status (Ots in process, Ots under review and Ots completed).
Date range and you can select by which type of date it will be applied (Creation Date, Start Date or End Date).
EndPoint
https://app.fracttal.com/api/work_orders_subtasks/
Input Parameters
Parameter | Field type | Required | Description |
folio | Text | Optional | TO ID. |
since | Text | Optional | Initial date of the query. Format: 'YYYY-MM-DDTHH:MM:SS-UTC' Example:'2016-07-12T20:00:00-03'. (Default 30 days before) |
until | Text | Optional | End date of the query. Format: 'YYYYY-MM-DDTHH:MM:SS-UTC' Example:'2016-07-12T20:00:00-03'. (Default the current date. |
type_date | Text | Optional | Type of date to make the query. Can be: |
ot_status | Integer | Optional | Number indicating the status of the ots (1: Ots in process, 2: Ots in Review, 3: Ots Completed, 4: Ots Cancelled). |
start | Integer | Optional | Initial record number to be displayed by the query. It is used to do the record pagination. It is the number where the pagination starts. By default it is 0 |
limit | Integer | Opcional | Final record number to be returned by the query. |
Output parameters
Parameter | Field type | Description |
id_work_orders_tasks_form_items | Number | Id of the subtask within the WO |
value | Text | Subtask value |
description | Text | Subtask description |
unit_description | Text | Description of the meter unit. Applies when it is a meter type subtask. |
units_code | Text | Meter unit code. Applies when it is a meter type subtask. |
order_number | Number | Position where the subtask is displayed. |
is_required | Boolean | Subtask is mandatory |
wo_folio | Text | TO ID |
creation_date | Text | Date of creation of the TO |
initial_date | Text | Task start date |
final_date | Text | End date of the task |
id_status_work_order | Number | Status of the work order |
id_task_form_item_type | Number | Subtask type |
Example:
Request: https://app.fracttal.com/api/work_orders_subtasks_get/?folio=OT-67-2017
Example Response
{
"success": true,
"message": "200",
"data": [
{
"id_work_order": 1356,
"id_work_order_task": 2077,
"id_work_orders_tasks_form_items": 9464,
"value": "{\"latitude\":-33.4213488,\"longitude\":-70.6044643,\"hour\":\"2017-05-25 12:17 PM\",\"address\":\"Calle San Pio X 2464, Providencia, Santiago Metropolitan, Chile\"}",
"description": "LLEVAR EL VEH\u00cdCULO A ESTACI\u00d3N DE REPOSICI\u00d3N DE COMBUSTIBLE",
"unit_description": null,
"units_code": null,
"order_number": 1,
"is_required": false,
"meter_description": null,
"last_value": null,
"wo_folio": "OT-67-2017",
"creation_date": "2017-05-25T16:16:55.179077+00:00",
"id_status_work_order": 3
},
{
"id_work_order": 1356,
"id_work_order_task": 2077,
"id_work_orders_tasks_form_items": 9465,
"value": "true",
"description": "APAGAR MOTOR DEL VEH\u00cdCULO",
"unit_description": null,
"units_code": null,
"order_number": 2,
"is_required": false,
"meter_description": null,
"last_value": null,
"wo_folio": "OT-67-2017",
"creation_date": "2017-05-25T16:16:55.179077+00:00",
"id_status_work_order": 3
},
{
"id_work_order": 1356,
"id_work_order_task": 2077,
"id_work_orders_tasks_form_items": 9466,
"value": "",
"description": "ESCANEAR C\u00d3DIGO",
"unit_description": null,
"units_code": null,
"order_number": 3,
"is_required": false,
"meter_description": null,
"last_value": null,
"wo_folio": "OT-67-2017",
"creation_date": "2017-05-25T16:16:55.179077+00:00",
"id_status_work_order": 3
},
], "total": 3 }