put https://app.fracttal.com/api/inventories/
Through this EndPoint you can update the information of a spare part and supply in a warehouse (stock, cost, maximum and minimum quantities). This web service can also be used to associate a spare part to a warehouse.
The parameter in the url code is the code of the spare part to update. It can be consulted here. (code field)
Body parameters
The following information must be sent in the request body. Only send the data you want to update.
| Parameter | Type | Required | Description | 
|---|---|---|---|
| code | Text | Yes | Item code. Can be consulted here. (code field) | 
| id_warehouse | Integer | Yes | Warehouse Id where the item is located (Do not send if code_warehouse is sent). Can be consulted here. (code field) | 
| code_warehouse | Text | Yes | Code of the warehouse where the item is located (Do not send if id_warehouse is sent). Can be consulted here. (code field) | 
| location | Text | Optional | Physical location of the item. | 
| max_stock_level | Integer | Optional | Maximum stock allowed in the warehouse | 
| min_stock_level | Integer | Optional | Minimum stock allowed in the warehouse | 
| reorder_level | Integer | Optional | Quantity to order | 
| stock | Integer | Yes | Current stock (applies only to integrated warehouses) | 
| unit_cost_stock | Float | Yes | Item cost (applies only to integrated warehouses) | 
Example:
Request: (PUT)https://app.fracttal.com/api/inventories/ITM-001
{
  "id_warehouse": 1,
  "max_stock_level": 2,
  "min_stock_level": 0,
  "stock": 2,
  "unit_cost_stock": 0
}{
  "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
}