Back

Search

Search

Methods

Inventory

Orders

Stock /UpdateStockLevelsBySKU

Response: List<StockItemLevel>



Change the stock level of a list of stock items by the provided value

Parameters

NameTypeDescription
stockLevelsList<StockLevelUpdate>The new stock items levels to adjust
changeSourceString

HTTP Endpoint

Server /Stock / UpdateStockLevelsBySKU

Permissions

GlobalPermissions.Inventory.Stock.StockWrite.ChangeStockLevels.ChangeStockLevelsNode

Example Code

Example Request

The following request format is required for this method.

POST https://eu-ext.linnworks.net//api/Stock/UpdateStockLevelsBySKU HTTP/1.1
Host: eu-ext.linnworks.net
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
Origin: https://www.linnworks.net
Accept-Language: en
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://www.linnworks.net/
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

stockLevels=[
  {
    "SKU": "sample string 1",
    "LocationId": "f435676c-416b-4511-96dc-641eb923c3cc",
    "Level": 3
  },
  {
    "SKU": "sample string 1",
    "LocationId": "f435676c-416b-4511-96dc-641eb923c3cc",
    "Level": 3
  }
]&changeSource=sample string 1

Response

This is an example response. Results may vary depending on your data.

[
  {
    "Location": {
      "StockLocationId": "1ce1f7f3-e90f-43e2-a112-6617f6bb7de7",
      "LocationName": "sample string 2",
      "IsFulfillmentCenter": true,
      "LocationTag": "sample string 4",
      "BinRack": "sample string 5"
    },
    "StockLevel": 1,
    "StockValue": 2.1,
    "MinimumLevel": 3,
    "InOrderBook": 4,
    "Due": 5,
    "InOrders": 4,
    "Available": -3,
    "UnitCost": 2.1,
    "SKU": "sample string 6",
    "AutoAdjust": true,
    "LastUpdateDate": "2018-02-19T16:57:07.0912605+00:00",
    "LastUpdateOperation": "sample string 9",
    "rowid": "21514b3b-5bc1-41e7-97f3-f720003a6efe",
    "PendingUpdate": true,
    "StockItemId": "1ee001ed-928a-427d-ac9f-1d7661eaed1f"
  },
  {
    "Location": {
      "StockLocationId": "1ce1f7f3-e90f-43e2-a112-6617f6bb7de7",
      "LocationName": "sample string 2",
      "IsFulfillmentCenter": true,
      "LocationTag": "sample string 4",
      "BinRack": "sample string 5"
    },
    "StockLevel": 1,
    "StockValue": 2.1,
    "MinimumLevel": 3,
    "InOrderBook": 4,
    "Due": 5,
    "InOrders": 4,
    "Available": -3,
    "UnitCost": 2.1,
    "SKU": "sample string 6",
    "AutoAdjust": true,
    "LastUpdateDate": "2018-02-19T16:57:07.0912605+00:00",
    "LastUpdateOperation": "sample string 9",
    "rowid": "21514b3b-5bc1-41e7-97f3-f720003a6efe",
    "PendingUpdate": true,
    "StockItemId": "1ee001ed-928a-427d-ac9f-1d7661eaed1f"
  }
]