ORDERS Purchase order message (D01B)

This is the standard EANCOM D01B syntax 4 spec, with 36 loops and 94 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 (83 KB) Generate classes
The ediFabric .NET template, class TSORDERS. It needs the common segments, composites and codes of EANCOM D01B syntax 4, one download for every transaction in the version. Download C# (2 KB) Common files (58 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 D01B 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 RFFRFFOptional9999
RFFRFFMandatory1
DTMDTMOptional5
Loop NADNADOptional99
NADNADMandatory1
LOCLOCOptional99
FIIFIIOptional5
Loop RFFRFFOptional99
RFFRFFMandatory1
Loop CTACTAOptional5
CTACTAMandatory1
COMCommunication contactOptional5
Loop TAXTAXOptional5
TAXTAXMandatory1
MOAMOAOptional1
Loop CUXCurrenciesOptional5
CUXCurrenciesMandatory1
DTMDTMOptional5
Loop PATPATOptional10
PATPATMandatory1
DTMDTMOptional5
PCDPCDOptional1
Loop MOAMOAOptional9999
MOAMOAMandatory1
Loop TDTTDTOptional10
TDTTDTMandatory1
Loop LOCLOCOptional10
LOCLOCMandatory1
DTMDTMOptional5
Loop TODTODOptional5
TODTODMandatory1
LOCLOCOptional2
Loop PACPACOptional99
PACPACMandatory1
Loop PCIPCIOptional5
PCIPCIMandatory1
RFFRFFOptional1
DTMDTMOptional5
GINGINOptional10
Loop EQDEQDOptional10
EQDEQDMandatory1
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 LINLine itemOptional200000
LINLine itemMandatory1
PIAPIAOptional25
IMDIMDOptional99
MEAMEAOptional99
QTYQTYOptional99
ALIAdditional informationOptional5
DTMDTMOptional35
MOAMOAOptional10
GINGINOptional1000
QVRQVROptional1
FTXFTXOptional99
Loop PRIPRIOptional25
PRIPRIMandatory1
CUXCurrenciesOptional1
DTMDTMOptional5
Loop RFFRFFOptional9999
RFFRFFMandatory1
DTMDTMOptional5
Loop PACPACOptional99
PACPACMandatory1
QTYQTYOptional5
Loop PCIPCIOptional5
PCIPCIMandatory1
RFFRFFOptional1
DTMDTMOptional5
GINGINOptional10
Loop LOCLOCOptional9999
LOCLOCMandatory1
QTYQTYOptional1
DTMDTMOptional5
Loop TAXTAXOptional10
TAXTAXMandatory1
MOAMOAOptional1
Loop NADNADOptional999
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
MOAMOAOptional99
CNTCNTOptional10
UNTMessage TrailerOptional1