Fracttal →

Update a warehouse

Through 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.

Input parameters

ParameterTypeRequiredDescription
codeTextYesSpare part code

Note: To update an item, the request must contain only the fields to be updated and the required fields.

Body parameters

ParameterTypeDescription
idIntegerId of the item to be deleted
codeTextItem code
descriptionTextDescription
id_warehouseIntegerWarehouse Id where the item is located (Do not send if code_warehouse is sent)
code_warehouseTextCode of the warehouse where the item is located (Do not send if id_warehouse is sent)
locationTextPhysical location of the item.
max_stock_levelRealMaximum stock allowed in the warehouse
min_stock_levelRealMinimum stock allowed in the warehouse
reorder_levelRealQuantity to order
stockRealCurrent stock
unit_cost_stockRealItem cost
locationTextLocation

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
}

Test It

Language