Using this API you can insert cataloged resources of type inventory and human resources and uncataloged resources of type inventory and services into a WO.
EndPoint
https://app.fracttal.com/api/wo_resources/:id
id = id/wo_portfolio of the work order
POST method
Input parameters in the body
Parameter | Field type | Required | Description |
catalogued | Boolean | Yes | True to insert a cataloged resource, false otherwise. False, default value |
type | Number | Yes | Type of resource to insert: 1 : For inventory type resources 2 : For inhouse personnel 3 : For service type resources |
code | Text | Yes | Code of the asset associated to the WO. Not to be added when sending the id_work_order_task |
id_work_order_task | Integer | Yes | Id of the task associated to the TO. Should not be added when sending the code |
code_resource | Text | Yes | Code of the cataloged resource to be inserted (only for cataloged resources). |
code_warehouse | Text | Yes | Code of the warehouse from where the resource is needed (Only for cataloged resources) |
qty | Number | Yes | Quantity |
unit_cost | Number | Yes | Unit cost |
total_cost | Number | Yes | Total cost |
description | Text | Yes | Description of resource (For non-cataloged resources only) |
unit_description | Text | Yes | Unit Description (For non-cataloged resources only) |
external_source | Text | Optional | External source (Only for non-catalogued resources) |
note | Text | Optional | Resource Notes |
code_account | Text | Yes | Must be sent when inserting a cataloged resource. |
Example:
Unlisted Resource
Request: (POST) https://app.fracttal.com/api/wo_resources/1086
Body
{
"code":"7543",
"qty":4,
"type":1,
"unit_cost":600,
"total_cost":2400,
"description":" Replacement Integration ",
"unit_description": "CU"
}
Example Response
{
"success": true,
"message": "200",
"data": [],
"total": 1
}
Catalogued Resource
Request: (POST) https://app.fracttal.com/api/wo_resources/OT-1431
Body
{
"code":"7543",
"code_resource":"0002250000102944",
"code_warehouse":"BOG_INTG",
"qty":4,
"catalogued":"true",
"type":1,
"code_account":"25198772-2",
"unit_cost":4500
}
Example Response
{
"success": true,
"message": "200",
"data": {
"type_description": "INVENTORY",
"description": " ESMERIL STONE 250X10X40 { 0002250000102944 }",
"code": "0002250000102944",
"units_description": "CU",
"units_code": "CU",
"qty": 4,
"unit_cost": 4500,
"total_cost": 18000
},
"total": 1
}