X12 is developed by the Accredited Standards Committee X12, which is accredited by the American National Standards Institute (ANSI), hence the name. It is the dominant EDI standard in the United States and Canada, used across retail, manufacturing, distribution, transportation and healthcare. Outside North America, EDIFACT is more common.
Every X12 document is a transaction set identified by a three-digit number: 850 for a purchase order, 856 for a ship notice/manifest, 810 for an invoice. A transaction set is made of segments (lines of related data, such as a name and address), and segments are made of data elements separated by delimiters. Transaction sets travel inside envelopes: the ISA/IEA interchange, the GS/GE functional group and the ST/SE transaction set.
X12 is published in numbered versions, such as 004010 and 005010, and most large buyers publish their own implementation guide that narrows the standard to what they require. That is why two companies can both “use X12” and still need separate maps and testing. Version and guideline differences are a common source of rejected documents and chargebacks.