GESMES Generic statistical message (D15A)
This is the standard EDIFACT D15A spec, with 25 loops and 63 segment positions, as OpenEDI JSON, an ediFabric C# template and an ediFabric Native model. To change it for a trading partner, customize it in the EDI Spec Builder.
Use the GESMES spec in your code
ediFabric .NET
Add the C# template and its common files to your project, or reference the template NuGet package, and read GESMES files into TSGESMES objects. See ediFabric .NET.
ediFabric Native
Native supports X12 today, and EDIFACT is coming. When it's available, map version D15A to this Native model with set_map to parse GESMES files to JSON from Python, Java, C or C#. See ediFabric Native.
OpenEDI
Select Customize in Spec Builder to copy the spec under your own name, change it for your partner, and parse files against it in EdiNation, ediFabric Native or ediFabric Cloud. Read about OpenEDI.
Generate GESMES classes in Python, Java, Node.js, Go, Rust or C
The OpenEDI file describes each GESMES as JSON. To work with GESMES data as typed objects, generate classes from the OpenEDI file in your language; the root class is TSGESMES. The classes keep the loops, segments, lengths and code lists, but not the EDI data formats. Read more in Generate a class from OpenEDI.
Python: datamodel-code-generator. Node.js: openapi-typescript. Java, Go, Rust and C: OpenAPI Generator.
GESMES structure
Loops and segments of the standard GESMES, with their usage and maximum repeats.
| ID | Name | Usage | Max use |
|---|---|---|---|
| UNH | UNH | Mandatory | 1 |
| BGM | BGM | Optional | 1 |
| DTM | DTM | Optional | 9 |
| Loop FNT | FNT | Optional | 9999 |
| FNT | FNT | Mandatory | 1 |
| FTX | FTX | Optional | 9999 |
| Loop NAD | NAD | Optional | 9 |
| NAD | NAD | Mandatory | 1 |
| IDE | IDE | Optional | 1 |
| Loop CTA | CTA | Optional | 5 |
| CTA | CTA | Mandatory | 1 |
| COM | COM | Optional | 5 |
| Loop VLI | VLI | Optional | 99 |
| VLI | VLI | Mandatory | 1 |
| DTM | DTM | Optional | 9999 |
| FTX | FTX | Optional | 9999 |
| Loop IDE | IDE | Optional | 9 |
| IDE | IDE | Mandatory | 1 |
| DTM | DTM | Optional | 9 |
| Loop GIR | GIR | Optional | 5 |
| GIR | GIR | Mandatory | 1 |
| DTM | DTM | Optional | 2 |
| Loop CDV | CDV | Optional | 9999 |
| CDV | CDV | Mandatory | 1 |
| FTX | FTX | Optional | 999 |
| Loop IDE | IDE | Optional | 9 |
| IDE | IDE | Mandatory | 1 |
| DTM | DTM | Optional | 9 |
| Loop STC | STC | Optional | 999 |
| STC | STC | Mandatory | 1 |
| FTX | FTX | Optional | 5 |
| IDE | IDE | Optional | 5 |
| Loop ASI | ASI | Optional | 9999 |
| ASI | ASI | Mandatory | 1 |
| GEI | GEI | Optional | 5 |
| FTX | FTX | Optional | 9 |
| IDE | IDE | Optional | 5 |
| Loop SCD | SCD | Optional | 999 |
| SCD | SCD | Mandatory | 1 |
| ATT | ATT | Optional | 99 |
| Loop IDE | IDE | Optional | 9999 |
| IDE | IDE | Mandatory | 1 |
| ATT | ATT | Optional | 99 |
| DTM | DTM | Optional | 2 |
| Loop DSI | DSI | Optional | 999 |
| DSI | DSI | Mandatory | 1 |
| STS | STS | Optional | 9 |
| DTM | DTM | Optional | 5 |
| FTX | FTX | Optional | 5 |
| GIR | GIR | Optional | 2 |
| Loop IDE | IDE | Optional | 99 |
| IDE | IDE | Mandatory | 1 |
| GEI | GEI | Optional | 5 |
| DTM | DTM | Optional | 5 |
| Loop CDV | CDV | Optional | 999 |
| CDV | CDV | Mandatory | 1 |
| FTX | FTX | Optional | 99 |
| Loop SCD | SCD | Optional | 999 |
| SCD | SCD | Mandatory | 1 |
| ATT | ATT | Optional | 9 |
| DTM | DTM | Optional | 9999 |
| Loop CDV | CDV | Optional | 9999 |
| CDV | CDV | Mandatory | 1 |
| FTX | FTX | Optional | 99 |
| ARR | ARR | Optional | 999999 |
| Loop NAD | NAD | Optional | 5 |
| NAD | NAD | Mandatory | 1 |
| IDE | IDE | Optional | 1 |
| Loop CTA | CTA | Optional | 5 |
| CTA | CTA | Mandatory | 1 |
| COM | COM | Optional | 5 |
| Loop FNS | FNS | Optional | 999 |
| FNS | FNS | Mandatory | 1 |
| Loop REL | REL | Optional | 9999 |
| REL | REL | Mandatory | 1 |
| Loop ARR | ARR | Optional | 9999 |
| ARR | ARR | Mandatory | 1 |
| FTX | FTX | Optional | 9999 |
| Loop IDE | IDE | Optional | 9999 |
| IDE | IDE | Mandatory | 1 |
| FTX | FTX | Optional | 9999 |
| Loop CDV | CDV | Optional | 9999 |
| CDV | CDV | Mandatory | 1 |
| FTX | FTX | Optional | 9999 |
| Loop FNT | FNT | Optional | 9999 |
| FNT | FNT | Mandatory | 1 |
| FTX | FTX | Optional | 9999 |
| UNT | UNT | Mandatory | 1 |