post https://app.fracttal.com/api/wo_resources/:id
By means of this API it is possible to insert within a TO resources in the following way:
-Cataloged: of type inventory, human resources and services -Non-cataloged: of type inventory and services.
Input parameters
Parameter | Type | Required | Description |
---|---|---|---|
catalogued | Boolean | Yes | True to insert a cataloged resource, false otherwise. False, default value. |
type | Number | Yes | Type of resource to be inserted: 1 : For inventory type resources 2 : For human resources 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 or barcode. |
qty | Number | Yes | Quantity. |
unit_cost | Number | Yes | Unit cost. |
code_user | Text | Yes | Code of the human resource to be added (Only for resources catalogued as human resource type). |
rh_description | Text | Optional | Description of the human resource profile (Only for resources catalogued as human resources). |
code_account | Text | Yes | Must be sent when a cataloged resource is inserted. |
Example:
Request: (POST) https://app.fracttal.com/api/wo_resources/OTPRB9742019
{
"catalogued":true,
"type": 2,
"code":"LFR-001",
"qty":4,
"unit_cost":150,
"code_user": "AMPEREZ",
"rh_description": "ELECTRICISTA",
"code_account":"JCDIAZ"
}
{
"success": true,
"message": "200",
"data": {
"type_description": "HUMAN_RESOURCES",
"source_description": "Ana Maria Perez",
"code": "AMPEREZ",
"description": "ELECTRICISTA",
"qty": 4,
"unit_cost": 150,
"total_cost": 600
},
"total": 1
}
Test It