{"_id":"@ediflow/x12-004010","name":"@ediflow/x12-004010","dist-tags":{"latest":"0.3.0"},"versions":{"0.3.0":{"name":"@ediflow/x12-004010","version":"0.3.0","description":"X12 004010 Standard Definitions - Common Transaction Sets","main":"./data/index.json","keywords":["edi","x12","004010","ansi","standard-definitions","message-structures","850","810","856","997"],"author":{"name":"EDIFlow Contributors"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ediflow-lib/core.git","directory":"packages/x12-004010"},"bugs":{"url":"https://github.com/ediflow-lib/core/issues"},"homepage":"https://github.com/ediflow-lib/core#readme","peerDependencies":{"@ediflow/core":">=0.1.0"},"_id":"@ediflow/x12-004010@0.3.0","gitHead":"a0b1155f0a2944828c45b6a375017d6fa01a6650","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-jgZ59NhFn1rVBNDHJvzcIypXSJSE1kdFH6nuAXIUxJfNL7Lrj1n8+KdZE3aXzO5wXMQCXysbCDVbc5CA3hDXHg==","shasum":"23a8af1e6714dcbb869e69eb4cb278e4a594b393","tarball":"https://registry.npmjs.org/@ediflow/x12-004010/-/x12-004010-0.3.0.tgz","fileCount":1057,"unpackedSize":7390632,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCkhqxwNmClDenmdv4VcS71XEdZcG3djCe1dd8sJ/AfHQIge8gJERkeK4vs3nDqdOoifg/H60XzS6teRNaNWVUPCn4="}]},"_npmUser":{"name":"ediflow","email":"hello.ediflow@gmail.com"},"directories":{},"maintainers":[{"name":"ediflow","email":"hello.ediflow@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/x12-004010_0.3.0_1777834430631_0.9787167662648328"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-03T18:53:50.528Z","0.3.0":"2026-05-03T18:53:50.855Z","modified":"2026-05-03T18:53:51.061Z"},"maintainers":[{"name":"ediflow","email":"hello.ediflow@gmail.com"}],"description":"X12 004010 Standard Definitions - Common Transaction Sets","homepage":"https://github.com/ediflow-lib/core#readme","keywords":["edi","x12","004010","ansi","standard-definitions","message-structures","850","810","856","997"],"repository":{"type":"git","url":"git+https://github.com/ediflow-lib/core.git","directory":"packages/x12-004010"},"author":{"name":"EDIFlow Contributors"},"bugs":{"url":"https://github.com/ediflow-lib/core/issues"},"license":"MIT","readme":"# @ediflow/x12-004010\n\n> X12 004010 (2000) Standard Definitions - Industry Standard\n\n[![NPM Version](https://img.shields.io/npm/v/@ediflow/x12-004010.svg)](https://www.npmjs.com/package/@ediflow/x12-004010)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Package Size](https://img.shields.io/bundlephobia/min/@ediflow/x12-004010)](https://www.npmjs.com/package/@ediflow/x12-004010)\n\n**X12 004010** • **293 Transaction Sets** • **Industry Standard** • **MIT Licensed** • **Free**\n\n---\n\n## 📦 What is this?\n\nThis package contains **X12 004010 (2000) standard definitions** for use with `@ediflow/core`.\n\n**X12 004010** is the **most widely adopted** ANSI ASC X12 standard in North America, used by retail, manufacturing, automotive, logistics, and healthcare industries.\n\n**Includes:**\n- Transaction set structures (293 transaction sets)\n- Segment definitions\n- Element definitions\n- Composite definitions\n- Code lists\n- Syntax rules\n\n**Version:** 004010 (Released 2000) - Industry standard\n\n---\n\n## 🚀 Installation\n\n```bash\n# Install core library (required)\nnpm install @ediflow/core\n\n# Install this standard package\nnpm install @ediflow/x12-004010\n```\n\n---\n\n## 📊 Supported Transaction Sets (293)\n\n### 🛒 Core Purchasing\n| Transaction Set | Description | Use Case |\n|----------------|-------------|----------|\n| **850** | Purchase Order | Order placement |\n| **855** | Purchase Order Acknowledgment | Order confirmation |\n| **860** | Purchase Order Change | Order modifications |\n| **865** | Purchase Order Change Acknowledgment | Change confirmation |\n\n### 📦 Shipping & Receiving\n| Transaction Set | Description | Use Case |\n|----------------|-------------|----------|\n| **856** | Ship Notice/Manifest | ASN (Advanced Shipping Notice) |\n| **857** | Shipment & Billing Notice | Shipment details |\n\n### 💰 Invoicing & Payment\n| Transaction Set | Description | Use Case |\n|----------------|-------------|----------|\n| **810** | Invoice | Billing documents |\n| **820** | Payment Order/Remittance | Payment processing |\n| **824** | Application Advice | Transaction status |\n| **997** | Functional Acknowledgment | EDI receipt confirmation |\n\n### 🚚 Transportation\n| Transaction Set | Description |\n|----------------|-------------|\n| **204** | Motor Carrier Load Tender |\n| **210** | Freight Invoice |\n| **214** | Transportation Shipment Status |\n| **990** | Response to Load Tender |\n\n### 📊 Inventory & Planning\n| Transaction Set | Description |\n|----------------|-------------|\n| **846** | Inventory Inquiry/Advice |\n| **830** | Planning Schedule |\n| **862** | Shipping Schedule |\n\n**+ 278+ additional transaction sets** covering all industries and use cases.\n\n---\n\n## 📁 Package Contents\n\n```\n@ediflow/x12-004010/\n└── data/\n    ├── codes/                    # Code lists\n    │   └── codes.json\n    ├── composites.json           # Composite elements\n    ├── elements.json             # Data elements\n    ├── index.json                # Package metadata\n    ├── messages/                 # Transaction set structures (293)\n    │   ├── 850.json             # Purchase Order\n    │   ├── 810.json             # Invoice\n    │   ├── 856.json             # ASN\n    │   ├── 997.json             # Functional ACK\n    │   └── ... (289 more)\n    ├── segment-syntax-rules.json # Segment validation rules\n    └── segments.json             # Segment definitions\n```\n\n**Package Size:** ~7.8 MB\n\n---\n\n## 📖 Usage Example\n\n```typescript\nimport {\n  X12MessageParser,\n  X12DelimiterDetector,\n  X12SegmentParser,\n  X12EnvelopeParser\n} from '@ediflow/x12';\nimport { FileBasedMessageStructureRepository } from '@ediflow/infrastructure-shared';\nimport path from 'path';\n\n// 1. Set up parser\nconst parser = new X12MessageParser(\n  new X12DelimiterDetector(),\n  new X12SegmentParser(),\n  new X12EnvelopeParser()\n);\n\n// 2. Parse X12 850 Purchase Order\nconst x12String = `ISA*00*          *00*          *ZZ*SENDER         *ZZ*RECEIVER       *260204*1030*^*00401*000000001*0*P*>~GS*PO*SENDER*RECEIVER*20260204*1030*1*X*004010~ST*850*0001~BEG*00*NE*PO123456**20260210~SE*3*0001~GE*1*1~IEA*1*000000001~`;\n\nconst message = parser.parse(x12String);\n\nconsole.log(message.standard);          // 'X12'\nconsole.log(message.messageType.value); // '850'\nconsole.log(message.version.value);     // '004010'\n\n// 3. Load 004010 definitions\nconst basePath = path.resolve(__dirname, 'node_modules');\nconst repository = new FileBasedMessageStructureRepository(basePath);\nconst structure = await repository.getMessageStructure('X12', '004010', '850');\n\nconsole.log(structure?.name);           // 'Purchase Order'\n```\n\n---\n\n## 📋 Transaction Set Details\n\n### 850 - Purchase Order\n\n**Use Case:** Buyer sends order to supplier\n\n**Key Segments:**\n- `ST` - Transaction Set Header\n- `BEG` - Order details (PO number, date, type)\n- `REF` - Reference numbers (contract, customer ref, etc.)\n- `DTM` - Dates (delivery, ship, etc.)\n- `N1_LOOP` - Party information (BY=Buyer, SE=Seller, ST=ShipTo)\n- `PO1_LOOP` - Line items (product, quantity, price)\n- `CTT` - Transaction totals\n- `SE` - Transaction Set Trailer\n\n**Example:**\n```\nST*850*000000001~\nBEG*00*NE*PO123456**20260210~\nREF*DP*ACME~\nDTM*002*20260215~\nN1*BY*ACME Corp*92*ACME001~\nN3*123 Main Street~\nN4*New York*NY*10001*US~\nPO1*1*100*EA*9.99**VP*WIDGET001~\nCTT*1~\nSE*9*000000001~\n```\n\n### 810 - Invoice\n\n**Use Case:** Supplier sends invoice to buyer\n\n**Key Segments:**\n- `BIG` - Invoice number, date, PO number\n- `IT1_LOOP` - Line items\n- `TDS` - Total dollar amount (mandatory!)\n- `CTT` - Line item count\n\n### 856 - Ship Notice/ASN\n\n**Use Case:** Supplier notifies buyer of shipment\n\n**Key Segments:**\n- `BSN` - Shipment ID, date, time\n- `HL_LOOP` - Hierarchical structure\n  - Level S (Shipment)\n  - Level O (Order)\n  - Level P (Pack/Carton)\n  - Level I (Item)\n\n**Hierarchy Example:**\n```\nHL*1**S*1~        (Shipment level)\n  HL*2*1*O*1~     (Order level, parent=1)\n    HL*3*2*P*1~   (Pack level, parent=2)\n      HL*4*3*I*0~ (Item level, parent=3, no children)\n```\n\n### 997 - Functional Acknowledgment\n\n**Use Case:** Receiver confirms receipt of functional group\n\n**Key Segments:**\n- `AK1` - Functional group being acknowledged\n- `AK2_LOOP` - Individual transaction set acknowledgments\n- `AK9` - Summary (accepted/rejected counts)\n\n**Codes:**\n- `A` = Accepted\n- `E` = Accepted with errors\n- `R` = Rejected\n\n---\n\n## 🎯 When to Use 004010\n\n**Perfect for:**\n- ✅ **Industry standard** - Most widely adopted X12 version\n- ✅ **Retail** - Walmart, Target, Amazon require 004010\n- ✅ **Automotive** - OEMs and suppliers\n- ✅ **Manufacturing** - Supply chain integration\n- ✅ **Logistics** - 3PLs and freight forwarders\n- ✅ **Healthcare** - Pre-HIPAA or non-regulated claims\n\n**Industries using 004010:**\n- 🛒 Retail & E-commerce\n- 🚗 Automotive\n- 🏭 Manufacturing\n- 📦 Logistics & Transportation\n- 🏥 Healthcare (non-HIPAA)\n\n**Consider alternatives if:**\n- 🔄 **HIPAA compliance** - Use `@ediflow/hipaa-x12-005010` (005010)\n- 🔄 **Latest features** - Use `@ediflow/x12-006040` (006040, internal)\n\n---\n\n## 🆚 Version Comparison\n\n| Version | Year | Transaction Sets | Use Case |\n|---------|------|-----------------|----------|\n| **004010** | 2000 | 293 | **Industry standard** |\n| **005010** | 2012 | 310 | HIPAA healthcare |\n| **006040** | 2026 | 319 | Latest release |\n\n---\n\n## 📦 Related Packages\n\n**Core:**\n- [`@ediflow/core`](https://npmjs.com/package/@ediflow/core) - Core library (REQUIRED)\n\n**Other X12 Standards:**\n- [`@ediflow/hipaa-x12-005010`](https://npmjs.com/package/@ediflow/hipaa-x12-005010) - HIPAA 005010 (Internal)\n- [`@ediflow/x12-006040`](https://npmjs.com/package/@ediflow/x12-006040) - Latest 006040 (Internal)\n\n---\n\n## 📚 Documentation\n\n- **[Quick Start Guide](https://github.com/ediflow-lib/core/blob/main/docs/QUICK_START.md)**\n- **[Main README](https://github.com/ediflow-lib/core/blob/main/README.md)**\n- **[Architecture](https://github.com/ediflow-lib/core/blob/main/docs/ARCHITECTURE.md)**\n- **[X12 Examples](https://github.com/ediflow-lib/core/tree/main/examples/x12)**\n\n---\n\n## 🤝 Contributing\n\nData corrections or additional transaction sets? We welcome contributions!\n- [Report issues](https://github.com/ediflow-lib/core/issues)\n- [Contribute](https://github.com/ediflow-lib/core/blob/main/CONTRIBUTING.md)\n\n---\n\n## 📄 License\n\nMIT License - see [LICENSE](https://github.com/ediflow-lib/core/blob/main/LICENSE)\n\n---\n\n## 🔗 Links\n\n- **NPM:** https://npmjs.com/package/@ediflow/x12-004010\n- **GitHub:** https://github.com/ediflow-lib/core\n- **ASC X12:** https://x12.org\n\n---\n\n**Built with ❤️ by the EDIFlow community**\n\nMIT\n\n","readmeFilename":"README.md","_rev":"1-bbd84c2dc287432269a47744dccc79f8"}