// read x12
EDI Inspector
Read, decode and validate an X12 EDI document segment by segment.
Paste a document below to see every segment and element named and every code value spelled out. Invalid codes, values with the wrong length or format, and missing required segments are flagged on the line they occur on. For more on what the tool reads and what it checks, see The Tediware EDI Inspector farther down the page. No account needed.
850 Purchase Order
Sample document, decoded. 29 segments.
- ISA-01
- 00 Authorization Information Qualifier · No Authorization Information Present (No Meaningful Information in I02)
- ISA-03
- 00 Security Information Qualifier · No Security Information Present (No Meaningful Information in I04)
- ISA-05
- ZZ Interchange ID Qualifier · Mutually Defined
- ISA-06
- TEDIBUYER Interchange Sender ID
- ISA-07
- 01 Interchange ID Qualifier · Duns (Dun & Bradstreet)
- ISA-08
- WIDGETWORKS Interchange Receiver ID
- ISA-09
- 260101 Interchange Date
- ISA-10
- 0000 Interchange Time
- ISA-11
- U Interchange Control Standards Identifier · U.S. EDI Community of ASC X12, TDCC, and UCS
- ISA-12
- 00401 Interchange Control Version Number · Draft Standards for Trial Use Approved for Publication by ASC X12 Procedures Review Board through October 1997
- ISA-13
- 000000001 Interchange Control Number
- ISA-14
- 0 Acknowledgment Requested · No Acknowledgment Requested
- ISA-15
- T Usage Indicator · Test Data
- ISA-16
- } Component Element Separator
- GS-01
- PO Functional Identifier Code · Purchase Order (850)
- GS-02
- TEDIBUYER Application Sender's Code
- GS-03
- WIDGETWORKS Application Receiver's Code
- GS-04
- 20260101 Date
- GS-05
- 0000 Time
- GS-06
- 1001 Group Control Number
- GS-07
- X Responsible Agency Code · Accredited Standards Committee X12
- GS-08
- 004010 Version / Release / Industry Identifier Code
- ST-01
- 850 Transaction Set Identifier Code · Purchase Order
- ST-02
- 1001 Transaction Set Control Number
- BEG-01
- 00 Transaction Set Purpose Code · Original
- BEG-02
- SA Purchase Order Type Code · Stand-alone Order
- BEG-03
- TEDIPO0001 Purchase Order Number
- BEG-05
- 20260101 Date
- CUR-01
- BY Entity Identifier Code · Buying Party (Purchaser)
- CUR-02
- CAD Currency Code
- REF-01
- IA Reference Identification Qualifier · Internal Vendor Number
- REF-02
- 10000 Reference Identification
- REF-01
- 19 Reference Identification Qualifier · Division Identifier
- REF-02
- Ship to head office Reference Identification
- REF-01
- YD Reference Identification Qualifier · Buyer Identification
- REF-02
- 1 Reference Identification
- REF-01
- ZZ Reference Identification Qualifier · Mutually Defined
- REF-02
- No QC Hold, OK to Ship Reference Identification
- PER-01
- BD Contact Function Code · Buyer Name or Department
- PER-02
- Adrian Name
- FOB-01
- PP Shipment Method of Payment · Prepaid (by Seller)
- ITD-12
- 26 Description
- DTM-01
- 106 Date/Time Qualifier · Required By
- DTM-02
- 20260201 Date
- N9-01
- ZZ Reference Identification Qualifier · Mutually Defined
- N9-02
- GEN Reference Identification
- MSG-01
- THIS PURCHASE ORDER MUST BE FULFILLED ACCORDING TO THE VENDOR GUIDE AT https://tediware.com Free-Form Message Text
- MSG-01
- QUESTIONS ABOUT THIS ORDER? CONTACT INFO@TEDIWARE.COM. NO SUBSTITUTIONS OR BACKORDERS. Free-Form Message Text
- N1-01
- VN Entity Identifier Code · Vendor
- N1-02
- WIDGETWORKS LLC Name
- N3-01
- 1 INDUSTRIAL WAY Address Information
- N4-01
- PORTLAND City Name
- N4-02
- OR State or Province Code
- N4-03
- 97201 Postal Code
- N4-04
- US Country Code
- N1-01
- ST Entity Identifier Code · Ship To
- N1-02
- TEDIWARE HEAD OFFICE Name
- N1-03
- 92 Identification Code Qualifier · Assigned by Buyer or Buyer's Agent
- N1-04
- 400 Identification Code
- N1-06
- WH Entity Identifier Code · Warehouse
- N3-01
- 18 KING STREET EAST Address Information
- N3-02
- SUITE 1400 Address Information
- N4-01
- TORONTO City Name
- N4-02
- ON State or Province Code
- N4-03
- M5C1C4 Postal Code
- N4-04
- CA Country Code
- PO1-01
- 1 Assigned Identification
- PO1-02
- 36 Quantity Ordered
- PO1-03
- EA Unit or Basis for Measurement Code · Each
- PO1-04
- 10 Unit Price
- PO1-06
- SK Product/Service ID Qualifier · Stock Keeping Unit (SKU)
- PO1-07
- 0000001 Product/Service ID
- PO1-08
- VN Product/Service ID Qualifier · Vendor's (Seller's) Item Number
- PO1-09
- SKUTEDI1 Product/Service ID
- PO1-10
- UP Product/Service ID Qualifier · U.P.C. Consumer Package Code (1-5-5-1)
- PO1-11
- 000000000001 Product/Service ID
- PID-01
- F Item Description Type · Free-form
- PID-02
- 08 Product/Process Characteristic Code · Product
- PID-05
- WIDGET ASSEMBLY KIT Description
- PO4-01
- 36 Pack
- PO4-06
- 27 Gross Weight per Pack
- PO4-07
- LB Unit or Basis for Measurement Code · Pound
- PO4-10
- 10 Length
- PO4-11
- 15 Width
- PO4-12
- 12 Height
- PO4-13
- IN Unit or Basis for Measurement Code · Inch
- CTT-01
- 1 Number of Line Items
- SE-01
- 25 Number of Included Segments
- SE-02
- 1001 Transaction Set Control Number
- GE-01
- 1 Number of Transaction Sets Included
- GE-02
- 1001 Group Control Number
- IEA-01
- 1 Number of Included Functional Groups
- IEA-02
- 000000001 Interchange Control Number
The Tediware EDI Inspector
X12 is designed to be compact, not legible. A purchase order starts with
BEG*00*SA*TEDIPO0001**20260101 and getting
anything out of that line means knowing that the first element is a transaction set
purpose code where 00 means Original, that
the second is a purchase order type where SA
means Stand-alone Order, and that the last is a date in CCYYMMDD. That's no easy task!
The Inspector puts that knowledge into the document. It rewrites the interchange one
segment per line, names every segment and every element, and spells out what each coded
value means, so FOB*PP reads as Shipment
Method of Payment, Prepaid (by Seller).
It then checks the document against the X12 release its sender declared in
GS08. Every finding carries the line it
belongs to, so a violation points at the segment that caused it.
What the validator checks
The checks run against the base X12 reference for the sender's release, the same data behind the X12 reference pages.
- Element lengths, minimum and maximum. Digits only for numeric types, since a minus sign and a decimal point do not count toward an X12 length.
-
Data types. A numeric element has to be digits with
an optional leading minus, a decimal has to parse as one, a
DTelement has to be a real calendar date in CCYYMMDD or YYMMDD, and aTMelement has to be a valid time in HHMM, with seconds optional. -
Code lists. An
IDelement's value has to appear in the code list the standard defines for it. Where the reference holds no codes for an element, its values pass rather than all of them failing. - Mandatory content. Required segments, elements, composite components and loops, each reported against the container it is missing from.
- Repeat limits. A segment or a loop appearing more times than its position allows.
- Syntax rules. The paired, conditional, exclusive, required and list-conditional notes attached to a segment, named by rule and by the elements involved.
- Segments the parser rejected, with the reason it rejected them.
What it checks beyond the standard
A schema check can only speak about segments that reached the parse, so two further passes cover what it cannot see.
The framing pass compares the decoded document against the text it came from and reports
where the two stop describing the same file: the point the parser stopped reading, data
left sitting after the interchange trailer, elements dropped because a segment carried
more than the standard defines, and an ISA
whose fixed element widths are wrong. These are the faults that let a truncated file look
clean, because the part that never parsed produces nothing to check.
The envelope pass holds the document to its own claims. Every
ISA,
GS and
ST has to be closed by its trailer, each
trailer's control number has to match its header's, and the counts the trailers carry have
to be the counts actually present: segments in
SE01, transaction sets in
GE01, functional groups in
IEA01. The
Envelopes section of
the developer guide covers what those numbers are for.
Inspect from the terminal
The same inspection runs in a shell with the tedi CLI, which reads files on your own machine and builds no browser tree, so it takes documents up to 256KB:
tedi edi inspect invoice.edi # decode and validate a document
tedi edi obfuscate invoice.edi # replace personal data, runs locally
inspect prints the decoded document and its
findings, and takes --format markdown for
uncolored output you can pipe or redirect.
obfuscate replaces the personal data in a
document without leaving your machine, so a file can be cleaned before it goes anywhere.
Limits
| Signed out | Signed in | API key | |
|---|---|---|---|
| Per minute | 10 | 30 | 30 |
| Sustained | 30 an hour | 1,000 a day | 1,000 a day |
| Document size | 50KB | 100KB | 256KB |
| Verification | Per request | None | None |
Signed-out limits are counted per IP address, so an office behind one address shares them. Your document is sent to our server to be inspected, and it is not stored.
Sign in for higher limits
An account raises the limit to 30 documents a minute and 1,000 a day, takes documents up to 100KB, and drops the verification step before each one is inspected.
Related
To turn a document into JSON, use the EDI Translator. The developer guide covers X12 structure and how inbound and outbound processing work, and Anatomy of the Segment explains the data structure the Inspector decodes.