Use case

Food labels: dates, lots and allergens, and how they print

A kitchen label says what a food is, what is in it and when to use it by; a case label carries a lot and a date a warehouse can read. Regulators set what a food label must show, and they differ by country. BarcoderX prints the label from the recipe and production data it is given. It does not decide allergens or shelf life, and it certifies nothing.

What is built today: Status

The labels at a glance

FSA is the UK Food Standards Agency, GS the GS1 General Specifications. Gray references point to the sources listed at the end. The case label uses a string GS1 prints as an example; the other data is invented.

The documents cited below are the authority on what these labels carry; this page summarizes, in our own words, the parts we read. BarcoderX prints the label from the data it is given. It does not issue identifiers, check that a label matches a person or a product, scan or verify barcodes, report to any regulator, or certify, approve or validate a label under any rule.

Schematic of two food labels: a prepared-food label and a case label Two labels, one above the other. The top one is a prepared-food label. 1 The name of the food. 2 An ingredient list in which the allergens wheat, egg and milk are in bold capitals. 3 A use-by date. The bottom one is a case label. 4 Three lines with their data titles: GTIN, use by and batch or lot, with the values 13112345678906, 010615 and A123456. 5 A barcode with the whole string as readable text. The bars are decorative and not scannable, and all data is invented or taken from an example in the GS1 General Specifications. Example sandwich Ingredients: bread (WHEAT flour), EGG, MILK, lettuce, salt. USE BY 15 JUN 1 2 3 EXAMPLE CASE GTIN (01) 13112345678906 USE BY (17) 010615 BATCH/LOT (10) A123456 (01)13112345678906(17)010615(10)A123456 4 5
Schematic, not scannable. Two food labels. The top one follows the shape of the rule for food packed before sale in England, Northern Ireland and Wales; the bottom one is a GS1-128 case label.
  1. Name of the foodIn England, Northern Ireland and Wales, the label of food prepacked for direct sale shows the name of the food. FSA-L; FSA-T 101
  2. Ingredients, allergens emphasizedThe 14 allergens the law names are emphasized every time they appear in the ingredients list: bold, capitals, contrasting colors or underlining. FSA-T 101; FSA-L
  3. Use-by dateA date your kitchen sets under its own food-safety procedures. We cite no rule for it.
  4. Data titles and valuesGS1 suggests the titles BATCH/LOT and USE BY or EXPIRY. GS 3.4.1, 3.4.7
  5. BarcodeGS1-128 can hold the three fields. The lot varies in length, and GS1 recommends putting it last. GS 7.8.3, Table 7-6; 7.8.6.2, 7.8.6.3

Kitchen prep, use-by and allergen labels

A prep label is the small label on a container in a kitchen: the item, when it was made and when to use it by. The use-by date comes from the kitchen's own food-safety procedures, and we cite no regulation for it. Your application works the date out; BarcoderX prints it.

Both kinds are typically printed on demand, in the kitchen. For allergen and ingredient labels, your application passes the recipe's ingredient list, with its allergens flagged, to the template.

What the rules say, country by country

  • England, Northern Ireland and Wales (Food Standards Agency). PPDS food is food packed before it is offered for sale by the same food business to the final consumer: on the same premises or site, or from movable or temporary premises. FSA-T 94 Food packed in anticipation of an order is PPDS; food packed after the customer orders it is not. FSA-T 97, 98 A PPDS label shows the name of the food and an ingredients list in which the 14 allergens are emphasized every time they appear. FSA-T 101; FSA-L Food Standards Scotland publishes separate guidance, which we have not read. FSA-L
  • United States (FDA). The Food Traceability Rule is a recordkeeping rule. People who manufacture, process, pack or hold foods on the Food Traceability List keep records with key data elements for critical tracking events. FDA, At-a-Glance FDA defines a traceability lot code as an often alphanumeric descriptor that identifies a traceability lot within the records of the firm that assigned it. FDA, Traceability Lot Code Read the page, with its sections on dates and exemptions, and 21 CFR Part 1, Subpart S.
  • Mexico (NOM-051). The modification to NOM-051-SCFI/SSA1-2010 published in the Diario Oficial de la Federación on March 27, 2020 sets the commercial and health information on prepackaged food and non-alcoholic drinks sold to the final consumer, and a front-of-pack warning system. It says it does not apply to bulk products or to products packed at the point of sale. NOM 1 The warning seals are set by numeral 4.5.3.4 and normative Appendix A, which fix their wording, shape and size; this page does not reproduce them. NOM 4.5.3.4, App. A The lot and date may go anywhere on the package. NOM 4.7.1.3
  • Colombia (Resolución 810 de 2021). The Ministerio de Salud y Protección Social's resolution sets nutrition and front-of-pack warning labeling for packaged food and drink for human consumption sold in Colombia, with listed exceptions. R810 art. 1, 2 Resolución 2492 de 2022 amended it, including article 32 on the warning seals. R2492 art. 5 The seals' wording, shape, size and placement come from that article; this page does not reproduce them.

None of these documents says what BarcoderX must do. We give no dates for when any of them applies; the cited texts have their own.

Date and lot coding on cases

Cases of packaged goods often carry a GS1-128 barcode with the product's GTIN, a lot and a date. Each field starts with an Application Identifier. GS 3.2, Table 3-1 The batch or lot is AI (10): alphanumeric, up to 20 characters, with the data title BATCH/LOT. GS 3.4.1

The dates are six digits, year, month and day: AI (11) production date, (13) packaging date, (15) best before, (16) sell by and (17) expiration date. GS 3.4.2, 3.4.4 to 3.4.7 If the day is not needed it is filled with two zeroes and read as the last day of the month. GS 3.4.2

GS1 prints this string in a figure of a GS1 DataBar Limited Composite symbol: a GTIN, an expiration date and a lot, (01)13112345678906(17)010615(10)A123456. GS 5.11.2, Figure 5-53 We use it only to show the order of the fields. The date 010615 is year 01, month 06, day 15. GS 3.4.7; 7.8.3, Table 7-6; 7.8.6.3

More in the GS1-128 explainer.

Which barcodes, and why

Barcodes on food labels and the edition each needs
BarcodeRoleEdition
GS1-128The GTIN with a lot and a date on a case, as above. GS 3.2, 3.4Basic
Code 128A kitchen's own item or batch code. Not a GS1 structure.Basic
Data Matrix or QR CodeIf a scanner or a partner asks for a 2D symbol.Ultimate

BarcoderX has the Application Identifier dictionary, per-identifier validation, check digits, and SSCC and GTIN helpers built in; you enter data in brackets or with FNC1 and the check digit is computed for you. GS1 built in Check digit calculator

The data it needs

Fields on a food label, a sample value and where each goes
FieldSample valueWhere it goes
IngredientsBread (WHEAT flour), EGG, MILK, lettuce, saltThe ingredients list, from the recipe database, with the allergens emphasized. FSA-T 101
Use-by or best-before date15 JUN, or 010615 in a barcodePrinted text; in a GS1-128, AI (17) or AI (15). GS 3.4.5, 3.4.7
LotA123456AI (10), up to 20 characters. GS 3.4.1

The ingredient list and the allergen flags come from your recipe database through your application; BarcoderX binds them into the template. The values come from objects, a DataTable, CSV, JSON or XML. Templates and data

Ingredient names with accents print right only if the font has the glyphs. Fonts and accents

How it reaches the printer

The printer commands are the same on both routes, and both run on infrastructure you operate.

  • Direct, from your application. The SDK packages send the printer commands from your own .NET process over TCP port 9100, serial, the Windows spooler, CUPS or USB. No API server and no agent is in the path.
  • Through your API server. Your application queues a print job through the REST API on your API server. A print agent on the printer's network collects it and writes it to the printer beside it. The agent only dials out, so the printer network needs no inbound port.

Kitchen labels are printed when a prep is logged and case labels when a case is packed; in both cases your own application starts the print. Delivery to the agent is at-least-once and the agent de-duplicates by job id, so a reconnect does not print a label twice, and a retried request with an idempotency key does not queue a second label.

Which edition covers it

EditionsBasic covers the linear (1D) and postal symbologies, including every GS1 DataBar variant; Ultimate adds the PDF417 family, other multi-row symbologies, every matrix (2D) symbology and GS1 composites, as set out on the pricing page.

GS1-128 and Code 128 are in Basic, since the pricing page lists them under linear barcodes. A Data Matrix or QR Code is a matrix (2D) symbology and needs Ultimate.

The ZPL behind it

The printer commands come from the template. These are the ZPL commands behind labels like these.

^BC
Prints a Code 128 barcode.
^FB
Formats text as a block with word wrap, for an ingredient list.
^FO
Places each field.
^FD
Holds the data of a field.
^PQ
Sets how many labels print.

What BarcoderX does not do here

  • No allergen or shelf-life decisions. Which allergens a recipe contains and how long a food keeps come from your recipe database and your food-safety plan.
  • No warning-seal artwork. The seals' wording, shape and size come from the regulation, and this page and BarcoderX's pages do not reproduce them.
  • No traceability records. BarcoderX does not keep records for a regulator or send them. Nothing is hosted for you.
  • No certification. BarcoderX does not certify, approve or validate a label under any food rule, and does not report to any regulator.

New to the printer language? Read the ZPL guides and command reference.

Sources

FDA: FSMA Final Rule on Requirements for Additional Traceability Records for Certain Foods
U.S. Food and Drug Administration, content current as of November 4, 2026. At-a-Glance and Traceability Lot Code. The rule text, 21 CFR Part 1, Subpart S, was not read. https://www.fda.gov/food/food-safety-modernization-act-fsma/fsma-final-rule-requirements-additional-traceability-records-certain-foods
MODIFICACIÓN a la Norma Oficial Mexicana NOM-051-SCFI/SSA1-2010 (NOM)
Secretaría de Economía, Diario Oficial de la Federación, March 27, 2020. Numerals 1, 4.5.3.4 and 4.7.1.3, Apéndice A. Later changes were not reviewed. https://dof.gob.mx/2020/SEECO/NOM_051.pdf
Resolución 810 de 2021 (R810)
Ministerio de Salud y Protección Social, June 16, 2021. Articles 1 and 2, read in the Ministry's scanned PDF. https://www.minsalud.gov.co/sites/rid/Lists/BibliotecaDigital/RIDE/DE/DIJ/resolucion-810-de-2021.pdf
Resolución 2492 de 2022 (R2492)
Diario Oficial No. 52.247, December 14, 2022; modifies articles 2, 3, 16, 25, 32, 37 and 40 of Resolución 810; article 5 amends article 32. Read on Invima's legal compilation. https://normograma.invima.gov.co/compilacion/docs/resolucion_minsaludps_2492_2022.htm
Resolución 254 de 2023 (R254)
Diario Oficial No. 52.317, February 23, 2023; corrects articles 5, 6 and 7 of Resolución 2492. Read on Invima's legal compilation. https://normograma.invima.gov.co/compilacion/docs/resolucion_minsaludps_0254_2023.htm
GS1 General Specifications Standard (GS)
Release 26.0, ratified January 2026. Sections 3.2 (Table 3-1), 3.4.1 to 3.4.7, 5.11.2, 7.8.3, 7.8.6. https://ref.gs1.org/standards/genspecs/

Written by BarcoderX in its own words; not a publication of the bodies named above, whose documents are the authority. Read on November 14, 2026. Check the current edition before you rely on a detail.

ZPL and ZPL II are trademarks of Zebra Technologies Corporation. BarcoderX is an independent product and is not affiliated with, endorsed by or sponsored by Zebra Technologies.