When a UK retailer says "we will send you ORDHDR", it means purchase orders in TRADACOMS, the UK retail EDI standard. Waitrose, Ocado, Co-op, Asda, Boots and the M&S Food business all publish or describe TRADACOMS order flows, so if you supply UK grocery or high street retail, this is often the first EDI file you have to read.
ORDHDR is not one order. It is a file that can carry one order or several hundred, for one depot or every store in the estate. This guide shows how it is built, what each segment carries and how it maps to EDIFACT ORDERS.
What is a TRADACOMS ORDHDR file?
ORDHDR is the order file in TRADACOMS, the UK retail EDI standard first published in 1982 by the Article Numbering Association, now GS1 UK. The customer (usually a retailer) sends it to the supplier to place new orders, amend them or cancel them. The file takes its name from its first message, the ORDHDR order header.
TRADACOMS groups messages into files rather than sending each document on its own. Data that is the same for every order in the file, such as who the supplier and customer are, travels once in the header. Each order then follows as its own ORDERS message, and a trailer closes the file. The TRADACOMS overview covers the syntax and envelope in more depth.
ORDHDR file structure
An order file always has the same three-part shape, wrapped in the STX and END transmission envelope. Every message inside it opens with MHD and closes with MTR.
STX Start of transmission (sender, receiver, date, references)
│
├── MHD ORDHDR Order file header once per file
│ TYP SDT CDT FIL
│ MTR
│
├── MHD ORDERS Order details once per order, repeats
│ CLO ORD DIN
│ OLD OLD OLD ... one per product line
│ OTR lines in this order
│ MTR
│
├── MHD ORDTLR Order file trailer once per file
│ OFT orders in this file
│ MTR
│
END End of transmission (number of messages)
The order header, detail and trailer each have their own version number in MHD. Version 9 is the final release of the standard and is what Co-op's supplier guidelines specify ("the V9 Tradacoms format"), but older versions are still in use. M&S's own TRADACOMS purchase order guide, for example, shows ORDHDR:6, ORDERS:8 and ORDTLR:4 in the same file. Always build to the versions your partner names.
Example: a single order to a distribution centre
A fictional retailer, Harbour Lane Stores, orders three homeware lines from a fictional supplier, Kestrel Valley Homeware, for delivery to its northern distribution centre. All identifiers are made-up GS1-style numbers with valid check digits.
ORDHDR file with one order and three lines
New-order file (TYP 0430) for one distribution centre: ORDHDR header, one ORDERS message with three OLD lines, and the ORDTLR trailer.
ORDHDR · Order file header · ref 1
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Supplier SDT | 5098765000002GS1 GLN | KESTREL VALLEY HOMEWARE LTD |
| Customer CDT | 5012345000008GS1 GLN | HARBOUR LANE STORES LTD |
ORDERS · Order · ref 2
- Document
- Order
- Document number
- HL-PO-88340
- Order date
- 2026-10-12
- Earliest delivery date
- 2026-10-15
- Latest delivery date
- 2026-10-15
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Delivery location CLO | 5012345000107GS1 GLN | HARBOUR LANE NORTHERN DC |
Lines (3)
| # | GTIN | Codes | Description | Qty | Price | Amount (qty x price) |
|---|---|---|---|---|---|---|
| 1 | 5098765100016 | Supplier: KV-1001 | BAMBOO CHOPPING BOARD | 40traded unit of 6 | 9.0000 | 360.00 |
| 2 | 5098765100023 | Supplier: KV-1002 | SALT AND PEPPER MILL SET | 15traded unit of 4 | 14.2000 | 213.00 |
| 3 | 5098765100030 | Supplier: KV-1003 | BAMBOO UTENSIL SET | 10traded unit of 12 | 6.6000 | 66.00 |
ORDTLR · Order file trailer · ref 3
Transmission (STX)
- Sender
- HARBOUR LANE STORES LTDcode 5012345000008
- Recipient
- KESTREL VALLEY HOMEWAREcode 5098765000002
- Prepared
- 2026-10-12 06:15:00
- Control reference
- 000452
- Syntax
- ANA:1
- Messages
- 3
| Segment | What it says |
|---|---|
STX=ANA:1+... | Syntax ANA:1; sender and receiver as GLN plus name; transmission date and time (YYMMDD:HHMMSS); sender's reference 000452; receiver's reference (often a mailbox password); application reference ORDHDR; priority B |
MHD=1+ORDHDR:9' | Message 1 is the order header, version 9 |
TYP=0430+NEW-ORDERS' | Transaction code 0430: new orders |
SDT=5098765000002:000041207+... | Supplier: GLN, then the supplier number the retailer allocated, then the supplier's name |
CDT=5012345000008+... | Customer: GLN and name |
FIL=452+1+261012' | File generation number 452, version 1 (an original), created 12 October 2026 |
MTR=6' | Six segments in this message, counting MHD and MTR |
MHD=2+ORDERS:9' | Message 2 is an order |
CLO=5012345000107:00212+... | Delivery location: the DC's GLN, the retailer's own code for it, and its name |
ORD=HL-PO-88340::261012' | The retailer's order number and order date |
DIN=261015+261015++AM DELIVERY' | Earliest and latest delivery dates, plus a delivery instruction |
OLD=1+... | Order line 1: product, pack size, quantity, cost price, description (broken down below) |
OTR=3' | Three order lines in this order |
MTR=9' | Nine segments in the ORDERS message |
MHD=3+ORDTLR:9' / OFT=1' | Order file trailer: one order in the file |
END=3' | Three messages in the transmission |
Segment reference
The tables below follow the version 9 message layouts. "M" is mandatory and "O" optional in the standard; your partner's guide can make an optional segment mandatory for them. The EANCOM column gives the closest equivalent in the EDIFACT ORDERS message.
ORDHDR: order file header
| Segment | Name | Status | What it carries | EANCOM equivalent |
|---|---|---|---|---|
MHD | Message header | M | Message number and ORDHDR:version | UNH |
TYP | Transaction type | M | Code for the kind of orders in the file, such as 0430 new orders | BGM document code and function |
SDT | Supplier details | M | Supplier GLN and the supplier code the retailer uses | NAD+SU |
CDT | Customer details | M | Customer GLN and name | NAD+BY |
DNA | Data narrative | O | Coded or free-text notes for the whole file | FTX |
FIL | File details | M | File generation number, version and creation date | No direct equivalent; closest is the UNB control reference |
MTR | Message trailer | M | Segment count for the message | UNT |
ORDERS: one per order
| Segment | Name | Status | What it carries | EANCOM equivalent |
|---|---|---|---|---|
MHD | Message header | M | Message number and ORDERS:version | UNH |
CLO | Customer's location | M | Delivery point: GLN, retailer's own code, supplier's code for it | NAD+DP (or NAD+BY for a store) |
ORD | Order references | M | Customer's order number, supplier's order number, order date | BGM number and DTM+137 |
DIN | Delivery instructions | O | Earliest and latest delivery dates and free-text instructions | DTM+2, DTM+64 / DTM+63 |
DNA | Data narrative | O | Order-level notes and registered codes | FTX |
OLD | Order line details | M, repeats | Product, pack, quantity, price, description | LIN, PIA, QTY+21, PRI, IMD |
DNB | Data narrative | O, per line | Line-level notes, such as an original order line number | FTX at line level |
OTR | Order trailer | M | Number of OLD lines in this order | CNT+2 |
MTR | Message trailer | M | Segment count for the message | UNT |
ORDTLR: order file trailer
| Segment | Name | Status | What it carries | EANCOM equivalent |
|---|---|---|---|---|
MHD | Message header | M | Message number and ORDTLR:version | None |
OFT | Order file totals | M | Number of ORDERS messages in the file | None; the closest check is the UNZ message count |
MTR | Message trailer | M | Segment count for the message | None |
Reading the OLD order line
OLD is where the money is, so it is worth knowing position by position. The version 9 layout runs:
| Position | Field | In the example OLD=1+5098765100016:KV-1001+++6+40+90000+++BAMBOO CHOPPING BOARD:LARGE' |
|---|---|---|
| 1 | SEQA line number | 1 |
| 2 | SPRO supplier's product: EAN-13 (GTIN) of the traded unit, supplier's own code, DUN-14 | 5098765100016:KV-1001 |
| 3 | SACU EAN of the consumer unit | empty |
| 4 | CPRO customer's product: own-brand EAN, customer's item code | empty |
| 5 | UNOR consumer units in the traded unit, ordering measure, measure indicator | 6 (a case of six) |
| 6 | OQTY traded units ordered, total measure, measure indicator | 40 cases |
| 7 | OUCT cost price per traded unit, net of line discounts and before VAT | 90000 |
| 8 | PIND special price indicator | empty |
| 9 | TFIN to-follow indicator | empty |
| 10 | TDES description, two lines of 40 characters | BAMBOO CHOPPING BOARD:LARGE |
Three rules to apply when you map it:
- Quantity is in traded units, not consumer units.
OQTY40 withUNOR6 means 40 cases of 6, or 240 boards. Mixing the two up is the most common ORDHDR mapping bug. - Prices have no decimal point. TRADACOMS numbers carry implied decimals, and the number of places is set field by field in the specification your partner uses. In this example
OUCThas four implied places, so90000is £9.00 per case; the John Lewis Partnership's published TRADACOMS invoice specification, for instance, defines unit cost asn10.4. Confirm the precision before you load prices. - The product may be identified by the retailer's code, not your GTIN. M&S's order guide sends its own UPC in
CPROwith a placeholder inSPRO. Map both positions and match on whichever your partner populates.
Transaction codes in TYP
TYP tells you what kind of orders the file holds. The codes come from TRADACOMS code list 2; these are the ones order files use most:
| Code | Meaning |
|---|---|
0430 | New orders |
0440 | Order amendment: changes to an outstanding order; only amended products need to be sent |
0400 | Cancelled orders |
0450 | Copy orders: a copy of an order sent before |
0460 | Confirmation of an order placed by phone or fax |
0470 | Mixed order types: each order states its own type in ORD |
Partners sometimes use these codes their own way. M&S's purchase order guide labels 0430 as a customer order and uses 0460 for its standard orders, for example, so read the code against your partner's guide, not just the code list.
Example: one file, three store orders
Store-delivered suppliers usually receive one file per run with an order for each store. Here Harbour Lane sends three store orders in a single file. The supplier and customer appear once, in the header, and each store's order is its own ORDERS message with its own CLO. The file generation number has moved on to 453, one higher than the previous file.
Multi-store ORDHDR file with three orders
One ORDHDR header, three ORDERS messages (one per store, each with its own CLO and order number), and an ORDTLR trailer with OFT=3.
ORDHDR · Order file header · ref 1
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Supplier SDT | 5098765000002GS1 GLN | - |
| Customer CDT | 5012345000008GS1 GLN | - |
ORDERS · Order · ref 2
- Document
- Order
- Document number
- HL-PO-88341
- Order date
- 2026-10-12
- Earliest delivery date
- 2026-10-14
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Delivery location CLO | 5012345000114GS1 GLN | HARBOUR LANE LEEDS |
Lines (2)
| # | GTIN | Codes | Description | Qty | Price | Amount (qty x price) |
|---|---|---|---|---|---|---|
| 1 | 5098765100016 | Supplier: KV-1001 | BAMBOO CHOPPING BOARD | 4traded unit of 6 | 9.0000 | 36.00 |
| 2 | 5098765100047 | Supplier: KV-1004 | LINEN TEA TOWEL TWIN PACK | 3traded unit of 10 | 3.8000 | 11.40 |
ORDERS · Order · ref 3
- Document
- Order
- Document number
- HL-PO-88342
- Order date
- 2026-10-12
- Earliest delivery date
- 2026-10-14
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Delivery location CLO | 5012345000121GS1 GLN | HARBOUR LANE YORK |
Lines (1)
| # | GTIN | Codes | Description | Qty | Price | Amount (qty x price) |
|---|---|---|---|---|---|---|
| 1 | 5098765100016 | Supplier: KV-1001 | BAMBOO CHOPPING BOARD | 2traded unit of 6 | 9.0000 | 18.00 |
ORDERS · Order · ref 4
- Document
- Order
- Document number
- HL-PO-88343
- Order date
- 2026-10-12
- Earliest delivery date
- 2026-10-15
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Delivery location CLO | 5012345000138GS1 GLN | HARBOUR LANE HARROGATE |
Lines (2)
| # | GTIN | Codes | Description | Qty | Price | Amount (qty x price) |
|---|---|---|---|---|---|---|
| 1 | 5098765100023 | Supplier: KV-1002 | SALT AND PEPPER MILL SET | 1traded unit of 4 | 14.2000 | 14.20 |
| 2 | 5098765100047 | Supplier: KV-1004 | LINEN TEA TOWEL TWIN PACK | 2traded unit of 10 | 3.8000 | 7.60 |
ORDTLR · Order file trailer · ref 5
Transmission (STX)
- Sender
- HARBOUR LANE STORES LTDcode 5012345000008
- Recipient
- KESTREL VALLEY HOMEWAREcode 5098765000002
- Prepared
- 2026-10-12 06:30:00
- Control reference
- 000453
- Syntax
- ANA:1
- Messages
- 5
Load this as three orders in your ERP, not one. Each ORD number is a separate purchase order that your delivery notes and invoices must quote back. The equivalent in EANCOM would be three separate ORDERS messages, each repeating the buyer and supplier.
Example: an order amendment
A day later the retailer raises the mill set quantity on order HL-PO-88340 from 15 to 20 cases. With transaction code 0440, only the changed line is sent; lines 1 and 3 stand as they were.
ORDHDR amendment file (TYP 0440)
An order amendment that changes one line of an existing order. Only the amended OLD line is sent, keeping its original line number.
ORDHDR · Order file header · ref 1
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Supplier SDT | 5098765000002GS1 GLN | - |
| Customer CDT | 5012345000008GS1 GLN | - |
ORDERS · Order · ref 2
- Document
- Order
- Document number
- HL-PO-88340
- Order date
- 2026-10-12
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Delivery location CLO | 5012345000107GS1 GLN | HARBOUR LANE NORTHERN DC |
Lines (1)
| # | GTIN | Codes | Description | Qty | Price | Amount (qty x price) |
|---|---|---|---|---|---|---|
| 2 | 5098765100023 | Supplier: KV-1002 | SALT AND PEPPER MILL SET | 20traded unit of 4 | 14.2000 | 284.00 |
ORDTLR · Order file trailer · ref 3
Transmission (STX)
- Sender
- HARBOUR LANE STORES LTDcode 5012345000008
- Recipient
- KESTREL VALLEY HOMEWAREcode 5098765000002
- Prepared
- 2026-10-13 07:10:00
- Control reference
- 000454
- Syntax
- ANA:1
- Messages
- 3
Amendments are where automation pays for itself or goes wrong. Your system has to find the open order by its ORD number and replace line 2, not create a new order for 20 cases. In EANCOM the same change would usually arrive as an ORDCHG message.
ORDHDR to EANCOM ORDERS
If a retailer moves you from TRADACOMS to EANCOM, or you trade both, the business content is the same and the shape is different. TRADACOMS sends the parties once per file; EANCOM repeats them in every order.
| Business data | TRADACOMS order file | EANCOM ORDERS |
|---|---|---|
| Document type | TYP=0430 | BGM+220 |
| Order number | ORD first element | BGM second element |
| Order date | ORD date component | DTM+137 |
| Delivery date | DIN | DTM+2, or DTM+64 and DTM+63 for a window |
| Supplier | SDT (once per file) | NAD+SU (every message) |
| Buyer | CDT (once per file) | NAD+BY (every message) |
| Delivery point | CLO | NAD+DP |
| Product | OLD SPRO / CPRO | LIN GTIN and PIA codes |
| Pack size | OLD UNOR | QTY+59 or PAC |
| Quantity ordered | OLD OQTY | QTY+21 |
| Net price | OLD OUCT, implied decimals | PRI+AAA, explicit decimal |
| Line count | OTR | CNT+2 |
| Orders in the file | OFT | None; each message stands alone |
The X12 counterpart is the 850 purchase order. For the full TRADACOMS to EANCOM picture across every file type, see TRADACOMS file types.
Which UK retailers send ORDHDR
Retailers change their EDI setups, so treat this as a starting point and confirm with each partner's EDI team.
- Waitrose and Ocado exchange orders as ORDHDR and invoices as INVFIL in TRADACOMS, according to ecosio's onboarding guides. See the Waitrose and Ocado pages.
- Co-op exchanges purchase orders, ASNs, invoices and credit notes in TRADACOMS version 9, per its own supplier guidelines. See the Co-op page.
- M&S publishes a TRADACOMS ORDHDR purchase order guide for its Food suppliers through its GXS (now OpenText) portal. See the Marks & Spencer page.
- Asda supports TRADACOMS for orders, invoices, credit notes and remittances, per ecosio. See the Asda page.
- Boots trades in TRADACOMS, with purchase orders and invoices the common message set, per Cegedim. See the Boots page.
Common ORDHDR errors
The free EDIFACT inspector catches the first three automatically.
- MTR counts that leave out MHD or MTR. The count in
MTRincludes both. An ORDERS message withCLO,ORD,DIN, threeOLDandOTRhas nine segments, not seven. - END counting orders instead of messages.
ENDcounts everyMHDin the transmission, header and trailer included. A file with three orders hasEND=5, notEND=3. - MHD numbers out of sequence. Messages are numbered 1, 2, 3 through the whole transmission. Restarting at 1 for each order fails the sequence check most translators run.
- OTR or OFT that do not match.
OTRmust equal the number ofOLDlines in that order, andOFTthe number ofORDERSmessages in the file. A mismatch usually means a truncated file. - Skipped or repeated file generation numbers.
FILgeneration numbers run in sequence per file type and per trading partner. Receivers use them to spot missing files, and some reject files that arrive out of sequence. If you see a gap, ask for the missing file before you pick. - Cases loaded as units. See the
OQTYandUNORnote above. Check the first live orders line by line against the retailer's portal or a PDF copy.
How OrderSync handles ORDHDR
OrderSync reads ORDHDR files directly, alongside EDIFACT and EANCOM, X12, PDF, CSV and email orders. Each ORDERS message becomes its own order, with the delivery location from CLO and quantities converted from traded units using UNOR, before anything reaches your ERP.
Frequently Asked Questions
What is ORDHDR in EDI?
ORDHDR is the TRADACOMS order file used in UK retail. Strictly, it is the header message that opens the file, but the whole order file is usually called ORDHDR. It contains an ORDHDR header, one ORDERS message for each purchase order, and an ORDTLR trailer.
What is the difference between ORDHDR and ORDERS?
ORDHDR is the file header, sent once, with the supplier, customer and file number. ORDERS is the detail message, sent once per purchase order, with the delivery location, order number and lines. Confusingly, EDIFACT also has a message called ORDERS, but it is a different format.
What does the OLD segment contain?
OLD is the order line. It carries the line number, the product codes (your GTIN or own code, and the retailer's code), the number of consumer units per traded unit, the quantity of traded units ordered, the cost price per traded unit and a description.
What is the EDIFACT equivalent of ORDHDR?
The EANCOM ORDERS message, with document code BGM+220. Amendments that TRADACOMS sends as ORDHDR files with transaction code 0440 usually map to the EANCOM ORDCHG message.
Do I have to acknowledge an ORDHDR file?
Only if your partner asks for it. TRADACOMS has an acknowledgement of order file (ACKHDR), but many UK retailers do not use it. Check your partner's specification for any order response or confirmation they expect.
Related guides
- TRADACOMS explained: syntax, STX and END, and how files work
- TRADACOMS file types: every file type and its EANCOM equivalent
- TRADACOMS INVFIL: the invoice file you send back
- TRADACOMS DLCHDR: the delivery confirmation that tells you what was received
- EDIFACT ORDERS: the EANCOM purchase order
Sources
- TRADACOMS release 9 ORDERS and OLD layouts, KA Software schema reference
- M&S Purchase Order implementation guide (TRADACOMS ORDHDR), Marks & Spencer via GXS
- Co-op supplier guidelines, Co-op
- EDI - Tradacoms invoice specifications, John Lewis Partnership
- Waitrose EDI: where to start and Setting up an EDI connection with Ocado, ecosio
- Ending support for TRADACOMS, GS1 UK
- TRADACOMS, Wikipedia
Check an ORDHDR file's structure and counts in the free EDIFACT inspector.