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.

Get

Endpoint URL

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

GET https://eu-ext.linnworks.net/api/Inventory/GetBatchesByStockItemId?stockItemId=5b258545-0a93-4f3e-adf1-ed8c9c664ce0&onlyAvailable=true&stockLocationId=e68c78f7-3fa8-465c-9839-05e13a0e3b77

Headers

Connection: keep-alive
Accept: application/json
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

Post

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=5b258545-0a93-4f3e-adf1-ed8c9c664ce0&onlyAvailable=true&stockLocationId=e68c78f7-3fa8-465c-9839-05e13a0e3b77

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": "e79bd5fd-491b-42f1-93f5-5f0013a3a60b",
    "BatchNumber": "sample string 5",
    "ExpiresOn": "2022-01-13T12:45:49.5196211+00:00",
    "SellBy": "2022-01-13T12:45:49.5196211+00:00",
    "Inventory": [
      {
        "BatchInventoryId": 1,
        "BatchId": 2,
        "StockLocationId": "b9e4823f-2199-45cb-ab69-825dc01bd11b",
        "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
  }
]