Using this EndPoint you can update the information of a spare part and supply. This web service can also be used to associate a spare part to a warehouse.
EndPoint:
https://app.fracttal.com/api/inventories/:code
Method: PUT
Parameters Input
Parameter | Field type | Required | Description |
code | Text | Yes | Spare part code |
Note: To update an item, the request must contain only the fields to be updated and the mandatory fields.
Body parameters
Parameter | Field type | Required | Description |
id_warehouse | Integer | Optional | Warehouse Id where the item is located (Do not send if code_warehouse is sent) |
code_warehouse | Text | Optional | Code of the warehouse where the item is located (Do not send if id_warehouse is sent) |
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 (if it's an integrated warehouse) | Current Stock |
unit_cost_stock | Real | Yes (if it's an integrated warehouse) | Item cost |
Example Request (PUT):
URL: https://app.fracttal.com/api/inventories/ITM-001
Body:
{
"id_warehouse": 1,
"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": 5,
"description": "Aceite Mobil 10w40 ",
"field_1": "Aceites ",
"field_2": null,
"field_3": "Mobil",
"field_4": "10w40",
"field_5": null,
"field_6": null,
"warehouses": [
{
"id_warehouse": 1,
"location": "Sin definir",
"max_stock_level": 2,
"min_stock_level": 2,
"reorder_level": 6,
"stock": 10,
"stock_temp": 0,
"unit_cost_stock": 0
}
]
}
],
"total": 1
}