Using this EndPoint you can create an item as a spare and supply and associate it to a warehouse (for when the warehouse code is sent to the web service).
EndPoint
https://app.fracttal.com/api/inventories
POST Method
Input Parameters
Parameter | Field type | Required | Description |
code | Text | Yes | Item code |
field_1 | Text | Yes | Item name |
field_2 | Text | Optional | Item part number |
field_3 | Text | Optional | Item maker |
field_4 | Text | Optional | Item model |
field_5 | Text | Optional | Group 1 of the item |
field_6 | Text | Optional | Group 2 of the item |
code_warehouse | text | Optional | Warehouse code to which the item will be associated. If not, the item will be created but will not be associated to a warehouse. |
id_warehouse | Integer | No | Warehouse Id where the item will be associated. In case of not having it, the item will not be associated to a warehouse. |
barcode | Text | Optional | Item barcode |
location | Text | Optional | Physical location of the item. |
max_stock_level | Real | Optional | Maximum stock allowed in the warehouse |
min_stock_level | Real | Optional | Minimum stock allowed in the warehouse |
stock | Real | Yes | Current Stock |
unit_cost_stock | Real | Yes | Item Cost |
unit_code | Text | Yes | Unit code |
unit_description | Text | Yes | Description of the unit |
visible_to_all | Booleano | Optional | Active visible to all. Default is false |
location | Text | Optional | Location |
notes | Text | Optional | Notes |
Output parameters
Parameter | Field type | Description |
id | Integer | Id of the item to be deleted |
code | Text | Item code |
description | Text | Concatenation of fields field_1 to field_6 |
id_warehouse | Integer | Warehouse Id where the item is located |
location | Text | Physical location of the item. |
max_stock_level | Real | Maximum stock allowed in the warehouse |
min_stock_level | Real | Minimum stock allowed in the warehouse |
reorder_level | Real | Quantity to order |
stock | Real | Current Stock |
unit_cost_stock | Real | Item Cost |
Example Request (POST):
URL: https://app.fracttal.com/api/inventories
Body:
{
"code": "ITM-012",
"field_1": "Llanta",
"field_2": "R16 Y70",
"field_3": "Dunlop",
"field_4": "RM340",
"id_warehouse": 1,
"unit_code":"UND",
"unit_description":"UND",
"max_stock_level": 2,
"min_stock_level": 0,
"stock": 2,
"unit_cost_stock": 0
}
Example of the response:
Body:
{
"success": true,
"message": "200",
"data": {
"id": 13824522,
"id_company": null,
"code": "ITM-012",
"description": "Llanta R16 Y70 Dunlop RM340 { ITM-012 }",
"id_type_item": 4,
"id_group": null,
"id_group_2": null,
"notes": null,
"min_stock_warning": null,
"weight": null,
"id_unit": 1,
"is_serial_control": false,
"is_tool": false,
"active": true,
"barcode": null,
"field_1": "Llanta",
"field_2": "R16 Y70",
"lead_time": null,
"id_custom_field_group": null,
"path_image": null,
"id_parent": null,
"id_priority": null,
"id_group_1": null,
"id_group_task": null,
"id_cost_center": null,
"field_3": "Dunlop",
"field_4": "RM340",
"is_changed": true,
"field_5": null,
"field_6": null,
"import_code": null,
"total_replacement_cost": null,
"salvage_value": null,
"purchase_date": null,
"total_cost": 0,
"anual_depreciation": null,
"startup_date": null,
"id_third_party": null,
"id_budget": null,
"latitude": null,
"longitud": null,
"id_items_import": null,
"visible_to_all": false,
"hours_average_daily_use": null,
"parent_description": null,
"path_node": null,
},
"total": 1
}