ORDERS Purchase order message (D96A)

This is the standard EANCOM D96A spec, with 32 loops and 83 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.

Loading the spec…
The spec as an OpenAPI 3 schema with x-openedi-* extensions, for ediFabric Native, ediFabric Cloud and the EDI Spec Builder. Download OpenEDI (68 KB) Generate classes
The ediFabric .NET template, class TSORDERS. It needs the common segments, composites and codes of EANCOM D96A, one download for every transaction in the version. Download C# (2 KB) Common files (52 KB)
The intermediary model ediFabric Native loads with set_map. Native supports X12 today, and EANCOM is coming. Download Native (1 KB)

Use the ORDERS 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 ORDERS files into TSORDERS objects. See ediFabric .NET.

ediFabric Native

Native supports X12 today, and EANCOM is coming. When it's available, map version D96A to this Native model with set_map to parse ORDERS 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 ORDERS classes in Python, Java, Node.js, Go, Rust or C

The OpenEDI file describes each ORDERS as JSON. To work with ORDERS data as typed objects, generate classes from the OpenEDI file in your language; the root class is TSORDERS. 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.

ORDERS structure

Loops and segments of the standard ORDERS, with their usage and maximum repeats.

IDNameUsageMax use
UNHMessage HeaderOptional1
BGMBGMMandatory1
DTMDTMMandatory35
PAIPAIOptional1
ALIADDITIONAL INFORMATIONOptional5
FTXFTXOptional99
Loop RFFRFFOptional10
RFFRFFMandatory1
DTMDTMOptional5
Loop NADNADOptional99
NADNADMandatory1
LOCLOCOptional25
Loop RFFRFFOptional10
RFFRFFMandatory1
Loop CTACTAOptional5
CTACTAMandatory1
COMCOMMUNICATION CONTACTOptional5
Loop TAXTAXOptional5
TAXTAXMandatory1
MOAMOAOptional1
Loop CUXCUXOptional5
CUXCUXMandatory1
DTMDTMOptional5
Loop PATPATOptional10
PATPATMandatory1
DTMDTMOptional5
PCDPCDOptional1
MOAMOAOptional1
Loop TDTTDTOptional10
TDTTDTMandatory1
Loop LOCLOCOptional10
LOCLOCMandatory1
Loop TODTODOptional5
TODTODMandatory1
LOCLOCOptional2
Loop ALCALCOptional15
ALCALCMandatory1
ALIADDITIONAL INFORMATIONOptional5
DTMDTMOptional5
Loop QTYQTYOptional1
QTYQTYMandatory1
RNGRNGOptional1
Loop PCDPCDOptional1
PCDPCDMandatory1
RNGRNGOptional1
Loop MOAMOAOptional2
MOAMOAMandatory1
RNGRNGOptional1
Loop RTERATE DETAILSOptional1
RTERATE DETAILSMandatory1
RNGRNGOptional1
Loop TAXTAXOptional5
TAXTAXMandatory1
MOAMOAOptional1
Loop LINLINOptional200000
LINLINMandatory1
PIAADDITIONAL PRODUCT IDOptional25
IMDIMDOptional99
MEAMEAOptional5
QTYQTYOptional10
DTMDTMOptional35
MOAMOAOptional10
GINGINOptional1000
QVRQVROptional1
FTXFTXOptional99
Loop PRIPRIOptional25
PRIPRIMandatory1
CUXCUXOptional1
Loop RFFRFFOptional10
RFFRFFMandatory1
DTMDTMOptional5
Loop PACPACOptional10
PACPACMandatory1
Loop PCIPCIOptional5
PCIPCIMandatory1
RFFRFFOptional1
DTMDTMOptional5
GINGINOptional10
Loop LOCLOCOptional9999
LOCLOCMandatory1
QTYQTYOptional1
DTMDTMOptional5
Loop TAXTAXOptional10
TAXTAXMandatory1
MOAMOAOptional1
Loop NADNADOptional99
NADNADMandatory1
Loop CTACTAOptional5
CTACTAMandatory1
COMCOMMUNICATION CONTACTOptional5
Loop ALCALCOptional99
ALCALCMandatory1
ALIADDITIONAL INFORMATIONOptional5
DTMDTMOptional5
Loop QTYQTYOptional1
QTYQTYMandatory1
RNGRNGOptional1
Loop PCDPCDOptional1
PCDPCDMandatory1
RNGRNGOptional1
Loop MOAMOAOptional2
MOAMOAMandatory1
RNGRNGOptional1
Loop RTERATE DETAILSOptional1
RTERATE DETAILSMandatory1
RNGRNGOptional1
Loop TAXTAXOptional5
TAXTAXMandatory1
MOAMOAOptional1
Loop TDTTDTOptional10
TDTTDTMandatory1
UNSSECTION CONTROLMandatory1
MOAMOAOptional12
CNTCNTOptional10
UNTMessage TrailerOptional1