X12
American National Standards Institute Accredited Standards Committee X12. Le standard EDI dominant en Amérique du Nord depuis 1979.
Qu'est-ce que X12 ?
X12 désigne à la fois le comité ASC X12 et l'ensemble des standards qu'il publie : un dictionnaire de transactions identifiées par un code à trois chiffres (850, 810, 856, 837…), un vocabulaire de segments et d'éléments, et une syntaxe d'enveloppe (ISA/IEA, GS/GE, ST/SE). Là où EDIFACT a été conçu sous l'égide de l'ONU pour couvrir l'échange international, X12 est né de l'industrie nord-américaine en 1979 pour répondre aux besoins de la grande distribution et du transport ferroviaire, puis s'est étendu à la santé, la finance et l'administration fédérale.
Les deux standards traitent les mêmes cas d'usage — commande, accusé, avis d'expédition, facture — avec une grammaire similaire faite de segments tagués et de séparateurs réservés. Ils diffèrent par leurs vocabulaires (BGM vs ST/BEG, NAD vs N1, LIN vs PO1) et par leur géographie : une chaîne logistique transatlantique passe presque systématiquement par une passerelle entre les deux standards.
Anatomie d'une transaction
Un échange X12 se compose de trois niveaux d'enveloppe imbriqués : l'interchange
(ISA / IEA), le functional group (GS /
GE) qui regroupe les transactions d'un même type, et le transaction set
lui-même (ST / SE). Le caractère tilde ~ termine chaque
segment et l'astérisque * sépare les éléments. Voici une commande 850 minimale :
ISA*00* *00* *ZZ*SENDERID *ZZ*RECEIVERID *260513*1430*U*00401*000000001*0*P*>~
GS*PO*SENDERID*RECEIVERID*20260513*1430*1*X*004010~
ST*850*0001~
BEG*00*SA*PO78901**20260513~
N1*BY*ACME RETAIL*92*0001~
N1*ST*ACME WAREHOUSE*92*0042~
PO1*1*2*EA*9.99**UP*012345678905~
CTT*1~
SE*7*0001~
GE*1*1~
IEA*1*000000001~
L'enveloppe ISA est de longueur fixe et contient les identifiants d'expéditeur
et de destinataire, la date, l'heure, le numéro de contrôle d'interchange, l'indicateur
de test ou de production, et le caractère qui terminera l'ISA lui-même —
ici >. Le GS indique la nature fonctionnelle du groupe
(PO pour purchase order, IN pour invoice, HC pour
health care claim), et la release X12 utilisée (ici 004010). Le ST
nomme le transaction set (850) et lui assigne un numéro de contrôle. Chaque
trailer (SE, GE, IEA) reprend le compteur de segments
ou de transactions, ce qui permet une validation arithmétique immédiate.
Versions
X12 publie ses standards en releases versionnées. La release apparaît dans le segment
GS08 de chaque functional group. Voici les jalons que tout intégrateur
nord-américain croise :
| Version | Année | Statut | Notes |
|---|---|---|---|
4010 | 1997 | Workhorse historique | Encore largement déployée en retail et manufacturing US. |
5010 | 2003 | Mandaté HIPAA | Obligatoire pour les transactions santé US depuis le 1er janvier 2012. |
6020 | 2008 | Modernisation | Améliorations supply chain et code lists. |
7030 | 2013 | Stable | Adoption sélective par grands donneurs d'ordre. |
8010 | 2018 | Récent | Aligné sur les pratiques modernes d'API et d'identifiants. |
Cas d'usage
Le catalogue X12 est divisé en sous-comités métier qui regroupent les transactions par domaine. Les plus déployés en pratique :
- Supply Chain (X12M) — commande
850, accusé de commande855, avis d'expédition856(ASN), facture810, acknowledgment fonctionnel997, données d'activité produit852, schedule planning830. - Santé (X12N / HIPAA) — health care claim
837, benefit enrollment834, services review information278, property and casualty loss notification272. La release5010est mandatée par HIPAA depuis 2012 pour toute transaction santé aux États-Unis. - Finance (X12F) — payment order / remittance advice
820, consolidated service invoice811, debit authorization828, tax return acknowledgment151. - Transport (X12I) — air shipment information
104, shipping instructions304, freight invoice859, shipment and billing notice857. - Communications & Contrôles — text message
864, electronic form structure868, cryptographic service message815.
Catalogue de transactions
Liste structurée des transaction sets que ediverse.io documente, par sous-comité X12. Chaque entrée renvoie à une fiche détaillée avec enveloppe, segments structurants et pièges courants.
Supply chain (X12M)
| Code | Nom |
|---|---|
| 850 | Purchase Order |
| 855 | Purchase Order Acknowledgment |
| 856 | Ship Notice/Manifest (ASN) |
| 810 | Invoice |
| 832 | Price/Sales Catalog |
| 846 | Inventory Inquiry/Advice |
| 860 | Purchase Order Change Request |
| 861 | Receiving Advice/Acceptance Certificate |
| 862 | Shipping Schedule |
| 865 | Purchase Order Change Acknowledgment |
| 867 | Product Transfer and Resale Report |
| 869 | Order Status Inquiry |
| 870 | Order Status Report |
| 842 | Nonconformance Report |
| 853 | Routing and Carrier Instruction |
| 866 | Production Sequence |
| 880 | Grocery Products Invoice |
| 881 | Manufacturer Coupon Redemption Detail |
| 894 | Delivery/Return Base Record |
| 841 | Specifications/Technical Information |
| 848 | Material Safety Data Sheet |
| 180 | Return Merchandise Authorization and Notification |
| 141 | Product Service Claim Response |
| 142 | Product Service Claim |
| 143 | Product Service Notification |
| 159 | Motion Picture Booking Confirmation |
| 875 | Grocery Products Purchase Order |
| 940 | Warehouse Shipping Order |
| 244 | Product Source Information |
| 250 | Purchase Order Shipment Management Document |
| 290 | Cooperative Advertising Agreements |
| 816 | Organizational Relationships |
| 884 | Manufacturer Item Identification Update |
| 891 | Deduction Research Report |
| 893 | Item Information Request |
| 895 | Delivery/Return Acknowledgment or Adjustment |
| 223 | Consignment Summary List |
| 877 | Manufacturer Coupon Promotion Announcement |
| 878 | Product Authorization/De-authorization |
| 879 | Price Information |
| 882 | Direct Store Delivery Summary Information |
| 885 | Retail Account Characteristics |
| 886 | Customer Call Reporting |
| 887 | Coupon Notification |
| 888 | Item Maintenance |
| 889 | Promotion Announcement |
| 896 | Product Dimension Maintenance |
| 871 | Component Parts Content |
| 840 | Request for Quotation |
| 843 | Response to Request for Quotation |
| 845 | Price Authorization Acknowledgment/Status |
| 847 | Material Claim |
| 852 | Product Activity Data |
Finance et contrôles (X12F / X12C)
| Code | Nom |
|---|---|
| 820 | Payment Order/Remittance Advice |
| 821 | Financial Information Reporting |
| 823 | Lockbox |
| 812 | Credit/Debit Adjustment |
| 813 | Electronic Filing of Tax Return Data |
| 824 | Application Advice |
| 844 | Product Transfer Account Adjustment |
| 854 | Shipment Delivery Discrepancy Information |
| 864 | Text Message |
| 130 | Student Educational Record (Transcript) |
| 131 | Student Educational Record (Transcript) Acknowledgment |
| 105 | Business Entity Filings |
| 113 | Election Campaign and Lobbyist Reporting |
| 158 | Tax Jurisdiction Sourcing |
| 175 | Court and Law Enforcement Notice |
| 152 | Statistical Government Information |
| 196 | Contractor Cost Data Reporting |
| 280 | Voter Registration Information |
| 501 | Vendor Performance Review |
| 511 | Requisition |
| 517 | Material Obligation Validation |
| 138 | Educational Testing Results Request and Report |
| 139 | Student Loan Guarantee Result |
| 146 | Request for Student Educational Record (Transcript) |
| 147 | Response to Request for Student Educational Record |
| 148 | Report of Injury, Illness, or Incident |
| 149 | Notice of Tax Adjustment or Assessment |
| 150 | Tax Rate Notification |
| 151 | Electronic Filing of Tax Return Data Acknowledgment |
| 154 | Uniform Commercial Code Filing |
| 155 | Business Credit Report |
| 170 | Revenue Receipts Statement |
| 194 | Grant or Assistance Application |
| 283 | Tax or Fee Exemption Certification |
| 521 | Income or Asset Offset |
| 819 | Joint Interest Billing and Operating Expense |
| 868 | Electronic Form Structure |
| 996 | File Transfer |
| 242 | Data Status Tracking |
| 191 | Student Loan Pre-Claims and Claims |
| 282 | Direct Debit Authorization |
| 287 | Wage Determination |
| 288 | Wage Verification Report |
| 567 | Contract Completion Status |
| 568 | Contract Payment Management Report |
| 805 | Contract Pricing Proposal |
| 838 | Trading Partner Profile |
| 248 | Account Assignment / Inquiry and Service / Status |
| 540 | Notice of Employment Status |
| 825 | Tax Information Exchange |
| 826 | Tax Notice |
| 827 | Financial Return Notice |
| 828 | Debit Authorization |
| 829 | Payment Cancellation Request |
| 836 | Procurement Notices |
| 839 | Project Cost Reporting |
| 184 | Royalty Regulatory Report |
| 188 | Educational Course Inventory |
| 189 | Application for Admission to Educational Institutions |
Hypothèque et immobilier (X12F — Mortgage / Real Estate)
| Code | Nom |
|---|---|
| 200 | Mortgage Credit Report |
| 201 | Residential Loan Application |
| 202 | Secondary Mortgage Market Loan Delivery |
| 203 | Secondary Mortgage Market Investor Report |
| 205 | Mortgage Note |
| 206 | Real Estate Inspection |
| 245 | Real Estate Tax Service Response |
| 264 | Mortgage Loan Default Status |
| 197 | Real Estate Title Evidence |
| 261 | Real Estate Information Request |
| 262 | Real Estate Information Report |
| 263 | Residential Mortgage Insurance Application Response |
| 266 | Mortgage or Note Status / Title Information |
| 257 | Residential Mortgage Insurance Application Notification |
| 259 | Residential Mortgage Insurance Explanation of Benefits |
| 260 | Application for Mortgage Insurance Benefits |
| 265 | Real Estate Title Insurance Services Order |
| 368 | Real Estate Information Services Order |
Automobile (X12I — Automotive)
| Code | Nom |
|---|---|
| 124 | Vehicle Damage |
| 125 | Multilevel Railcar Load Details |
| 126 | Vehicle Application Advice |
| 127 | Vehicle Buying Order |
| 128 | Dealer Information |
Transport (X12I)
| Code | Nom |
|---|---|
| 204 | Motor Carrier Load Tender |
| 210 | Motor Carrier Freight Details and Invoice |
| 212 | Motor Carrier Delivery Trailer Manifest |
| 213 | Motor Carrier Shipment Status Inquiry |
| 214 | Transportation Carrier Shipment Status Message |
| 215 | Motor Carrier Pickup Manifest |
| 217 | Motor Carrier Loading and Route Guide |
| 218 | Motor Carrier Tariff Information |
| 220 | Logistics Service Response |
| 240 | Motor Carrier Package Status |
| 300 | Reservation (Booking Request) (Ocean) |
| 301 | Confirmation (Ocean) |
| 404 | Rail Carrier Shipment Information |
| 990 | Response to a Load Tender |
| 110 | Air Freight Details and Invoice |
| 161 | Train Sheet |
| 304 | Shipping Instructions |
| 310 | Freight Receipt and Invoice (Ocean) |
| 311 | Canada Customs Information |
| 312 | Arrival Notice (Ocean) |
| 350 | Customs Status Information |
| 410 | Rail Carrier Freight Details and Invoice |
| 420 | Car Handling Information |
| 425 | Rail Waybill Request |
| 434 | Railroad Mark Register Update Activity |
| 440 | Shipment Weights |
| 859 | Freight Invoice |
| 920 | Loss or Damage Claim - General Commodities |
| 322 | Terminal Operations and Intermodal Ramp Activity |
| 323 | Vessel Schedule and Itinerary |
| 324 | Advance Ship Notice (Ocean) |
| 352 | U.S. Customs Carrier Cargo Information |
| 355 | U.S. Customs Acceptance / Rejection |
| 357 | U.S. Customs In-Bond Information |
| 361 | Carrier Interchange Agreement (Rail) |
| 452 | Railroad Problem Log Inquiry / Advice |
| 222 | Cartage Work Assignment |
| 224 | Motor Carrier Summary Freight Bill Manifest |
| 309 | Customs Manifest |
| 315 | Status Details (Ocean) |
| 317 | Delivery / Pickup Order |
| 358 | Customs Consist Information |
| 426 | Rail Revenue Waybill |
| 419 | Advance Car Disposition (Rail) |
| 421 | Estimated Time of Arrival and Car Scheduling (Rail) |
| 422 | Equipment Order (Rail) |
| 423 | Rail Industrial Fuel Surcharge |
| 460 | Railroad Equipment Inquiry or Advice |
| 463 | Rail Rate Reply |
| 466 | Rate Request (Rail) |
| 470 | Railroad Clearance |
| 475 | Rail Route File Maintenance |
| 109 | Vessel Content Details |
| 219 | Logistics Service Notification |
| 225 | Response to a Cargo Insurance Advice of Shipment |
| 285 | Commercial Vehicle Safety and Credentials Information Exchange |
| 286 | Commercial Vehicle Credentials |
| 313 | Shipment Status Inquiry (Ocean) |
| 319 | Terminal Information |
| 326 | Consignment Summary List |
| 353 | Customs Events Advisory Details |
| 354 | U.S. Customs Automated Manifest Archive Status |
| 356 | U.S. Customs Permit to Transfer Request |
| 412 | Trailer or Container Repair Billing |
| 417 | Rail Carrier Waybill Interchange |
| 418 | Rail Advance Interchange Consist |
| 451 | Railroad Event Report |
| 715 | Intermodal Group Loading Plan |
Assurance (X12N — P&C, Life)
| Code | Nom |
|---|---|
| 186 | Insurance Underwriting Requirements Reporting |
| 100 | Insurance Plan Description |
| 111 | Individual Insurance Policy and Client Information |
| 112 | Property Damage Report |
| 252 | Insurance Producer Administration |
| 255 | Underwriting Information Services |
| 256 | Periodic Compensation |
| 267 | Individual Life, Annuity and Disability Application |
| 273 | Insurance/Annuity Application Status |
| 272 | Property and Casualty Loss Notification |
Santé (X12N / HIPAA)
| Code | Nom |
|---|---|
| 270 | Health Care Eligibility Inquiry |
| 271 | Health Care Eligibility Response |
| 275 | Patient Information |
| 276 | Health Care Claim Status Inquiry |
| 277 | Health Care Claim Status Notification |
| 278 | Health Care Services Review |
| 820 (HIPAA) | Health Care Premium Payment |
| 834 | Benefit Enrollment and Maintenance |
| 835 | Health Care Claim Payment/Advice |
| 837 | Health Care Claim |
| 268 | Annuity Activity |
| 269 | Health Care Benefit Coordination Verification |
| 274 | Healthcare Provider Information |
| 863 | Report of Test Results |
Acquittements et contrôles
| Code | Nom |
|---|---|
| 997 | Functional Acknowledgment |
| 999 | Implementation Acknowledgment |
| 998 | Set Cancellation |
Outils
Pour explorer X12 dans la pratique :
- Parser X12 — tokenisation et inspection d'enveloppes ISA/GS/ST, 100% client-side (en cours de publication).
Pour aller plus loin
Sources publiques officielles que nous référençons sans copier :
- x12.org — site officiel d'ASC X12 : index public des transaction sets, exemples, catalogue des Implementation Guides à acquérir.
- stedi.com/edi/x12, truugo.com et edi2xml.com — modèle éditorial dont s'inspire ediverse.io : documenter les standards sans redistribuer les TR3, en s'appuyant sur les pages publiques et les fixtures open-source pour les exemples.
- Pour la santé, cms.gov publie des exemples HIPAA 5010 sous licence ouverte gouvernementale.