Back

Search

Search

Methods

Inventory

OrderPrintStatus
Orders

Stock /CreateStockBatches

Allows 150 calls per minute

Response: List<StockItemBatch>



Creates stock item batches

Parameters

NameTypeDescription
batchesList<StockItemBatch>

Permissions

GlobalPermissions.Inventory.Stock.StockWrite.ChangeStockLevelsNode

Example Request

The following request format is required for this method.

Endpoint URL

POST https://eu-ext.linnworks.net/api/Stock/CreateStockBatches

Headers

Connection: keep-alive
Accept: application/json
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

Request Body

This is an example of the request structure. Results will vary depending on your data.

batches=[
  {
    "BatchId": 1,
    "SKU": "sample string 2",
    "InventoryTrackingType": 3,
    "StockItemId": "a885f9e3-512a-4597-a947-d18edcc0f974",
    "BatchNumber": "sample string 5",
    "ExpiresOn": "2022-03-09T13:04:02.2798729+00:00",
    "SellBy": "2022-03-09T13:04:02.2798729+00:00",
    "Inventory": [
      {
        "BatchInventoryId": 1,
        "BatchId": 2,
        "StockLocationId": "3327ee0d-b12c-4e0d-a2b3-bcd5404eb8a7",
        "BinRack": "sample string 4",
        "PrioritySequence": 5,
        "Quantity": 6,
        "StockValue": 7.0,
        "StartQuantity": 8,
        "PickedQuantity": 9,
        "BatchStatus": "Available",
        "IsDeleted": true,
        "WarehouseBinrackStandardType": 1,
        "WarehouseBinrackTypeName": "sample string 12",
        "InTransfer": 1,
        "BinRackId": 1,
        "WarehouseBinrackTypeId": 1
      }
    ],
    "IsDeleted": true
  }
]

Response

This is an example of the response JSON. Results will vary depending on your data.

[
  {
    "BatchId": 1,
    "SKU": "sample string 2",
    "InventoryTrackingType": 3,
    "StockItemId": "2850b510-3628-4560-8531-9a69ca7d4dba",
    "BatchNumber": "sample string 5",
    "ExpiresOn": "2022-03-09T13:04:11.9944072+00:00",
    "SellBy": "2022-03-09T13:04:11.9944072+00:00",
    "Inventory": [
      {
        "BatchInventoryId": 1,
        "BatchId": 2,
        "StockLocationId": "8f811e2b-9875-4220-9e2e-2bc4f8036e11",
        "BinRack": "sample string 4",
        "PrioritySequence": 5,
        "Quantity": 6,
        "StockValue": 7.0,
        "StartQuantity": 8,
        "PickedQuantity": 9,
        "BatchStatus": "Available",
        "IsDeleted": true,
        "WarehouseBinrackStandardType": 1,
        "WarehouseBinrackTypeName": "sample string 12",
        "InTransfer": 1,
        "BinRackId": 1,
        "WarehouseBinrackTypeId": 1
      }
    ],
    "IsDeleted": true
  }
]