(GET) Consultar recursos de las tareas

Mediante ésta API se puede consultar el listado de los recursos que se agregaron a una tarea dentro de una OT.

Se pueden realizar filtros por:

  • Id de la OT (folio)
  • Rango de fechas de la OT. Se aplicará para la fecha de creación del recurso en la OT

EndPoint
https://app.fracttal.com/api/wo_resources/

  • Endpoint con filtro por id de la OT:  https://app.fracttal.com/api/wo_resources/:id_ot

Parámetros Entrada

Parámetro Tipo de campo Requerido Descripción
folio Texto Opcional Id de la OT.
since Texto Opcional Fecha inicial de la consulta. Formato: 'YYYY-MM-DDTHH:MM:SS-UTC' Ejemplo:'2016-07-12T20:00:00-03'. (Por defecto 30 días antes)
until Texto Opcional Fecha final de la consulta. Formato: 'YYYY-MM-DDTHH:MM:SS-UTC' Ejemplo:'2016-07-12T20:00:00-03'. (Por defecto la fecha actual.
type_date Texto Opcional 'date_create': Fecha de creación del recurso
ot_status Número Opcional Estado de la Ot. 1: Proceso, 2: Revisión, 3: Finalizada, 4: Cancelada
start Entero Opcional Número de registro inicial que mostrará la consulta. Sirve para hacer la paginación de registros. Es el número en el que comienza la paginación. Por defecto es 0
limit Entero Opcional Número de registro final que retornará la consulta .

Parámetros de salida

Parámetro Tipo de campo Descripción
description Texto Descripción del recurso
source_description Text Fuente del recurso
source_code Texto Código de la fuente del recurso
type Número Tipo de recurso. 1: Inventario, 2: Recursos humanos, 3: Servicios
type_description Texto Descripción del tipo de recurso
qty Número Cantidad solicitada
unit_cost Real Costo unitario
total_cost Real Costo total
qty_delivered Real Cantidad Entregada
real_qty_used Real Cantidad real usada
initial_date Real Fecha inicial de la OT
final_date Real Fecha final de la OT
code Texto Código del recurso
units_description Texto Descripción de la unidad
units_code Texto Código de la unidad
id_status_work_order Número Estado de la orden de trabajo
costs_center_description Texto Centro de costos
date_create Date Fecha en la que fue agregado el recurso
wo_folio Texto Id de la OT
external_source Texto Descripción de la fuente externa (Para cuando es un recurso no catalogado)

Ejemplo:

Petición: https://app.fracttal.com/api/wo_resources/OT-730-2019

Ejemplo Respuesta

{
"success": true,
"message": "200",
"data": [
{
"id": "[1910,2]",
"id_work_orders_tasks": 5375,
"id_resource": 28,
"id_resource_original": 15,
"description": "ELECTRO-MECANICO",
"id_source": 987,
"source_description": " ALEXIS ALEJANDRO LARA HERMOSILLA",
"source_code": "012.479.073-5",
"id_company": 133,
"id_task": 2538,
"type": 2,
"type_description": "HUMAN_RESOURCES",
"qty": 1,
"unit_cost": 15,
"total_cost": 15,
"qty_delivered": 1,
"real_qty_used": 1,
"initial_date": null,
"final_date": null,
"code": "012.479.073-5",
"units_description": "HOUR",
"is_offline": null,
"id_status_work_order": 1,
"id_work_order": 3879,
"id_account_offline": null,
"costs_center_description": "",
"date_create": "2019-04-22T15:21:04.752543+00:00",
"units_code": "H",
"wo_folio": "OT-730-2019",
"external_source": ""
},
{
"id": "[1911,2]",
"id_work_orders_tasks": 5377,
"id_resource": 59,
"id_resource_original": 18,
"description": "ELECTROMECÁNICOS ",
"id_source": 987,
"source_description": " ALEXIS ALEJANDRO LARA HERMOSILLA",
"source_code": "012.479.073-5",
"id_company": 133,
"id_task": 2777,
"type": 2,
"type_description": "HUMAN_RESOURCES",
"qty": 1,
"unit_cost": 2000,
"total_cost": 2000,
"qty_delivered": 1,
"real_qty_used": 1,
"initial_date": null,
"final_date": null,
"code": "012.479.073-5",
"units_description": "HOUR",
"is_offline": null,
"id_status_work_order": 1,
"id_work_order": 3879,
"id_account_offline": null,
"costs_center_description": "",
"date_create": "2019-04-22T15:21:04.752543+00:00",
"units_code": "H",
"wo_folio": "OT-730-2019",
"external_source": ""
},
{
"id": "[1912,2]",
"id_work_orders_tasks": 5379,
"id_resource": 50,
"id_resource_original": 21,
"description": "Tecnico",
"id_source": 987,
"source_description": " ALEXIS ALEJANDRO LARA HERMOSILLA",
"source_code": "012.479.073-5",
"id_company": 133,
"id_task": 2583,
"type": 2,
"type_description": "HUMAN_RESOURCES",
"qty": 2,
"unit_cost": 50000,
"total_cost": 100000,
"qty_delivered": 2,
"real_qty_used": 2,
"initial_date": null,
"final_date": null,
"code": "012.479.073-5",
"units_description": "HOUR",
"is_offline": null,
"id_status_work_order": 1,
"id_work_order": 3879,
"id_account_offline": null,
"costs_center_description": "",
"date_create": "2019-04-22T15:21:04.752543+00:00",
"units_code": "H",
"wo_folio": "OT-730-2019",
"external_source": ""
},
{
"id": "[1913,2]",
"id_work_orders_tasks": 5380,
"id_resource": 4,
"id_resource_original": 3,
"description": "ELECTRONICO",
"id_source": 987,
"source_description": " ALEXIS ALEJANDRO LARA HERMOSILLA",
"source_code": "012.479.073-5",
"id_company": 133,
"id_task": 2001,
"type": 2,
"type_description": "HUMAN_RESOURCES",
"qty": 1,
"unit_cost": 4,
"total_cost": 4,
"qty_delivered": 1,
"real_qty_used": 1,
"initial_date": null,
"final_date": null,
"code": "012.479.073-5",
"units_description": "HOUR",
"is_offline": null,
"id_status_work_order": 1,
"id_work_order": 3879,
"id_account_offline": null,
"costs_center_description": "",
"date_create": "2019-04-22T15:21:04.752543+00:00",
"units_code": "H",
"wo_folio": "OT-730-2019",
"external_source": ""
},
{
"id": "[2261,1]",
"id_work_orders_tasks": 5375,
"id_resource": 23926,
"id_resource_original": 120,
"description": "ACEITE MULTIGRADO ESSO ESSO ",
"id_source": 53,
"source_description": "ALMACEN",
"source_code": "321",
"id_company": 133,
"id_task": 2538,
"type": 1,
"type_description": "INVENTORY",
"qty": 1,
"unit_cost": 0,
"total_cost": 0,
"qty_delivered": 0,
"real_qty_used": 0,
"initial_date": null,
"final_date": null,
"code": "AC0040",
"units_description": "Maquina",
"is_offline": null,
"id_status_work_order": 1,
"id_work_order": 3879,
"id_account_offline": null,
"costs_center_description": "",
"date_create": "2019-04-22T15:21:04.752543+00:00",
"units_code": "1",
"wo_folio": "OT-730-2019",
"external_source": null
},
{
"id": "[2262,1]",
"id_work_orders_tasks": 5377,
"id_resource": 23872,
"id_resource_original": 18,
"description": "CASCO DE PROTECCION { CA-568568 } CA-568568 ",
"id_source": 53,
"source_description": "ALMACEN",
"source_code": "321",
"id_company": 133,
"id_task": 2777,
"type": 1,
"type_description": "INVENTORY",
"qty": 1,
"unit_cost": 66178.9,
"total_cost": 66178.9,
"qty_delivered": 0,
"real_qty_used": 0,
"initial_date": null,
"final_date": null,
"code": "CA-568568",
"units_description": "PIEZA",
"is_offline": null,
"id_status_work_order": 1,
"id_work_order": 3879,
"id_account_offline": null,
"costs_center_description": "",
"date_create": "2019-04-22T15:21:04.752543+00:00",
"units_code": "PZA",
"wo_folio": "OT-730-2019",
"external_source": null
},
{
"id": "[2263,1]",
"id_work_orders_tasks": 5377,
"id_resource": 23899,
"id_resource_original": 16,
"description": "ACEITERA DE 1 LT AC-2454 ",
"id_source": 53,
"source_description": "ALMACEN",
"source_code": "321",
"id_company": 133,
"id_task": 2777,
"type": 1,
"type_description": "INVENTORY",
"qty": 1,
"unit_cost": 23039.4,
"total_cost": 23039.4,
"qty_delivered": 0,
"real_qty_used": 0,
"initial_date": null,
"final_date": null,
"code": null,
"units_description": "PIEZA",
"is_offline": null,
"id_status_work_order": 1,
"id_work_order": 3879,
"id_account_offline": null,
"costs_center_description": "",
"date_create": "2019-04-22T15:21:04.752543+00:00",
"units_code": "PZA",
"wo_folio": "OT-730-2019",
"external_source": null
},
{
"id": "[2264,1]",
"id_work_orders_tasks": 5378,
"id_resource": 23899,
"id_resource_original": 16,
"description": "ACEITERA DE 1 LT AC-2454 ",
"id_source": 53,
"source_description": "ALMACEN",
"source_code": "321",
"id_company": 133,
"id_task": 2485,
"type": 1,
"type_description": "INVENTORY",
"qty": 1,
"unit_cost": 23039.4,
"total_cost": 23039.4,
"qty_delivered": 0,
"real_qty_used": 0,
"initial_date": null,
"final_date": null,
"code": null,
"units_description": "PIEZA",
"is_offline": null,
"id_status_work_order": 1,
"id_work_order": 3879,
"id_account_offline": null,
"costs_center_description": "",
"date_create": "2019-04-22T15:21:04.752543+00:00",
"units_code": "PZA",
"wo_folio": "OT-730-2019",
"external_source": null
},
{
"id": "[2265,1]",
"id_work_orders_tasks": 5380,
"id_resource": 23899,
"id_resource_original": 16,
"description": "ACEITERA DE 1 LT AC-2454 ",
"id_source": 53,
"source_description": "ALMACEN",
"source_code": "321",
"id_company": 133,
"id_task": 2001,
"type": 1,
"type_description": "INVENTORY",
"qty": 1,
"unit_cost": 23039.4,
"total_cost": 23039.4,
"qty_delivered": 0,
"real_qty_used": 0,
"initial_date": null,
"final_date": null,
"code": null,
"units_description": "PIEZA",
"is_offline": null,
"id_status_work_order": 1,
"id_work_order": 3879,
"id_account_offline": null,
"costs_center_description": "",
"date_create": "2019-04-22T15:21:04.752543+00:00",
"units_code": "PZA",
"wo_folio": "OT-730-2019",
"external_source": null
},
{
"id": "[625,3]",
"id_work_orders_tasks": 5375,
"id_resource": 149,
"id_resource_original": 3,
"description": "MANTENIMIENTO CLIMA",
"id_source": 23,
"source_description": "CARRIER INTERNATIONAL",
"source_code": "900.098.654-2",
"id_company": 133,
"id_task": 2538,
"type": 3,
"type_description": "SERVICES",
"qty": 1,
"unit_cost": 53474.3,
"total_cost": 53474.3,
"qty_delivered": 1,
"real_qty_used": 1,
"initial_date": null,
"final_date": null,
"code": "",
"units_description": "SERVICIO",
"is_offline": null,
"id_status_work_order": 1,
"id_work_order": 3879,
"id_account_offline": null,
"costs_center_description": "",
"date_create": "2019-04-22T15:21:04.752543+00:00",
"units_code": "",
"wo_folio": "OT-730-2019",
"external_source": null
},
{
"id": "[626,3]",
"id_work_orders_tasks": 5377,
"id_resource": 141,
"id_resource_original": 30,
"description": "SERVICIO ATENCION",
"id_source": 104,
"source_description": "AGENCIAS FEDURO",
"source_code": "205015",
"id_company": 133,
"id_task": 2777,
"type": 3,
"type_description": "SERVICES",
"qty": 1,
"unit_cost": 50000,
"total_cost": 50000,
"qty_delivered": 1,
"real_qty_used": 1,
"initial_date": null,
"final_date": null,
"code": "",
"units_description": "UNIDAD",
"is_offline": null,
"id_status_work_order": 1,
"id_work_order": 3879,
"id_account_offline": null,
"costs_center_description": "",
"date_create": "2019-04-22T15:21:04.752543+00:00",
"units_code": "",
"wo_folio": "OT-730-2019",
"external_source": null
},
{
"id": "[627,3]",
"id_work_orders_tasks": 5378,
"id_resource": 152,
"id_resource_original": 1,
"description": "CAMBIO DE ACEITE",
"id_source": 104,
"source_description": "AGENCIAS FEDURO",
"source_code": "205015",
"id_company": 133,
"id_task": 2485,
"type": 3,
"type_description": "SERVICES",
"qty": 1,
"unit_cost": 4260.4,
"total_cost": 4260.4,
"qty_delivered": 1,
"real_qty_used": 1,
"initial_date": null,
"final_date": null,
"code": "",
"units_description": "UNIDAD",
"is_offline": null,
"id_status_work_order": 1,
"id_work_order": 3879,
"id_account_offline": null,
"costs_center_description": "",
"date_create": "2019-04-22T15:21:04.752543+00:00",
"units_code": "",
"wo_folio": "OT-730-2019",
"external_source": null
}
],
"total": 12
}