---
title: "Lots and expiry | Docs | WMS by R&D Copilot"
description: "Which items carry a lot and a date, how the date decides what is picked, and how a lot is followed from the supplier to the customer."
canonical: "https://warehouse.rdcopilot.com/docs/concepts/lots-and-expiry/"
language: en
updated: 2026-11-22
---

# Lots and expiry

Which items carry a lot and a date, how the date decides what is picked, and how a lot is followed from the supplier to the customer.

Food has a date. An item that has one is received with a lot and the last day of that lot, and every movement of the item carries both. An item with no date has no lot, and a request that gives it one is refused with `lot_not_allowed`.

## At the dock

A lot is capital letters, digits and hyphens, from 3 to 20 characters, for example `L26-1160`. The expiry is a real day, today or later. A lot that has already passed its date is refused with `lot_ended` and does not enter the stock. Damaged units need no lot, because they never enter the stock.

curl

```bash
curl -X POST "$RDC_BASE_URL/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000407/receive" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "5940993b-2e4d-45e3-8ed2-8e251326f413",
  "expectedRevision": 2,
  "sku": "FA-0010",
  "received": "100",
  "damaged": "4",
  "lot": "L26-1160",
  "expiry": "2027-06-30",
  "by": "dan-ilie"
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000407/receive`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "5940993b-2e4d-45e3-8ed2-8e251326f413",
    "expectedRevision": 2,
    "sku": "FA-0010",
    "received": "100",
    "damaged": "4",
    "lot": "L26-1160",
    "expiry": "2027-06-30",
    "by": "dan-ilie"
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000407/receive',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '5940993b-2e4d-45e3-8ed2-8e251326f413',
        'expectedRevision': 2,
        'sku': 'FA-0010',
        'received': '100',
        'damaged': '4',
        'lot': 'L26-1160',
        'expiry': '2027-06-30',
        'by': 'dan-ilie',
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "5940993b-2e4d-45e3-8ed2-8e251326f413",
  "expectedRevision": 2,
  "sku": "FA-0010",
  "received": "100",
  "damaged": "4",
  "lot": "L26-1160",
  "expiry": "2027-06-30",
  "by": "dan-ilie"
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000407/receive');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/inbound-deliveries/a2000000-0000-4000-8000-000000000407/receive");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "5940993b-2e4d-45e3-8ed2-8e251326f413",
  "expectedRevision": 2,
  "sku": "FA-0010",
  "received": "100",
  "damaged": "4",
  "lot": "L26-1160",
  "expiry": "2027-06-30",
  "by": "dan-ilie"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 202

```json
{
  "operationId": "5940993b-2e4d-45e3-8ed2-8e251326f413",
  "status": "accepted",
  "aggregateRevision": 3
}
```

## At the pick

A wave takes the lot that ends first, and never a lot past its date. The task names the lot. If the day of a scan is later than the last day of the lot, the scan of the location or of the item is refused with `lot_expired`, so a lot that ended between the release and the pick is not picked. The picker can close the task `short` with the reason `expired`.

The date of the food

After the “use by” date a food is deemed to be unsafe. WMS applies the date of every lot the same way: after its last day, a lot is not picked.

## One step back, one step forward

A food business must be able to identify who supplied it with a food and which businesses it supplied. WMS keeps what that needs: the receipt of a lot names the delivery, so the supplier; the movements of the lot name the tasks and the shipments, so the order and the customer it went to.

-   Back: the movement of kind `receipt` of the lot has the number of the delivery in `ref`.
-   Forward: the movements `pick`, `pack` and `dispatch` of the lot have the number of the task and of the shipment in `ref`, and the shipment is the one of an order.
-   Every movement is sent as [\`stock.moved\`](https://warehouse.rdcopilot.com/docs/events/event-catalogue/), so your own system can keep the same chain.
