reference

X12 envelope — ISA / GS / ST / SE / GE / IEA

The wrapper segments that all X12 transactions live inside.

Every X12 interchange starts with ISA and ends with IEA. Between them sit one or more functional groups (GS…GE), each containing one or more transactions (ST…SE).

ISA (Interchange Control Header)

Fixed-width, 106 characters. Sets delimiters, sender/receiver qualifiers + IDs, date, time, control number, usage indicator (P/T).

GS (Functional Group Header)

Groups same-type transactions. GS01 is the functional code (PO, HC, HP, FA).

ST / SE

ST opens one transaction; SE closes it. SE01 must equal the number of included segments including ST and SE.