Back

Search

Search

Methods

Inventory

OrderPrintStatus
Orders

ShippingService

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=8f6561d9-0abb-41ac-8137-3dc0497b4c41&onlyAvailable=true&stockLocationId=008815f8-f050-4afe-b93e-0ae47187b36f

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": "74266a23-7aa1-4f3b-91a9-6e4231c70e9a",
    "BatchNumber": "sample string 5",
    "ExpiresOn": "2021-07-29T09:24:52.3684642+01:00",
    "SellBy": "2021-07-29T09:24:52.3684642+01:00",
    "Inventory": [
      {
        "BatchInventoryId": 0,
        "BatchId": 0,
        "StockLocationId": "00000000-0000-0000-0000-000000000000",
        "BinRack": "Available",
        "PrioritySequence": 0,
        "Quantity": 0,
        "StockValue": 0.0,
        "StartQuantity": 0,
        "PickedQuantity": 0,
        "BatchStatus": "Available",
        "IsDeleted": false,
        "WarehouseBinrackStandardType": null,
        "WarehouseBinrackTypeName": "Available",
        "InTransfer": null,
        "BinRackId": null,
        "WarehouseBinrackTypeId": null
      }
    ],
    "IsDeleted": true
  }
]