Back

Search

Search

Methods

Inventory

OrderPrintStatus
Orders

Inventory /GetBatchesByStockItemId

Allows 250 calls per minute

Response: List<StockItemBatch>



Used to get batch info for stock item for all locations

Parameters

NameTypeDescription
stockItemIdGuidItem id
onlyAvailableBooleanIf true, only available batches will be returned
stockLocationIdNullable<Guid>

Example Request

The following request format is required for this method.

Endpoint URL

POST https://eu-ext.linnworks.net/api/Inventory/GetBatchesByStockItemId

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.

stockItemId=93f52109-c975-4c5d-a1f1-0d8de7d6669e&onlyAvailable=true&stockLocationId=eef55418-9987-4638-aa48-7e35ac0d5f0f

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": "cd12b999-b80f-4a8c-ba8b-e599a8529eaa",
    "BatchNumber": "sample string 5",
    "ExpiresOn": "2022-03-09T13:04:14.3946839+00:00",
    "SellBy": "2022-03-09T13:04:14.3946839+00:00",
    "Inventory": [
      {
        "BatchInventoryId": 1,
        "BatchId": 2,
        "StockLocationId": "4b1adaa5-4cd6-4af6-948a-9dca79e6d74c",
        "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
  }
]