856 Ship Notice/Manifest (003070)

This is the standard X12 003070 spec, with 7 loops and 58 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 (136 KB) Generate classes
The ediFabric .NET template, class TS856. It needs the common segments, composites and codes of X12 003070, one download for every transaction in the version. Download C# (1 KB) Common files (238 KB)
The intermediary model ediFabric Native loads with set_map. Download Native (111 KB)

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

ediFabric Native

Map version 003070 to the Native model with set_map, then parse 856 files to JSON from Python, Java, C or C#. See Convert between EDI and JSON.

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 856 classes in Python, Java, Node.js, Go, Rust or C

ediFabric Native returns each 856 as JSON, with the property names of the OpenEDI schema. To work with that JSON as typed objects, generate classes from the OpenEDI file in your language and deserialize the JSON into TS856. Serialize the objects back to JSON to build EDI with ediFabric Native. The classes keep the loops, segments, lengths and code lists, but not the EDI data formats, so validate files with ediFabric Native. Read more in Generate a class from OpenEDI.

Python: datamodel-code-generator. Node.js: openapi-typescript. Java, Go, Rust and C: OpenAPI Generator.

For a sample file, the same data as JSON, and code to parse, validate and generate the 856, see the 856 transaction guide.

856 structure

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

IDNameUsageMax use
STTransaction Set HeaderOptional1
BSNBeginning Segment for Ship NoticeMandatory1
DTMDate/Time ReferenceOptional10
Loop HLHierarchical LevelMandatory200000
HLHierarchical LevelMandatory1
LINItem IdentificationOptional1
SN1Item Detail (Shipment)Optional1
SLNSubline Item DetailOptional1000
PRFPurchase Order ReferenceOptional1
PO4Item Physical DetailsOptional1
PIDProduct/Item DescriptionOptional200
MEAMeasurementsOptional40
PWKPaperworkOptional25
PKGMarking, Packaging, LoadingOptional25
TD1Carrier Details (Quantity and Weight)Optional20
TD5Carrier Details (Routing Sequence/Transit Time)Optional12
TD3Carrier Details (Equipment)Optional12
TD4Carrier Details (Special Handling, or Hazardous Materials, or Both)Optional5
TSDTrailer Shipment DetailsOptional1
REFReference IdentificationOptional>1
PERAdministrative Communications ContactOptional3
Loop LH1Hazardous Identification InformationOptional100
LH1Hazardous Identification InformationMandatory1
LH2Hazardous Classification InformationOptional4
LH3Hazardous Material Shipping NameOptional12
LFHFreeform Hazardous Material InformationOptional20
LEPEPA Required DataOptional3
LH4Canadian Dangerous RequirementsOptional1
LHTTransborder Hazardous RequirementsOptional3
LHRHazardous Material Identifying Reference NumbersOptional10
PERAdministrative Communications ContactOptional5
LHEEmpty Equipment Hazardous Material InformationOptional1
Loop CLDLoad DetailOptional200
CLDLoad DetailMandatory1
REFReference IdentificationOptional200
DTPDate or Time or PeriodOptional1
MANMarks and NumbersOptional>1
DTMDate/Time ReferenceOptional10
FOBF.O.B. Related InstructionsOptional1
PALPallet InformationOptional1
Loop N1NameOptional200
N1NameMandatory1
N2Additional Name InformationOptional2
N3Address InformationOptional2
N4Geographic LocationOptional1
REFReference IdentificationOptional12
PERAdministrative Communications ContactOptional3
FOBF.O.B. Related InstructionsOptional1
SDQDestination QuantityOptional50
ETDExcess Transportation DetailOptional1
CURCurrencyOptional1
Loop SACService, Promotion, Allowance, or Charge InformationOptional>1
SACService, Promotion, Allowance, or Charge InformationMandatory1
CURCurrencyOptional1
GFFurnished Goods and ServicesOptional1
YNQYes/No QuestionOptional10
Loop LMCode Source InformationOptional10
LMCode Source InformationMandatory1
LQIndustry CodeMandatory100
Loop V1Vessel IdentificationOptional>1
V1Vessel IdentificationMandatory1
R4Port or TerminalOptional>1
DTMDate/Time ReferenceOptional>1
CTTTransaction TotalsOptional1
SETransaction Set TrailerOptional1