Free tool · EDI viewer

EDI 850 purchase order explained

The 850 is the purchase order in ANSI X12. Below is a complete 850 with every segment explained, a table of the segments you will meet, and the EDIFACT ORDERS message that carries the same order. The viewer shows the sample as an order table; paste your own file to read it the same way.

ANSI X12 · 004010

850 · Purchase order

From HARBORIND to BRIGHTLINE · 2026-11-03 10:15

Messages
1
Line items
3
Segments
24
Errors / Warnings
0 / 0

All checks passed: control numbers match and the segment counts are right.

Interchange 000000101Version 00401Test dataSeparators: segment ~ · element * · component >
850

Purchase order

PO number 4500012345 · 2026-11-03

Purpose
00Original
Order type
SAStand-alone order
Currency
USD

Parties

  • BY BuyerHarbor Industrial SupplyBuyer's code: HIS-001
  • ST Ship-toHarbor Industrial Supply DC 21200 Example AvenueSpringfield, IL 62701, USBuyer's code: DC02
  • SE SellerBrightline Tools Inc.Buyer's code: V-20417
Delivery requested
2026-11-17
Department
038
Line items of Purchase order 4500012345
LineBuyer item no.Supplier item no.GTIN / UPCDescriptionQtyUnitUnit priceAmountDate
100234BLT-M8-40012345678905Hex bolt M8 x 40 mm, zinc plated120EA0.42$50.40 (calculated as quantity × price)
100871GLV-NIT-LNitrile gloves, size L, box of 10040BX11.85$474.00 (calculated as quantity × price)
104552DRL-18V-KCordless drill 18 V, kit with 2 batteries6EA139.00$834.00 (calculated as quantity × price)2026-11-24
3 lines
$1,358.40

* calculated as quantity × price

Annotated sample

An EDI 850, line by line

This 850 orders three items from a tool supplier. Each segment ends with ~, elements are separated by *, and an empty element leaves two * next to each other. The envelope (ISA, GS) wraps the order itself, which runs from ST to SE.

X12 850What it says
Envelope
ISA*00* *00* *ZZ*HARBORIND *ZZ*BRIGHTLINE *261103*1015*U*00401*000000101*0*T*>~Interchange header. Sender HARBORIND, receiver BRIGHTLINE, 3 Nov 2026 at 10:15, version 00401, control number 000000101, T for test data. The character after ISA (*) separates elements, the last one (>) separates components.
GS*PO*HARBORIND*BRIGHTLINE*20261103*1015*101*X*004010~Functional group. PO says the group holds purchase orders; 101 is the group control number, 004010 the X12 version.
ST*850*0001~Start of transaction set 850 with control number 0001.
Order header
BEG*00*SA*4500012345**20261103~Order header. 00 = original order, SA = stand-alone order, PO number 4500012345, PO date 3 Nov 2026. The empty element in between is the release number.
CUR*BY*USD~Currency. BY = the buyer's currency, US dollars.
REF*DP*038~Reference. DP = department, here 038.
PER*BD*Dana Whitfield*TE*5550142~Contact. BD = buyer, Dana Whitfield; TE = telephone number.
DTM*002*20261117~Date for the whole order. 002 = delivery requested, 17 Nov 2026.
Parties
N1*BY*Harbor Industrial Supply*92*HIS-001~Party. BY = buyer. 92 says the ID that follows (HIS-001) is the buyer's own code.
N1*ST*Harbor Industrial Supply DC 2*92*DC02~Party. ST = ship-to, the distribution center DC02. The N3 and N4 below belong to it.
N3*1200 Example Avenue~Street of the ship-to address.
N4*Springfield*IL*62701*US~City, state, ZIP code and country of the ship-to address.
N1*SE*Brightline Tools Inc.*92*V-20417~Party. SE = seller. V-20417 is the supplier number the buyer uses.
Order lines
PO1*1*120*EA*0.42**VP*BLT-M8-40*BP*100234*UP*012345678905~Line 1: 120 EA (each) at 0.42. Then item numbers in pairs of type and value: VP = vendor's part number, BP = buyer's part number, UP = UPC.
PID*F****Hex bolt M8 x 40 mm, zinc plated~Description of line 1. F = free-form text.
PO1*2*40*BX*11.85**VP*GLV-NIT-L*BP*100871~Line 2: 40 BX (boxes) at 11.85, with the vendor's and the buyer's part number.
PID*F****Nitrile gloves, size L, box of 100~Description of line 2.
PO1*3*6*EA*139.00**VP*DRL-18V-K*BP*104552~Line 3: 6 EA at 139.00.
PID*F****Cordless drill 18 V, kit with 2 batteries~Description of line 3.
DTM*002*20261124~A date inside the line loop: line 3 is wanted on 24 Nov 2026, a week after the rest.
Totals and envelope end
CTT*3*166~Totals. 3 lines; 166 is the sum of the ordered quantities (120 + 40 + 6), a check value.
SE*20*0001~End of the transaction set. 20 segments from ST to SE; 0001 matches the ST.
GE*1*101~End of the group: 1 transaction set, control number 101 as in the GS.
IEA*1*000000101~End of the interchange: 1 group, control number 000000101 as in the ISA.

Segment reference

Segments of the 850

Which segments an 850 carries is set by the trading partner's implementation guide. These are the ones you will see most, described in our own words. Rows marked as not in the sample are common but optional.

SegmentNameWhat it holds
ISA / IEAInterchange envelopeSender and receiver IDs, date and time, version, control number, a test or production flag, and the separators.
GS / GEFunctional groupGroups messages of one kind (PO here) with application codes and a group control number.
ST / SETransaction setStart and end of one purchase order. SE counts the segments in between.
BEGOrder headerPurpose (new, cancellation, change), order type, PO number and PO date.
CURCurrencyCurrency code and whose currency it is.
REFReferenceExtra numbers such as department, contract or project. A qualifier says which one.
PERContactName and phone number or email of a contact.
FOBFreight terms
not in the sample
Who pays the freight and where responsibility for the goods passes.
ITDPayment terms
not in the sample
Discount percentage, discount days and net days.
DTMDateRequested delivery, ship or cancel-after dates, for the order or one line.
TD5Carrier
not in the sample
Carrier, routing and transport method.
N1, N3, N4Party loopOne party per N1 (buyer, ship-to, bill-to, seller) with ID, name and address.
PO1Order lineLine number, quantity, unit, unit price and up to ten pairs of item number type and value.
PIDItem descriptionDescription of the line as free text or as a code.
SACCharges and allowances
not in the sample
Freight, handling or discounts for the order or one line.
CTTTotalsNumber of lines and, optionally, the sum of the quantities as a check.

EDIFACT counterpart

The EDIFACT counterpart: ORDERS

Outside North America the same order usually travels as a UN/EDIFACT ORDERS message. It carries the same content in other segments: one NAD instead of the N1 loop, and LIN, QTY and PRI instead of PO1. Elements are separated by + and :, and each segment ends with an apostrophe.

X12 850EDIFACT ORDERSWhat it carries
ISA, GSUNA, UNBEnvelope: separators, sender, receiver, date and interchange reference. A group level (UNG) is rare in EDIFACT.
ST / SEUNH / UNTStart and end of the message. UNT counts the segments.
BEGBGM, DTMBGM carries the document type (220 = order) and the order number, DTM 137 the order date.
DTMDTMOther dates with their own qualifiers, for example 2 = delivery requested.
REFRFFReferences such as a contract number (CT).
PERCTA, COMContact and phone number or email.
CURCUXCurrency.
N1, N3, N4NADOne NAD holds the party's role, ID, name and address. BY = buyer, SU = supplier, DP = delivery party.
PO1LIN, PIA, QTY, PRILIN starts the line and carries the GTIN, PIA other item numbers, QTY 21 the ordered quantity and PRI the price.
PIDIMDItem description.
MSG, NTEFTXFree text, for example delivery instructions.
CTTUNS, CNTUNS separates the lines from the summary; CNT 2 counts the lines.
GE, IEAUNZEnd of the interchange with the number of messages and the reference from UNB.

EDIFACT ORDERS sample

UNA:+.? '
UNB+UNOC:3+4012345000009:14+4012345000016:14+261103:1015+ORD0001'
UNH+1+ORDERS:D:96A:UN:EAN008'
BGM+220+PO-88231+9'
DTM+137:20261103:102'
DTM+2:20261117:102'
FTX+AAI+++Please deliver to gate 3?: mornings only'
RFF+CT:RV-2026-07'
NAD+BY+4012345000009::9++Kessler Antriebstechnik GmbH+Industriestrasse 14+Musterstadt++12345+DE'
NAD+SU+4012345000016::9++Weber Fluidtechnik GmbH+Am Hafen 3+Beispielhausen++54321+DE'
NAD+DP+4012345000023::9++Kessler Antriebstechnik GmbH Werk 2+Lagerweg 7+Musterstadt++12347+DE'
CUX+2:EUR:9'
LIN+1++4012345111118:EN'
PIA+5+HS-12-2000:SA+70045:IN'
IMD+F++:::Hydraulic hose DN 12, 2000 mm'
QTY+21:25:PCE'
PRI+AAA:18.40:CA::1:PCE'
LIN+2++4012345222227:EN'
PIA+5+OR-SET-NBR:SA'
IMD+F++:::O-ring set NBR, 382 pieces'
QTY+21:4:SET'
PRI+AAA:46.90:CA::1:SET'
LIN+3++4012345333336:EN'
PIA+5+MAN-100-G14:SA'
IMD+F++:::Pressure gauge 0-100 bar, G 1/4'
QTY+21:10:PCE'
PRI+AAA:23.75:CA::1:PCE'
UNS+S'
CNT+2:3'
UNT+28+1'
UNZ+1+ORD0001'

Choose “EDIFACT ORDERS” in the viewer's sample menu above to read this message as a table.

Orders by email and PDF

Not every customer can send EDI.

EDI works for the large accounts that have set it up. Most other customers still send purchase orders by email, as a PDF or as a spreadsheet, and someone types them into the ERP. Mercura reads those orders and creates the sales order in your ERP, so they are processed like the orders that come in over EDI.

FAQ

Questions about EDI files.

An EDI 850 is a purchase order in the ANSI X12 standard. The buyer's system sends it to the supplier's system with the PO number and date, the parties, one PO1 segment per order line and a CTT segment with the number of lines.

The supplier usually answers with a 997 functional acknowledgment (the file arrived and could be read), then an 855 purchase order acknowledgment (what will ship and when), an 856 ship notice when the goods leave, and an 810 invoice.

The 850 is the original order. The 860 changes an order that was already sent, for example a quantity, a date or a cancelled line. An 850 with 01 in BEG01 cancels the whole order.

ORDERS. It holds the same information: BGM and DTM for the order header, NAD for the parties, and LIN, QTY and PRI for each line.

Paste the file into the viewer on this page or open it from your computer. It shows the order as a table and exports the lines to Excel, CSV or JSON. The file is read in your browser and not uploaded.

Many customers still send purchase orders by email or as a PDF. Mercura reads those orders and creates the sales order in your ERP, next to the 850s that come in over EDI.

Book a demo

See Mercura on

your own orders.

Bring a purchase order that your team keys in by hand, from email or PDF. We’ll show you how Mercura reads it and creates the sales order in your ERP.

Book a demo

See Mercura on

your own orders.

Bring a purchase order that your team keys in by hand, from email or PDF. We’ll show you how Mercura reads it and creates the sales order in your ERP.

Book a demo

See Mercura on

your own orders.

Bring a purchase order that your team keys in by hand, from email or PDF. We’ll show you how Mercura reads it and creates the sales order in your ERP.