> ## Documentation Index
> Fetch the complete documentation index at: https://docs.closient.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Recall-Ready QR Codes

> Turn the GS1 QR code Closient sends you into recall-ready labels by printing the lot, serial and expiration date in every code from one template, and print it at a size that scans.

The GS1 QR code Closient sends you carries your product's GTIN as a [GS1 Digital Link](https://www.gs1.org/standards/gs1-digital-link). Every unit printed with it scans to the same product page. That is enough to replace a UPC, but not enough to recall one run without recalling them all: a scanner can only tell which units are affected if the code says which run each unit came from.

This page shows how to put that information in the code, using one template your label software fills in per run, and how big to print it.

## What to put in the code

| AI | Meaning | Where it goes | Example |
| - | - | - | - |
| `01` | GTIN | Path | `/01/09520123456788` |
| `10` | Lot (batch) | Path, after the GTIN | `/10/L2611A` |
| `21` | Serial number | Path, after the lot | `/21/000123` |
| `17` | Expiration date, `YYMMDD` | Query string | `?17=271231` |
| `15` | Best-before date, `YYMMDD` | Query string | `?15=270630` |
| `416` | GLN of the production site | Query string | `?416=9520123000005` |

The lot and serial identify *which* units you made, so they are key qualifiers and go in the path. Dates and the production site describe the units, so they go in the query string after `?`. Join more than one with `&`.

The lot and serial each take up to 20 characters of letters, digits and a few punctuation marks. Spaces are not allowed.

Most food, beverage and cosmetics products are lot-managed: put the lot and a date in every code, and add a serial only when you genuinely track individual units. [Lot-Scoped Recalls](https://docs.closient.com/guides/lot-scoped-recalls.md) explains which identifiers a recall needs and why.

## One template, every run

The email Closient sends includes a template like this, with your own resolver host:

```
https://id.closient.com/01/{gtin}/10/{lot}/21/{serial}?17={expiry}
```

Bind your label or packaging software to it once. For each production run it fills in the lot, serial and expiration date, and prints a unique, recall-ready QR code without anyone redrawing artwork. Leave out the parts you don't track: drop `/21/{serial}` for lot-managed goods, or swap `17` for `15` if you print a best-before date instead.

A filled-in code for one unit looks like this:

```
https://id.closient.com/01/09520123456788/10/L2611A/21/000123?17=271231
```

Characters outside letters and digits in a lot or serial are percent-encoded in the link (a `/` becomes `%2F`). Most label software that supports GS1 Digital Link does this for you.

## How big to print it

The PDF in the email shows your QR code at three sizes, each drawn at true size so you can measure it on paper:

| | X-dimension (one module) | What it means |
| - | - | - |
| Minimum | 0.396 mm | The smallest GS1 allows for retail scanning. Below this, scanners fail. |
| Recommended | 0.495 mm | The target. Use this unless the pack is too small. |
| Maximum | 0.990 mm | The largest GS1 allows. Bigger codes don't scan better. |

The finished size depends on how much the link holds: a code carrying a lot, serial and date has more modules than one carrying only the GTIN, so it is larger at the same X-dimension. Always size from the code you will actually print. Each size in the PDF includes the quiet zone, the blank margin a scanner needs around the code; keep it clear of other artwork.

Print the PDF at 100% (actual size), never "fit to page", or the sizes on it are wrong.

[QR Code Sizing](https://docs.closient.com/user-guides/qr-code-sizing.md) covers the X-dimension in more depth.

## What else is in the email

* **The same link as a GS1 DataMatrix**, for packs where a square code doesn't fit. It encodes exactly the same Digital Link.
* **Your linear barcode** (EAN-13, UPC-A or ITF-14, whichever your GTIN takes) at 100% magnification. Keep it on the pack while checkouts still scan 1D barcodes.
* **SVG files** of each QR code at the recommended size, for your designer.

## Checking a code

Scan the code in the email with any phone camera. It should open your product's page on Closient. A code carrying a lot or serial passes them through to the page, which is what lets a lot-scoped recall reach the people who scan an affected unit; [Lot-Scoped Recalls](https://docs.closient.com/guides/lot-scoped-recalls.md) covers how recall status is resolved per lot.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.