Update a spare part in a warehouse

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.

ParameterTypeRequiredDescription
codeTextYesItem code. Can be consulted here. (code field)
id_warehouseIntegerYesWarehouse Id where the item is located (Do not send if code_warehouse is sent). Can be consulted here. (code field)
code_warehouseTextYesCode of the warehouse where the item is located (Do not send if id_warehouse is sent). Can be consulted here. (code field)
locationTextOptionalPhysical location of the item.
max_stock_levelIntegerOptionalMaximum stock allowed in the warehouse
min_stock_levelIntegerOptionalMinimum stock allowed in the warehouse
reorder_levelIntegerOptionalQuantity to order
stockIntegerYesCurrent stock (applies only to integrated warehouses)
unit_cost_stockFloatYesItem 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
}
Language