API Endpoints
Fracttal →

Query subtask

Through this API the list of subtasks can be consulted.

Filters can be made by:

  • WO ID (folio) WO status (WOs in process, WOs under review and WOs completed) Date range and you can select by which type of date it will be applied (Creation date, Start date or End date).

Input Parameters

ParameterTypeRequiredDescription
folioTextOptionalId de la WO.
sinceTextOptionalInitial date of the query. Format: 'YYYYY-MM-DDTHH:MM:SS-UTC' Example: '2016-07-12T20:00:00-03'. (Default 30 days before)
untilTextOptionalFecha final de la consulta. Formato: 'YYYY-MM-DDTHH:MM:SS-UTC' Ejemplo:'2016-07-12T20:00:00-03'. (Por defecto la fecha actual.
type_dateTextOptionalType of date to make the query. It can be:

.
ValueDescription
creation_dateDate of creation of the TO (Default value)
initial_dateStart date of the task
final_dateEnd date of the task
.
ot_statusIntegerOptionalNumber indicating the status of the ots (1: WOs in process, 2: WOs under Review, 3: WOs Finalized, 4: WOs Cancelled).
startIntegerOptionalInitial 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
limitIntegerOptionalFinal record number to be returned by the query.

Output parameters

ParameterTypeDescription
id_work_orders_tasks_form_itemsNumberSubtask ID within the WO
valueTextSubtask value
descriptionTextSubtask description
unit_descriptionTextDescription of the meter unit. Applies for meter type subtask.
units_codeTextMeter unit code. Applies when it is a meter type subtask.
order_numberNumberPosition in which the subtask is displayed
is_requiredBooleanSubtask is mandatory
wo_folioTextId de la WO
creation_dateTextDate of creation of the WO
initial_dateTextTask start date
final_dateTextEnd date of task
id_status_work_orderNumberWork order status
id_task_form_item_typeNumberTipo de subtarea

Example:

Request: (GET) https://app.fracttal.com/api/work_orders_subtasks/?folio=OT-67-2017

{
  "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 }

Test It

Language