{"id":28430653,"url":"https://github.com/apimeister/x12-types","last_synced_at":"2025-07-04T21:30:42.767Z","repository":{"id":62444503,"uuid":"496758456","full_name":"apimeister/x12-types","owner":"apimeister","description":"This library provides bindings for the ASC X12 standard.","archived":false,"fork":false,"pushed_at":"2025-05-14T12:38:13.000Z","size":346,"stargazers_count":7,"open_issues_count":9,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T14:07:41.844Z","etag":null,"topics":["edi","x12"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apimeister.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-26T20:10:27.000Z","updated_at":"2025-05-14T12:38:16.000Z","dependencies_parsed_at":"2025-01-27T21:29:54.716Z","dependency_job_id":"d2679ec6-4c1c-4a55-9c2b-30514f2ccb42","html_url":"https://github.com/apimeister/x12-types","commit_stats":{"total_commits":30,"total_committers":1,"mean_commits":30.0,"dds":0.0,"last_synced_commit":"7f093c4515c6512df88a299ff80bdf4355601087"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/apimeister/x12-types","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apimeister%2Fx12-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apimeister%2Fx12-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apimeister%2Fx12-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apimeister%2Fx12-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apimeister","download_url":"https://codeload.github.com/apimeister/x12-types/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apimeister%2Fx12-types/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263622337,"owners_count":23490082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["edi","x12"],"created_at":"2025-06-05T14:07:41.056Z","updated_at":"2025-07-04T21:30:42.756Z","avatar_url":"https://github.com/apimeister.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# X12-types\n[![Latest Version](https://img.shields.io/crates/v/x12-types.svg)](https://crates.io/crates/x12-types)\n\nThis library provides bindings for the ASC X12 standard.\n\n## Supported Bindings\n\n* 003030\n  * 998 - Set Cancellation\n* 004010\n  * 204 - Motor Carrier Load Tender\n  * 214 - Transportation Carrier Shipment Status Message\n  * 309 - U.S. Customs Manifest\n  * 310 - Freight Receipt and Invoice (Ocean)\n  * 315 - Status Details (Ocean)\n  * 322 - Terminal Operations and Intermodal Ramp Activity\n  * 404 - Rail Carrier Shipment Information\n  * 810 - Invoice\n  * 997 - Functional Acknowledgment\n  * 998 - Set Cancellation\n* 005010\n  * 834 - Benefit Enrollment and Maintenance (005010X220A1)\n  * 835 - Health Care Claim Payment/Advice\n  * 837 - Health Care Claim\n* 005030\n  * 404 - Rail Carrier Shipment Information\n\nSomething missing? Please open an issue.\n\n## sample code\n\n### Rendering X12\n\n```rust\nuse x12_types::v004010::*;\n\nlet x = Transmission {\n    isa: ISA {\n        _01: \"00\".to_string(),\n        _02: \"          \".to_string(),\n        _03: \"00\".to_string(),\n        _04: \"          \".to_string(),\n        _05: \"ZZ\".to_string(),\n        _06: \"SOURCE         \".to_string(),\n        _07: \"ZZ\".to_string(),\n        _08: \"TARGET         \".to_string(),\n        _09: \"220524\".to_string(),\n        _10: \"1120\".to_string(),\n        _11: \"U\".to_string(),\n        _12: \"00401\".to_string(),\n        _13: \"000000001\".to_string(),\n        _14: \"0\".to_string(),\n        _15: \"P\".to_string(),\n        _16: \"\u003e\".to_string(),\n    },\n    functional_group: vec![FunctionalGroup {\n        gs: GS {\n            _01: \"QO\".to_string(),\n            _02: \"SOURCE\".to_string(),\n            _03: \"TARGET\".to_string(),\n            _04: \"20220524\".to_string(),\n            _05: \"1600\".to_string(),\n            _06: \"1\".to_string(),\n            _07: \"X\".to_string(),\n            _08: \"004010\".to_string(),\n        },\n        ...\n        ge: GE {\n            _01: \"1\".to_string(),\n            _02: \"1\".to_string(),\n        },\n    }],\n    iea: IEA {\n        _01: \"1\".to_string(),\n        _02: \"000000001\".to_string(),\n    },\n};\nlet serialized = format!(\"{x}\");\n// resulting string\n//\n// ISA*00*          *00*          *ZZ*SOURCE         *ZZ*TARGET         *220524*1120*U*00401*000000001*0*P*\u003e~\n// GS*QO*SOURCE*TARGET*20220524*1600*1*X*004010~\n// ....\n// GE*1*1~\n// IEA*1*000000001~\n```\n\n### Parsing X12\n\n```rust\nuse x12_types::v005010::*;\n\nlet str = r#\"ISA*01*0000000000*01*0000000000*ZZ*ABCDEFGHIJKLMNO*ZZ*123456789012345*101127*1719*U*00400*000003438*0*P*\u003e~\nGS*HP*ABCCOM*01017*20110315*1005*1*X*004010X091A1~\nST*835*07504123~\nBPR*H*5.75*C*NON************20110315~\n...\nSE*93*07504123~\nGE*1*1~\nIEA*1*004075123~\"#;\n    let (rest, obj) = Transmission::\u003c_835\u003e::parse(\u0026str).unwrap();\n    println!(\"{obj:?}\");\n// resulting string\n//\n// Transmission { isa: \n//  ISA { _01: \"01\", _02: \"0000000000\", _03: \"01\", _04: \"0000000000\", _05: \"ZZ\", _06: \"ABCDEFGHIJKLMNO\", _07: \"ZZ\", _08: \"123456789012345\", _09: \"101127\", _10: \"1719\", _11: \"U\", _12: \"00400\", _13: \"000003438\", _14: \"0\", _15: \"P\", _16: \"\u003e\" }, \n//  functional_group: [\n//    FunctionalGroup { \n//      gs: GS { _01: \"HP\", _02: \"ABCCOM\", _03: \"01017\", _04: \"20110315\", _05: \"1005\", _06: \"1\", _07: \"X\", _08: \"004010X091A1\" }, \n//      segments: [_835 { ...\n```\n\nMore examples are located in the examples directory. Tests are embedded into each version directory.\n\n## Usage from the CLI\n\nWe are also maintaining a CLI-tool for a more accessible way to consume EDIs.\n\n[https://crates.io/crates/edi-cli](https://crates.io/crates/edi-cli)\n\n## Contributions\n\nSince the X12 is fairly huge, we only implement types on demand. So if you are missing some types, please open an issue or merge request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapimeister%2Fx12-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapimeister%2Fx12-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapimeister%2Fx12-types/lists"}