Megaventory API v2017a

<back to all web services

InventoryLocationStockProductStockUpdate

The following routes are available for this service:
POST/InventoryLocationStock/ProductStockUpdateUpdates Product Stock for given locations and products.Update stock levels for the specified products in the specified locations.

"ProductID" or "ProductSKU" : Specify the product for which the stock should be adjusted.
"InventoryLocationID" : Specify the location in which the adjustment will take place (If only one location exists, you can leave this empty).
"ProductQuantity" : Specify the actual physical quantity currently in stock.
"ProductUnitCost" : Specify the unit cost to be used in the adjustment (leave empty to use the default unit cost of the specified product)
"AdjustmentPlusDocumentTypeID" : The ID of the document type to be used in case of an Adjustment Plus (leave empty to use default).
"AdjustmentMinusDocumentTypeID" : The ID of the document type to be used in case of an Adjustment Minus (leave empty to use default).

Examples:



A.

Adjust stock for product "Product_1" to 800 in Location 1, and "Product_2" to 500 in Location 2, using the default document types and unit costs.

Value:

 {
    "mvProductStockUpdateList": [
        {     
          "ProductSKU" : "Product_1",
          "ProductQuantity": 800,
          "InventoryLocationID": 1
        },
        {     
          "ProductSKU" : "Product_2",
          "ProductQuantity": 500,
          "InventoryLocationID": 2
        }
    ]
}

To override the Content-type in your clients HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /csv/reply/InventoryLocationStockProductStockUpdate HTTP/1.1 
Host: api.megaventory.com 
Content-Type: text/csv
Content-Length: length

ProductID,ProductSKU,ProductQuantity,ProductUnitCost,InventoryLocationID,AdjustmentPlusDocumentTypeID,AdjustmentMinusDocumentTypeID
0,String,0,0,0,0,0

HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

ProductID,ProductSKU,ProductQuantity,ProductUnitCost,InventoryLocationID,AdjustmentPlusDocumentTypeID,AdjustmentMinusDocumentTypeID
0,String,0,0,0,0,0