Through this API you can query the list of resources that were added to a task within a WO.
You can filter by:
TO ID (folio)
Date range of the TO. It will be applied to the date of creation of the resource in the WO.
EndPoint
https://app.fracttal.com/api/wo_resources/
Endpoint with filter by TO id: https://app.fracttal.com/api/wo_resources/:id_ot
Parameters Input
Parameter | Field type | Required | Description |
folio | Text | Optional | TO ID. |
since | Text | Optional | Initial date of the query. Formato: '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 | date_create': Creation date of the resource. |
ot_status | Number | Optional | Status of Ot. 1: In process, 2: in Review, 3: Finished, 4: Cancelled |
code_location | Text | Optional | Location code, where the asset is located or is part of the asset to which the WO was performed. |
type | Number | Optional | Type of resource: 1 : Inventory 2 : Inhouse Personnel 3 : Services |
start | Integer | Opcional | Initial record number to be displayed by the query. It is used to make the pagination of records. It is the number at which 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 | Text | id of the task in the work order |
id_resource | Text | Id within the WO of the associated resource |
id_resource_original | Text | Id of the resource (id that is associated to the spare parts, human resources or services catalog) |
description | Text | Description of the resource |
source_description | Text | Resource source |
source_code | Text | Resource source code |
type | Number | Type of resource. 1: Inventory, 2: Inhouse Personnel, 3: Services. |
type_description | Text | Description of type of resource |
qty | Number | Quantity requested |
unit_cost | Real | Unit cost |
total_cost | Real | Total Cost |
qty_delivered | Real | Quantity Delivered |
real_qty_used | Real | Actual amount used |
initial_date | Real | WO start date |
final_date | Real | WO End Date |
code | Text | Resource Code |
units_description | Text | Unit Description |
units_code | Text | Unit code |
id_status_work_order | Number | Work Order Status |
costs_center_description | Text | Cost Center |
date_create | Date | Date the resource was added |
wo_folio | Text | WO ID |
external_source | Text | Description of the external source (For when it is a non-catalogued resource) |
id_movements_details | Texto | ID of the movement detail that is associated with this resource (applies only for inventory type resources) |
Example:
Request: https://app.fracttal.com/api/wo_resources/OT-730-2019
Example Response
{
"success": true,
"message": "200",
"data": [
{
"id": "[1910,2]",
"id_work_orders_tasks": 5375,
"id_resource": 28,
"id_resource_original": 15,
"description": "ELECTRO-MECANICHANICAL TECHNICIAN",
"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": "INHOUSE_PERSONNEL",
"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": "ELECTRO-MECHANICALS",
"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": "INHOUSE_PERSONNEL",
"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": "INHOUSE_PERSONNEL",
"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": "INHOUSE_PERSONNEL",
"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": "MULTIGRADE OIL ESSO",
"id_source": 53,
"source_description": "WAREHOUSE",
"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": "Machine",
"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": "SAFETY HELMET { CA-568568 } CA-568568 ",
"id_source": 53,
"source_description": "WAREHOUSE",
"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": "PIECE",
"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": "OILCAN 1 LT AC-2454 ",
"id_source": 53,
"source_description": "WAREHOUSE",
"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": "PIECE",
"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": "OILCAN 1 LT AC-2454 ",
"id_source": 53,
"source_description": "WAREHOUSE",
"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": "PIECE",
"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": "OILCAN 1 LT AC-2454 ",
"id_source": 53,
"source_description": "WAREHOUSE",
"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": "PIECE",
"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": "CLIMATE MAINTENANCE",
"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": "SERVICE",
"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": "ATENTION SERVICE",
"id_source": 104,
"source_description": "FEDURO AGENCIES",
"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": "UNIT",
"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": "OIL CHANGE",
"id_source": 104,
"source_description": "FEDURO AGENCIES",
"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": "UNIT",
"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
}