Listing the lots of a delivery

Getting the lots received in a delivery

API reference DeliveryLotsAPI

Overview

This endpoint can be used to get the lots that were received into the warehouse with a specific delivery, together with the amount received of each one

📘

Received amounts, not current stock

This endpoint reports what was received for this delivery. It does not change as that stock is later picked, moved or written off. To get the stock you hold per lot right now, use Listing products lots

Method access
GET https://api.getbyrd.com/v2/warehouse/deliveries/<delivery_id>/lots
Request Headers
Authorization: Bearer token-from >Authentication
Content-Type: application/json
User-Agent: your user-agent >How to call the APIs

You can get the delivery_id of any of your deliveries by listing them.

🚧

Only products with lots enabled appear here

Stock is only recorded against a lot for products that have lots enabled. Any other product in the same delivery is received as normal but does not appear in this response, so the amounts here will not add up to the total of the delivery. For the amount received per delivery item, use the receivedAmount field in Getting the details of a delivery

Response fields

One entry is returned per lot. The same product appears once for every lot it was received in.

FieldTypeDescription
productID stringThe id of the product the lot belongs to
sku stringYour own SKU for that product
It can be null if the product has no SKU
lotID stringThe id of the lot
Use it with Listing products lots to see the current stock of that lot
lotNumber stringThe lot (batch) number
expiryDate stringThe date the lot expires on
It can be null if the lot has no expiry date
amountReceived integerThe number of items of that lot received with this delivery
If the same lot was put away several times, the amounts are added up into this one value

The list is not paginated and is always ordered by sku, then by lotNumber.

Successful response example

"data": [
  {
    "productID": "<product-id>",
    "sku": "b-t1",
    "lotID": "<lot-1-id>",
    "lotNumber": "abc-123",
    "expiryDate": "2025-11-25",
    "amountReceived": 60
  },
  {
    "productID": "<product-id>",
    "sku": "b-t1",
    "lotID": "<lot-2-id>",
    "lotNumber": "abc-124",
    "expiryDate": "2026-03-01",
    "amountReceived": 40
  },
  {
    "productID": "<other-product-id>",
    "sku": "b-t2",
    "lotID": "<lot-3-id>",
    "lotNumber": "xyz-987",
    "expiryDate": null,
    "amountReceived": 25
  }
]

Empty responses

A delivery that has not been inbounded yet, or one that contains no products with lots enabled, returns an empty list rather than an error:

"data": []