What OpenEDI is

EDI implementation guides describe transactions in prose and tables. People can read them, but programs can't, so every EDI tool has its own private way to store a spec.

OpenEDI uses the OpenAPI 3 schema object instead. A message, its loops, segments, composites and data elements become schemas, and a small set of x-openedi-* extensions adds what EDI needs on top: IDs, syntax rules, situational rules and group types. Any tool that reads OpenAPI can read an OpenEDI spec, and the same file works with X12, HIPAA, EDIFACT and the other standards in the spec library.

An EDI spec is described as OpenEDI. EDI files go into ediFabric .NET and ediFabric Native, which use OpenEDI as C# templates and as an intermediary JSON model. Both return OpenEDI JSON, and code generators turn OpenEDI into classes for your applications
OpenEDI describes the EDI spec, and is both the input and the output. ediFabric .NET and ediFabric Native parse with models built from it and return JSON that follows it, and code generators turn it into classes for any language.

The format is open source under the MIT license and published in the OpenEDI Specification repository on GitHub.

Extensions

A spec only needs components.schemas. All values in the extensions are case-sensitive. The OpenEDI format reference covers each extension in detail.

ExtensionUsed onMeaning
x-openedi-message-idMessageThe transaction set ID, such as 835 or INVOIC.
x-openedi-message-standardMessageThe standard, X12 or EDIFACT.
x-openedi-message-versionMessageThe version, such as 005010X221A1 or D96A.
x-openedi-loop-idLoopThe loop ID, such as 2100.
x-openedi-segment-idSegmentThe segment tag, such as TRN.
x-openedi-composite-idCompositeThe composite data element ID, such as C003.
x-openedi-element-idData elementThe simple data element ID, such as 127.
x-openedi-syntaxSegment, compositeSyntax rules between elements: paired (P), required (R), exclusion (E), conditional (C) and list conditional (L), followed by two-digit positions, for example P0304.
x-openedi-situationalSegment, compositeHIPAA situational rules: required if (R), exclusion if (E) or not used (N), with positions and the trigger codes.
x-openedi-group-typeGroupA group of segments or loops that appear in any order (anyOf), only one of them (oneOf), or in a fixed sequence (seqOf).
x-openedi-loop-seqSegmentA segment whose counter must increase across loop repeats, such as LX.

Lengths use minLength and maxLength, usage uses required, repeats use array with maxItems, data types use format, and code lists use enum.

Example

The 835 message and its TRN reassociation trace number segment, from the 835 spec. Schemas are shortened.

"TS835": {
  "type": "object",
  "required": [ "BPR_FinancialInformation", "TRN_ReassociationTraceNumber", "AllN1" ],
  "properties": {
    "ST": { "$ref": "#/components/schemas/ST" },
    "BPR_FinancialInformation": { "$ref": "#/components/schemas/BPR_FinancialInformation_2" },
    "TRN_ReassociationTraceNumber": { "$ref": "#/components/schemas/TRN_DependentTraceNumber" }
  },
  "x-openedi-message-id": "835",
  "x-openedi-message-standard": "X12",
  "x-openedi-message-version": "005010X221A1"
},
"TRN_DependentTraceNumber": {
  "type": "object",
  "required": [ "TraceTypeCode_01", "CurrentTransactionTraceNumber_02", "OriginatingCompanyIdentifier_03" ],
  "properties": {
    "TraceTypeCode_01": {
      "type": "string",
      "allOf": [ { "$ref": "#/components/schemas/X12_ID_481" } ],
      "x-openedi-element-id": "481"
    },
    "CurrentTransactionTraceNumber_02": {
      "type": "string", "format": "X12_AN", "minLength": 1, "maxLength": 50,
      "x-openedi-element-id": "127"
    },
    "OriginatingCompanyIdentifier_03": {
      "type": "string", "format": "X12_AN", "minLength": 10, "maxLength": 10,
      "x-openedi-element-id": "509"
    }
  },
  "x-openedi-segment-id": "TRN"
}

Complete specs for the HIPAA 5010 transactions:

Tools that use OpenEDI

Every tool below reads the same OpenEDI file, so a spec you customize once works for viewing, parsing, validating and generating EDI.

EDI Spec Library

Standard specs to browse and download as OpenEDI, ediFabric .NET templates and ediFabric Native models.

EDI Spec Builder

Copy a standard spec, change it for a trading partner, and upload your own OpenEDI specs. Free in EdiNation.

EdiNation

Open, parse and validate EDI files against standard or custom OpenEDI specs in the browser.

ediFabric Native

Convert EDI to JSON and back from Python, Java, C or C#, with the models generated from OpenEDI specs. See EDI models.

ediFabric Cloud

Parse, validate and generate EDI through a REST API, with your own specs uploaded as OpenEDI.

SEF migration

Convert existing SEF files into OpenEDI specs.

Frequently asked questions

Yes. The format is open source under the MIT license, and the standard specs in the library are free to download.
X12, including HIPAA, and EDIFACT, including EANCOM. The library also has specs for HL7, NCPDP, IATA and VDA.
No. Start from a standard spec in the library and change it in the EDI Spec Builder, or edit the JSON in any editor. Because an OpenEDI spec is valid OpenAPI, OpenAPI tools can read it and generate code from it.
SEF is a text format that only EDI tools read. OpenEDI is JSON in the OpenAPI format, which most programming languages and API tools already support. The SEF migration guide explains how to convert.