X12 304 — Shipping Instructions
The 304 carries ocean shipping instructions from shipper (NVOCC, freight forwarder, shipper) to ocean carrier: cargo details, routing, parties, required documents.
Purpose
The 304 documents all instructions needed to issue an ocean Bill of Lading: booking reference, parties (shipper, consignee, notify), port of loading and discharge, marks and numbers, cargo description, quantity and weight, payment terms, documentary instructions (B/L original count, surrender mode).
It is the X12 equivalent of EDIFACT IFTMIN on the ocean side. Acknowledged by 997, it precedes B/L issuance (digital or paper); the 304 also conditions issuance of the 310 (Freight Receipt and Invoice) downstream.
Envelope structure
The 304 travels within the three X12 envelope levels (ISA/IEA,
GS/GE with functional group SI, and ST/SE).
Didactic example in release 004010:
ISA*00* *00* *ZZ*ACMENVOCC *ZZ*ACMECARRIER *260514*0930*U*00401*000000304*0*P*>~
GS*SI*ACMENVOCC*ACMECARRIER*20260514*0930*1*X*004010~
ST*304*0001~
ZC1*BK-2026-7741*20260514*00*GLW***ACMECARRIER~
N9*BN*BK-2026-7741~
N1*SH*ACME ELECTRONICS INC*92*S-0001~
N1*CN*ACME EU GMBH*92*C-0042~
N1*NT*ACME LOGISTICS HAMBURG*92*N-0078~
R4*L*UN*USNYC*PORT OF NEW YORK*US~
R4*D*UN*DEHAM*HAMBURG*DE~
N7*ULD*HLCU8741230*40HC~
W09*M*1*EA~
LX*1~
L0*1*22000*N*68*M3*22000~
L5*1*ELECTRONICS COMPONENTS~
SE*13*0001~
GE*1*1~
IEA*1*000000304~ Common segments
- Header —
ST,ZC1(Beginning Segment for Shipping Instructions),N9(booking). - Parties —
N1(SH, CN, NT = Notify, FW = Forwarder). - Routing —
R4*L(Load port),R4*D(Discharge port),R4*T(Transshipment). - Equipment —
N7(Container, ISO type 40HC / 20DV…),W09(equipment count). - Cargo lines —
LXloop withL0(Weight and Volume),L5(Description),H1(Hazmat if applicable). - Summary —
SE.
Common pitfalls
- UN/LOCODE:
R4element 03 must carry the UN/LOCODE (5 chars: country + city); a free-text port name triggers an 824 rejection at major carriers (Maersk, MSC, CMA CGM). - IMDG Hazmat: encode UN number, IMDG class, packing group via
H1; missing IMDG causes loading refusal and detention billing. - B/L instructions: surrender mode (Telex Release, Express B/L, Original 3/3) must be structured in
MSG; left free, the carrier defaults — usually to 3 paper originals.
Related transactions
Documentation
The code 304 and the name Shipping Instructions are public and listed on x12.org/products/transaction-sets. The complete structure of loops, qualifiers and code lists is distributed by DISA via the proprietary Implementation Guides (TR3). ediverse.io covers only public concepts, the envelope and didactic examples.