Canadian National Railway (CN Rail)
/
Rail Carrier Shipment Information
  • Specification
  • EDI Inspector
Import guide into your account
Stedi maintains this guide based on public documentation from Canadian National Railway (CN Rail). Contact Canadian National Railway (CN Rail) for official EDI specifications. To report any errors in this guide, please contact us.
Go to Stedi Network
Canadian National Railway (CN Rail) logo

X12 404 Rail Carrier Shipment Information

X12 Release 8030

This X12 Transaction Set contains the format and establishes the data contents of the Rail Carrier Shipment Information Transaction Set (404) for use within the context of an Electronic Data Interchange (EDI) environment. The transaction set can be used to transmit rail-carrier-specific bill of lading information to a railroad. It is the initial tender of a shipment between a consignor and a rail carrier and can be used as notification of equipment release and/or a legal bill of lading.

Delimiters
  • ~ Segment
  • * Element
  • > Component
  • ^ Repetition
EDI samples
  • sample 1
View the latest version of this implementation guide as an interactive webpage
https://www.stedi.com/app/guides/view/canadian-national-railway/rail-carrier-shipment-information/01HP24BTCPBPDVNM4MG8RPDN8N
Powered by
Build EDI implementation guides at stedi.com
Overview
ISA
-
Interchange Control Header
Max use 1
Required
GS
-
Functional Group Header
Max use 1
Required
heading
ST
0100
Transaction Set Header
Max use 1
Required
BX
0300
General Shipment Information
Max use 1
Optional
BNX
0400
Rail Shipment Information
Max use 1
Optional
M3
0500
Release
Max use 1
Required
N9
0600
Extended Reference Information Bill of Lading Number
Max use 30
Required
N9
0600
Extended Reference Information Purchase Order Number
Max use 1
Optional
N7 Loop
F9
1900
Origin Station
Max use 1
Required
D9
2000
Destination Station
Max use 1
Required
S1 Loop
R2
4600
Route Information
Max use 13
Required
LS
6700
Loop Header
Max use 1
Optional
LE
7600
Loop Trailer
Max use 1
Optional
LH6
8000
Hazardous Certification
Max use 5
Optional
SE
8400
Transaction Set Trailer
Max use 1
Required
GE
-
Functional Group Trailer
Max use 1
Required
IEA
-
Interchange Control Trailer
Max use 1
Required
ISA

Interchange Control Header

RequiredMax use 1

To start and identify an interchange of zero or more functional groups and interchange-related control segments

Example
ISA-01
I01
Authorization Information Qualifier
Required
Identifier (ID)

Code identifying the type of information in the Authorization Information

00
No Authorization Information Present (No Meaningful Information in I02)
ISA-02
I02
Authorization Information
Required
String (AN)
Min 10Max 10

Information used for additional identification or authorization of the interchange sender or the data in the interchange; the type of information is set by the Authorization Information Qualifier (I01)

ISA-03
I03
Security Information Qualifier
Required
Identifier (ID)

Code identifying the type of information in the Security Information

00
No Security Information Present (No Meaningful Information in I04)
ISA-04
I04
Security Information
Required
String (AN)
Min 10Max 10

This is used for identifying the security information about the interchange sender or the data in the interchange; the type of information is set by the Security Information Qualifier (I03)

ISA-05
I05
Interchange ID Qualifier
Required
Identifier (ID)
Min 2Max 2

Code indicating the system/method of code structure used to designate the sender or receiver ID element being qualified

Codes
ISA-06
I06
Interchange Sender ID
Required
String (AN)
Min 15Max 15

Identification code published by the sender for other parties to use as the receiver ID to route data to them; the sender always codes this value in the sender ID element

ISA-07
I05
Interchange ID Qualifier
Required
Identifier (ID)
Min 2Max 2

Code indicating the system/method of code structure used to designate the sender or receiver ID element being qualified

Codes
ISA-08
I07
Interchange Receiver ID
Required
String (AN)
Min 15Max 15

Identification code published by the receiver of the data; When sending, it is used by the sender as their sending ID, thus other parties sending to them will use this as a receiving ID to route data to them

ISA-09
I08
Interchange Date
Required
Date (DT)
YYMMDD format

Date of the interchange

ISA-10
I09
Interchange Time
Required
Time (TM)
HHMM format

Time of the interchange

ISA-11
I65
Repetition Separator
Required
String (AN)
Min 1Max 1

Type is not applicable; the repetition separator is a delimiter and not a data element; this field provides the delimiter used to separate repeated occurrences of a simple data element or a composite data structure; this value must be different than the data element separator, component element separator, and the segment terminator

^
Repetition Separator
ISA-12
I11
Interchange Control Version Number Code
Required
Identifier (ID)

Code specifying the version number of the interchange control segments, the version of the data elements within the control segments, and the code values within those data elements.

00803
00803 Standards Approved for Publication by ASC X12 Procedures Review Board through December 2021
ISA-13
I12
Interchange Control Number
Required
Numeric (N0)
Min 9Max 9

A control number assigned by the interchange sender

ISA-14
I13
Acknowledgment Requested Code
Required
Identifier (ID)
Min 1Max 1

Code indicating sender's request for an interchange acknowledgment

0
No Interchange Acknowledgment Requested
1
Interchange Acknowledgment Requested (TA1)
2
Interchange Acknowledgment Requested only when Interchange is "Rejected Because Of Errors"
3
Interchange Acknowledgment Requested only when Interchange is "Rejected Because Of Errors" or "Accepted but Errors are Noted"
ISA-15
I14
Interchange Usage Indicator Code
Required
Identifier (ID)
Min 1Max 1

Code indicating whether data enclosed by this interchange envelope is test, production or information

I
Information
P
Production Data
T
Test Data
ISA-16
I15
Component Data Element Separator
Required
String (AN)
Min 1Max 1

Type is not applicable; the component data element separator is a delimiter and not a data element; this field provides the delimiter used to separate component data elements within a composite data structure; this value must be different than the data element separator and the segment terminator

>
Component Element Separator

Functional Group Header

RequiredMax use 1

To indicate the beginning of a functional group and to provide control information

Example
GS-01
479
Functional Identifier Code
Required
Identifier (ID)

Code identifying a group of application related transaction sets

SR
Rail Carrier Shipment Information (404, 419)
GS-02
142
Application Sender's Code
Required
String (AN)
Min 2Max 15

Code identifying party sending transmission; codes agreed to by trading partners

GS-03
124
Application Receiver's Code
Required
String (AN)
Min 2Max 15

Code identifying party receiving transmission; codes agreed to by trading partners

GS-04
373
Date
Required
Date (DT)
CCYYMMDD format

Date expressed as CCYYMMDD where CC represents the first two digits of the calendar year

GS-05
337
Time
Required
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format

Time expressed in 24-hour clock time as follows: HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD = decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths (00-99)

GS-06
28
Group Control Number
Required
Numeric (N0)
Min 1Max 9

Assigned number originated and maintained by the sender

GS-07
455
Responsible Agency Code
Required
Identifier (ID)
Min 1Max 2

Code identifying the issuer of the standard; this code is used in conjunction with Data Element 480

T
Transportation Data Coordinating Committee (TDCC)
X
Accredited Standards Committee X12
GS-08
480
Version / Release / Industry Identifier Code
Required
String (AN)

Code indicating the version, release, subrelease, and industry identifier of the EDI standard being used, including the GS and GE segments; if code in DE455 in GS segment is X, then in DE 480 positions 1-3 are the version number; positions 4-6 are the release and subrelease, level of the version; and positions 7-12 are the industry or trade association identifiers (optionally assigned by user); if code in DE455 in GS segment is T, then other formats are allowed

008030
008030 Standards Approved for Publication by ASC X12 Procedures Review Board through December 2021

Heading

ST
0100
Heading > ST

Transaction Set Header

RequiredMax use 1

To indicate the start of a transaction set and to assign a control number

Example
ST-01
143
Transaction Set Identifier Code
Required
Identifier (ID)

Code identifying a Transaction Set

  • The transaction set identifier (ST01) is used by the translation routines of the interchange partners to select the appropriate transaction set definition (e.g., 810 selects the Invoice Transaction Set).
404
Rail Carrier Shipment Information
ST-02
329
Transaction Set Control Number
Required
Numeric (N0)
Min 4Max 9

Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set

BX
0300
Heading > BX

General Shipment Information

OptionalMax use 1

To transmit identification numbers and other basic shipment data

  • BX05 contains the Standard Carrier Alpha Code (SCAC) of the original roadhaul carrier receiving the shipment.
Usage notes

Examples:
BX00XPP1234CNKB
BX
00XPP1234CNKB*N

Example
BX-01
353
Transaction Set Purpose Code
Required
Identifier (ID)

Code identifying purpose of transaction set

00
Original
BX-02
91
Transportation Method/Type Code
Required
Identifier (ID)

Code specifying the method or type of transportation for the shipment

X
Intermodal (Piggyback)
BX-03
146
Shipment Method of Payment Code
Required
Identifier (ID)

Code identifying payment terms for transportation charges

CC
Collect
PP
Prepaid (by Seller)
BX-04
145
Shipment Identification Number
Optional
String (AN)
Min 1Max 30

Identification number assigned to the shipment by the shipper that uniquely identifies the shipment from origin to ultimate destination and is not subject to modification; (Does not contain blanks or special characters)

BX-05
140
Standard Carrier Alpha Code
Optional
Identifier (ID)

Code identifying the Standard Carrier Alpha Code

CN
CN Rail
BX-06
188
Weight Unit Code
Optional
Identifier (ID)

Code specifying the weight unit

K
Kilograms
L
Pounds
BX-07
147
Shipment Qualifier
Optional
Identifier (ID)

Code specifying relationship of this shipment with respect to other shipments given to the carrier at the same time

B
Bill of Lading for Individual Shipment
BNX
0400
Heading > BNX

Rail Shipment Information

OptionalMax use 1

To transmit rail-specific shipment data

Usage notes

Example: BNX*N**S

Example
BNX-01
460
Shipment Weight Code
Optional
Identifier (ID)

Code indicating the way by which weights are obtained for a particular shipment

N
No Wt. Req., Ship. Moving on Contract or per car rate
BNX-03
11
Billing Code
Optional
Identifier (ID)

Code indicating type of Bill

S
Single Shipment Billing
M3
0500
Heading > M3

Release

RequiredMax use 1

To indicate that the equipment is or is not to be released

Usage notes

Indicates whether shipment is to be released for movement when the transmission is received or will be released through other means.

Example: M3R20231116*1454

Example
At least one of Date (M3-02) or Time (M3-03) is required
M3-01
132
Release Code
Required
Identifier (ID)

Code signifying whether or not the shipment information transaction set includes instructions for pickup and movement of the shipment; (This code provides a means for the shipper to transmit billing data along with the movement instructions, transmit billing data ahead of the movement instructions, or follow movement instructions with complete billing data at a later date)

  • If M301 contains code value "S" or "R", then M302 is the date of release. If M301 contains code value "U", then M302 is the estimated date of release.
R
Released with Billing Data
M3-02
373
Date
Optional
Date (DT)
CCYYMMDD format

Date expressed as CCYYMMDD where CC represents the first two digits of the calendar year

M3-03
337
Time
Optional
Time (TM)
HHMM format

Time expressed in 24-hour clock time as follows: HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD = decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths (00-99)

N9
0600
Heading > N9

Extended Reference Information Bill of Lading Number

RequiredMax use 30

To transmit identifying information as specified by the Reference Identification Qualifier

Usage notes

Allows Reference Numbers to be sent to CN. At least one N9 containing a Bill of Lading number must be included. This number will be included on all other documents such as Freight Invoice and Remittance/Payment.

Example: N9BM1234*202311161454

Example
Variants (all may be used)
N9Extended Reference Information Purchase Order Number
N9-01
128
Reference Identification Qualifier
Required
Identifier (ID)

Code identifying the Reference Identification

BM
Bill of Lading Number
N9-02
127
Reference Identification
Required
String (AN)
Min 1Max 15

Reference information as defined for a particular Transaction Set or as specified by the Reference Identification Qualifier

N9-04
373
Date
Required
Date (DT)
CCYYMMDD format

Date expressed as CCYYMMDD where CC represents the first two digits of the calendar year

N9-05
337
Time
Optional
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format

Time expressed in 24-hour clock time as follows: HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD = decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths (00-99)

N9
0600
Heading > N9

Extended Reference Information Purchase Order Number

OptionalMax use 1

To transmit identifying information as specified by the Reference Identification Qualifier

Usage notes

Allows Reference Numbers to be sent to CN. At least one N9 containing a Bill of Lading number must be included. This number will be included on all other documents such as Freight Invoice and Remittance/Payment.

Examples:
N9PO12345202311161454
N9
PO*12345
2031116*1454

Example
N9-01
128
Reference Identification Qualifier
Required
Identifier (ID)

Code identifying the Reference Identification

PO
Purchase Order Number
N9-02
127
Reference Identification
Required
String (AN)
Min 1Max 80

Reference information as defined for a particular Transaction Set or as specified by the Reference Identification Qualifier

N9-04
373
Date
Optional
Date (DT)
CCYYMMDD format

Date expressed as CCYYMMDD where CC represents the first two digits of the calendar year

N9-05
337
Time
Optional
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format

Time expressed in 24-hour clock time as follows: HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD = decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths (00-99)

N7 Loop
RequiredMax 500
N7
1000
Heading > N7 Loop > N7

Equipment Details

RequiredMax use 1

To identify the equipment

Usage notes

Example: N7CNRU22211120000A3***CN4000

Example
If either Weight (N7-03) or Weight Qualifier (N7-04) is present, then the other is required
N7-01
206
Equipment Initial
Optional
String (AN)
Min 1Max 4

Prefix or alphabetic part of an equipment unit's identifying number

  • N701 is mandatory for rail transactions.
Usage notes

Mandatory for rail transactions.

N7-02
207
Equipment Number
Required
String (AN)
Min 1Max 15

Sequencing or serial part of an equipment unit's identifying number (pure numeric form for equipment number is preferred)

N7-03
81
Weight
Optional
Decimal number (R)
Min 1Max 10

Numeric value of weight

N7-04
187
Weight Qualifier
Optional
Identifier (ID)

Code specifying the type of weight

A3
Shippers Weight
N7-11
40
Equipment Description Code
Optional
Identifier (ID)

Code identifying type of equipment used for shipment

CN
Container (not otherwise specified)
TL
Trailer (not otherwise specified)
N7-15
567
Equipment Length
Optional
Numeric (N0)
Min 4Max 5

Length (in feet and inches) of equipment ordered or used to transport shipment (The format is FFFII where FFF is feet and II is inches; the range for II is 00 through 11)

Usage notes

Outside length required for intermodal equipment. (4000 = 40 feet)

M7
1300
Heading > N7 Loop > M7

Seal Numbers

OptionalMax use 5

To record seal numbers used and the organization that applied the seals

Usage notes

Example: M7*123456

Example
M7-01
225
Seal Number
Required
String (AN)
Min 1Max 15

Unique number on seal used to close a shipment

N7 Loop end
F9
1900
Heading > F9

Origin Station

RequiredMax use 1

To identify the rail origin of the shipment

Usage notes

Indicates the origin of the shipment, the point from which it is shipped. Spelling should be in accordance with that listed in the Standard Point Location Code (SPLC) standard available from the National Motor Freight Tariff Association (USA) or the National Transportation Agency (Canada). CN Intermodal terminal listing can be found at end of this document.

Examples:
F9MONTREAL TASCH YARD*PQ
F9
MONTREALPQ
F9
* BRAMPTON INTER TERON
F9**TORONTO
ON

Example
F9-02
19
City Name
Required
String (AN)
Min 2Max 30

Free-form text for city name

  • F902 is the origin station for movement.
F9-03
156
State or Province Code
Required
Identifier (ID)
Min 2Max 2

Code specifying the Standard State/Province as defined by appropriate government agency

D9
2000
Heading > D9

Destination Station

RequiredMax use 1

To identify the rail destination of the shipment

Usage notes

Indicates the destination of the shipment, the point at which it will be unloaded or where the transportation responsibility reverts to the consignee. Spelling should be in accordance with that listed in the Standard Point Location Code (SPLC) standard available from the National Motor Freight Tariff Association (USA) or the National Transportation Agency (Canada). CN Intermodal terminal listing can be found at end of this document.

Examples:
D9BRAMPTON INTER TER*ON
D9
CALGARYAB
D9
* MONTREAL TASCH YARDPQ
D9**MONTREAL
PQ

Example
D9-02
19
City Name
Required
String (AN)
Min 2Max 30

Free-form text for city name

  • D902 is the destination station of movement.
D9-03
156
State or Province Code
Required
Identifier (ID)
Min 2Max 2

Code specifying the Standard State/Province as defined by appropriate government agency

N1 Loop
RequiredMax 15
N1
2100
Heading > N1 Loop > N1

Party Identification

RequiredMax use 1

To identify a party by type of organization, name, and code

Usage notes

Associated to the N3 and N4 segments below. N1, N3 and N4 segments are repeated for the Consignee and any other Additional Parties to the shipment.

Examples:
N1SHINTERMODAL SHIPPER INC
N3123 MAIN ROAD
N4
MONTREALPQH4T 1T1
N1CNINTERMODAL CONSIGNEE INC
N312 SMITH STREET
N4
TORONTOONM9W 1R6
N1N1INTERMODAL SHIPPER INC

N1SHINTERMODAL SHIPPER INC
N3123 MAIN ROAD
N4
MONTREALPQH4T 1T1
N1CNINTERMODAL CONSIGNEE INC
N3123 SMITH STREET
N4
CALGARYABT2G 5S2
N1N1INTERMODAL SHIPPER INC

N1SHINTERMODAL SHIPPER INC
N3123 MAIN ROAD
N4
TORONTOON
N1
CNINTERMODAL CONSIGNEE INC
N3
12 SMITH STREET
N4MONTREALPQ
N1N1INTERMODAL CONSIGNEE INC
N4MONTREALPQ

Example
N1-01
98
Entity Identifier Code
Required
Identifier (ID)

Code identifying an organizational entity, a physical location, property or an individual

C1
In Care Of Party no. 1
CN
Consignee
N1
Notify Party no. 1
SF
Ship From
SH
Shipper
N1-02
93
Name
Required
String (AN)
Min 1Max 60

Free-form name

N3
2200
Heading > N1 Loop > N3

Party Location

OptionalMax use 2

To specify the location of the named party

Example
N3-01
166
Address Information
Required
String (AN)
Min 1Max 55

Address information

N4
2300
Heading > N1 Loop > N4

Geographic Location

OptionalMax use 1

To specify the geographic place of the named party

Example
N4-01
19
City Name
Optional
String (AN)
Min 2Max 30

Free-form text for city name

  • A combination of either N401 through N404, or N405 and N406 may be adequate to specify a location.
N4-02
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2

Code specifying the Standard State/Province as defined by appropriate government agency

N4-03
116
Postal Code
Optional
Identifier (ID)
Min 3Max 15

Code specifying international postal zone code excluding punctuation and blanks (zip code for United States)

  • N403 contains the postal code in an unstructured format. N408 contains the postal code in a structured format. When a postal code data field is used, the parties shall agree as to which data element (N403 or N408) shall be used in the transaction set.
N4-04
26
Country Code
Optional
Identifier (ID)
Min 2Max 3

Code identifying the country

Usage notes

For North American countries, use the ISO-3166 Alpha-2 character code.

N1 Loop end
S1 Loop
OptionalMax 12
S1
4300
Heading > S1 Loop > S1

Stop-off Name

RequiredMax use 1

To identify a stop-off party

Usage notes

Example:
S11ABCD CO*P
S2
1*123 MAIN ST
S9
1**CALGARY
AB**PU

Example
S1-01
165
Stop Sequence Number
Required
Numeric (N0)
Min 1Max 3

Identifying number for the specific stop and the sequence in which the stop is to be performed

S1-02
93
Name
Required
String (AN)
Min 1Max 60

Free-form name

S1-06
190
Accomplish Code
Required
Identifier (ID)

Code indicating the status of a specified stop

A
Accomplished
P
Pending
S2
4400
Heading > S1 Loop > S2

Stop-off Address

OptionalMax use 2

To specify the address of the stop-off party

Example
S2-01
165
Stop Sequence Number
Required
Numeric (N0)
Min 1Max 3

Identifying number for the specific stop and the sequence in which the stop is to be performed

  • S201 contains the same stop sequence number used on a corresponding S1 Segment.
S2-02
166
Address Information
Required
String (AN)
Min 1Max 55

Address information

S9
4480
Heading > S1 Loop > S9

Stop-off Station

OptionalMax use 1

To specify location details for a stop-off

Example
S9-01
165
Stop Sequence Number
Required
Numeric (N0)
Min 1Max 3

Identifying number for the specific stop and the sequence in which the stop is to be performed

  • S901 contains the same number used on a corresponding S1 Segment.
S9-03
19
City Name
Required
String (AN)
Min 2Max 30

Free-form text for city name

S9-04
156
State or Province Code
Required
Identifier (ID)
Min 2Max 2

Code specifying the Standard State/Province as defined by appropriate government agency

S9-06
163
Stop Reason Code
Required
Identifier (ID)

Code specifying the reason for the stop

PL
Part Load
PU
Part Unload
S1 Loop end
R2
4600
Heading > R2

Route Information

RequiredMax use 13

To specify carrier and routing sequences and details

Usage notes

One R2 segment for each railroad in the route. CN can provide route information for your shipments (i.e.: Railroad SCAC's and junctions).

Examples:
R2CNS*25
R2
CN*S
**20

Example
R2-01
140
Standard Carrier Alpha Code
Required
Identifier (ID)
Min 2Max 4

Code identifying the Standard Carrier Alpha Code

R2-02
133
Routing Sequence Code
Required
Identifier (ID)

Code specifying the relationship of a carrier to a specific shipment movement

S
Origin Carrier, Shipper's Routing (Rail)
R2-05
177
Intermodal Service Code
Optional
Identifier (ID)

Code identifying the Intermodal Service Plan

20
Door to Door; rail owned equipment
25
Ramp to Ramp; rail owned equipment
LX Loop
RequiredMax 25
LX
5400
Heading > LX Loop > LX

Transaction Set Line Number

RequiredMax use 1

To reference a line number in a transaction set

Usage notes

Examples:
LX1
LX
2
LX*3

Example
LX-01
554
Assigned Number
Required
Numeric (N0)
Min 1Max 9

Number assigned for differentiation within a transaction set

L5
5500
Heading > LX Loop > L5

Description, Marks and Numbers

RequiredMax use 15

To specify the line item in terms of description, quantity, packaging, and marks and numbers

Usage notes

CN can provide Standard Transportation Commodity Codes (STCC) for your commodities. The commodity code is required only on the first L5 segment. Additional L5 segments can be used to provide additional description of lading.

Examples:
L51FAK4611110T
L51 FREIGHT ALL KINDS, (FAK)4611110T
L52DELY: 1 # PCS: 511 WEIGHT: 5000 KGS
L53DELY: 2 # PCS: 1227 WEIGHT: 15000 KGS
L51FAK-HAZARDOUS GOODS4950150T

Example
If either Commodity Code (L5-03) or Commodity Code Qualifier (L5-04) is present, then the other is required
L5-01
213
Lading Line Item Number
Optional
Numeric (N0)
Min 1Max 6

Sequential line number for a lading item

L5-02
79
Lading Description
Optional
String (AN)
Min 1Max 50

Description of an item as required for rating and billing purposes

  • L502 may be used to send quantity information as part of the product description.
L5-03
22
Commodity Code
Optional
String (AN)
Min 1Max 30

Code describing a commodity or group of commodities

Usage notes

7-digit Standard Transportation Commodity Code (STCC). 4611110 is only valid for use on domestic shipments.

L5-04
23
Commodity Code Qualifier
Optional
Identifier (ID)

Code identifying the commodity coding system used for Commodity Code

T
Standard Transportation Commodity Code (STCC)
L0 Loop
OptionalMax 25
L0
5700
Heading > LX Loop > L0 Loop > L0

Line Item - Quantity and Weight

RequiredMax use 1

To specify quantity, weight, volume, and type of service for a line item including applicable "quantity/rate-as" data

Usage notes

Examples:
L0120000N600PCS**K
L0
120000N1738CAS
L0120000N200*PCS**L

Example
If either Weight (L0-04) or Weight Qualifier (L0-05) is present, then the other is required
If either Lading Quantity (L0-08) or Packaging Form Code (L0-09) is present, then the other is required
If Weight Unit Code (L0-11) is present, then Weight (L0-04) is required
L0-01
213
Lading Line Item Number
Optional
Numeric (N0)
Min 1Max 6

Sequential line number for a lading item

L0-04
81
Weight
Optional
Decimal number (R)
Min 1Max 10

Numeric value of weight

L0-05
187
Weight Qualifier
Optional
Identifier (ID)

Code specifying the type of weight

A3
Shippers Weight
N
Actual Net Weight
L0-08
80
Lading Quantity
Optional
Numeric (N0)
Min 1Max 7

Number of units (pieces) of the lading commodity

  • L008 is the number of handling units of the line item tendered to the carrier.
L0-09
211
Packaging Form Code
Optional
Identifier (ID)

Code specifying the packaging form of the lading quantity

600
BDL
Bundles
CAS
Cases
N
PCS
Pieces
L0-11
188
Weight Unit Code
Optional
Identifier (ID)

Code specifying the weight unit

K
Kilograms
L
Pounds
L0-12
56
Type of Service Code
Optional
Identifier (ID)

Code specifying extent of transportation service requested

200
L0-13
380
Quantity
Optional
Decimal number (R)
Min 1Max 15

Numeric value of quantity

  • L013 can only be used if the code in L009 is PLT, SKD, or SLP.
  • L013 is used to convey the total number of boxes, cartons, or pieces contained on a pallet, skid, or slip sheet for the line item.
L0-14
211
Packaging Form Code
Optional
Identifier (ID)

Code specifying the packaging form of the lading quantity

L
L0 Loop end
LX Loop end
LS
6700
Heading > LS

Loop Header

OptionalMax use 1

To indicate that the next segment begins a loop

Example
LS-01
447
Loop Identifier Code
Required
String (AN)
Min 1Max 6

The loop ID number given on the transaction set diagram is the value for this data element in segments LS and LE

LH1 Loop
OptionalMax 1000
LH1
6800
Heading > LH1 Loop > LH1

Hazardous Identification Information

RequiredMax use 1

To specify the hazardous commodity identification reference number and quantity

Usage notes

Example: LH1PC19UN3481**4966481KG*470

Example
If either Unit or Basis for Measurement Code (LH1-06) or Quantity (LH1-07) is present, then the other is required
LH1-01
355
Unit or Basis for Measurement Code
Required
Identifier (ID)

Code specifying the units in which a value is being expressed, or manner in which a measurement has been taken

  • LH101 and LH102 are used to convey the number and type of packages for bulk and nonbulk movements.
BX
Box
PC
Pieces
LH1-02
80
Lading Quantity
Required
Numeric (N0)
Min 1Max 7

Number of units (pieces) of the lading commodity

LH1-03
277
UN/NA Identification Code
Optional
Identifier (ID)
Min 6Max 6

Code identifying the hazardous material identification number as required by Title 49 of the code of Federal Regulations; UN/NA stands for United Nations/North America

LH1-05
22
Commodity Code
Optional
String (AN)
Min 1Max 30

Code describing a commodity or group of commodities

Usage notes

7-digit Standard Transportation Commodity Code (STCC).

LH1-06
355
Unit or Basis for Measurement Code
Optional
Identifier (ID)

Code specifying the units in which a value is being expressed, or manner in which a measurement has been taken

  • LH101 and LH102 are used to convey the number and type of packages for bulk and nonbulk movements.
KG
Kilograms
LH1-07
380
Quantity
Optional
Decimal number (R)
Min 1Max 15

Numeric value of quantity

LH2
6900
Heading > LH1 Loop > LH2

Hazardous Classification Information

OptionalMax use 4

To specify the hazardous notation and endorsement information

  • If the hazardous endorsement (LH204) is "NONE", then use of LH204 is mandatory.
    However, the receiver must consider it to be blanks when printing a paper document.
Usage notes

Example: LH29P

Example
LH2-01
215
Hazardous Classification Code
Optional
Identifier (ID)
Min 1Max 30

Code specifying the hazardous classification corresponding to the shipping name of the hazardous commodity

LH2-02
983
Hazardous Class Qualifier
Optional
Identifier (ID)

Code identifying hazardous class

P
Primary
LH3
7000
Heading > LH1 Loop > LH3

Hazardous Material Shipping Name Information

OptionalMax use 10

To specify the hazardous material shipping name and additional descriptive requirements

Usage notes

Example: LH3LITHIUM ION BATTERIESC

Example
If either Hazardous Material Shipping Name (LH3-01) or Hazardous Material Shipping Name Qualifier (LH3-02) is present, then the other is required
LH3-01
224
Hazardous Material Shipping Name
Optional
String (AN)
Min 1Max 25

The proper shipping name of the hazardous commodity as specified by Title 49 Code of Federal Regulations, or the shipping name of the dangerous good as defined in the Canadian Transportation of Dangerous Goods Act and Regulations, or the international regulations as promulgated by the United Nations

LH3-02
984
Hazardous Material Shipping Name Qualifier
Optional
Identifier (ID)

Code indicating the source (regulatory) of the proper shipping name

C
Canadian Shipping Name
D
Domestic (United States) Shipping Name
PER
7550
Heading > LH1 Loop > PER

Administrative Communications Contact

OptionalMax use 5

To identify a person or office to whom administrative communications should be directed

Usage notes

Example:
PERCNofferor company name or contract numberTE1-613-996-6666

Example
If either Communication Number Qualifier (PER-03) or Communication Number (PER-04) is present, then the other is required
PER-01
366
Contact Function Code
Required
Identifier (ID)

Code identifying the major duty or responsibility of the person or group named

CN
Canadian Hazardous Material Contact Qualifier
HM
USA Hazardous Material Contact Qualifier
PER-02
93
Name
Optional
String (AN)
Min 1Max 60

Free-form name

Usage notes

If the emergency response telephone number shown in PER04 is an emergency provider (e.g Chemtrec), the PER02 must identify the company (offeror) by name or contract number.

PER-03
365
Communication Number Qualifier
Optional
Identifier (ID)

Code identifying the type of communication number

TE
Telephone
PER-04
364
Communication Number
Optional
String (AN)
Min 1Max 2048

Complete communications number including country or area code when applicable

N1 Loop Consignee
OptionalMax 1
Variants (all may be used)
N1 Loop Shipper
N1
7560
Heading > LH1 Loop > N1 Loop Consignee > N1

Party Identification

RequiredMax use 1

To identify a party by type of organization, name, and code

Usage notes

Used to identify the Canadian ‘consignor’ (‘SH’ shipper or ‘CN’ consignee) as required by Transport Canada regulations (TDG 3.5 (1)(a)).

Example
N1-01
98
Entity Identifier Code
Required
Identifier (ID)

Code identifying an organizational entity, a physical location, property or an individual

CN
Consignee
N1-02
93
Name
Required
String (AN)
Min 1Max 60

Free-form name

N3
7570
Heading > LH1 Loop > N1 Loop Consignee > N3

Party Location

OptionalMax use 2

To specify the location of the named party

Example
N3-01
166
Address Information
Required
String (AN)
Min 1Max 55

Address information

N4
7580
Heading > LH1 Loop > N1 Loop Consignee > N4

Geographic Location

OptionalMax use 1

To specify the geographic place of the named party

Example
N4-01
19
City Name
Optional
String (AN)
Min 2Max 30

Free-form text for city name

  • A combination of either N401 through N404, or N405 and N406 may be adequate to specify a location.
N4-02
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2

Code specifying the Standard State/Province as defined by appropriate government agency

N4-03
116
Postal Code
Optional
Identifier (ID)
Min 3Max 15

Code specifying international postal zone code excluding punctuation and blanks (zip code for United States)

  • N403 contains the postal code in an unstructured format. N408 contains the postal code in a structured format. When a postal code data field is used, the parties shall agree as to which data element (N403 or N408) shall be used in the transaction set.
N4-04
26
Country Code
Optional
Identifier (ID)
Min 2Max 3

Code identifying the country

Usage notes

For North American countries, use the ISO-3166 Alpha-2 character code.

N1 Loop Consignee end
N1 Loop Shipper
OptionalMax 10
Variants (all may be used)
N1 Loop Consignee
N1
7560
Heading > LH1 Loop > N1 Loop Shipper > N1

Party Identification

RequiredMax use 1

To identify a party by type of organization, name, and code

Usage notes

Used to identify the Canadian ‘consignor’ (‘SH’ shipper or ‘CN’ consignee) as required by Transport Canada regulations (TDG 3.5 (1)(a)).

Example:
N1SHINTERMODAL SHIPPER INC
N3123 MAIN ROAD
N4
TORONTO*ON

Example
N1-01
98
Entity Identifier Code
Required
Identifier (ID)

Code identifying an organizational entity, a physical location, property or an individual

SH
Shipper
N1-02
93
Name
Required
String (AN)
Min 1Max 60

Free-form name

N3
7570
Heading > LH1 Loop > N1 Loop Shipper > N3

Party Location

OptionalMax use 2

To specify the location of the named party

Example
N3-01
166
Address Information
Required
String (AN)
Min 1Max 55

Address information

N4
7580
Heading > LH1 Loop > N1 Loop Shipper > N4

Geographic Location

OptionalMax use 1

To specify the geographic place of the named party

Example
N4-01
19
City Name
Optional
String (AN)
Min 2Max 30

Free-form text for city name

  • A combination of either N401 through N404, or N405 and N406 may be adequate to specify a location.
N4-02
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2

Code specifying the Standard State/Province as defined by appropriate government agency

N4-03
116
Postal Code
Optional
Identifier (ID)
Min 3Max 15

Code specifying international postal zone code excluding punctuation and blanks (zip code for United States)

  • N403 contains the postal code in an unstructured format. N408 contains the postal code in a structured format. When a postal code data field is used, the parties shall agree as to which data element (N403 or N408) shall be used in the transaction set.
N4-04
26
Country Code
Optional
Identifier (ID)
Min 2Max 3

Code identifying the country

Usage notes

For North American countries, use the ISO-3166 Alpha-2 character code.

N1 Loop Shipper end
LH1 Loop end
LE
7600
Heading > LE

Loop Trailer

OptionalMax use 1

To indicate that the loop immediately preceding this segment is complete

Example
LE-01
447
Loop Identifier Code
Required
String (AN)
Min 1Max 6

The loop ID number given on the transaction set diagram is the value for this data element in segments LS and LE

LH6
8000
Heading > LH6

Hazardous Certification

OptionalMax use 5

To specify the name of the person certifying that the shipment complies with the regulations and/or the actual certification

Usage notes

Provides the name of the person who prepared, and certifies to its accuracy, the documentation of the regulated commodity.

Example: LH6*JOHN Q SHIPPER

Example
LH6-01
93
Name
Optional
String (AN)
Min 1Max 60

Free-form name

SE
8400
Heading > SE

Transaction Set Trailer

RequiredMax use 1

To indicate the end of the transaction set and provide the count of the transmitted segments (including the beginning (ST) and ending (SE) segments)

Example
SE-01
96
Number of Included Segments
Required
Numeric (N0)
Min 1Max 10

Total number of segments included in a transaction set including ST and SE segments

SE-02
329
Transaction Set Control Number
Required
Numeric (N0)
Min 4Max 9

Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set

Heading end

Functional Group Trailer

RequiredMax use 1

To indicate the end of a functional group and to provide control information

Example
GE-01
97
Number of Transaction Sets Included
Required
Numeric (N0)
Min 1Max 6

Total number of transaction sets included in the functional group or interchange (transmission) group terminated by the trailer containing this data element

GE-02
28
Group Control Number
Required
Numeric (N0)
Min 1Max 9

Assigned number originated and maintained by the sender

Interchange Control Trailer

RequiredMax use 1

To define the end of an interchange of zero or more functional groups and interchange-related control segments

Example
IEA-01
I16
Number of Included Functional Groups
Required
Numeric (N0)
Min 1Max 5

A count of the number of functional groups included in an interchange

IEA-02
I12
Interchange Control Number
Required
Numeric (N0)
Min 9Max 9

A control number assigned by the interchange sender

EDI Samples

sample 1

ISA*00* *00* *ZZ*SENDER *ZZ*RECEIVER *240208*0329*^*00803*000000001*0*T*>
GS*SR*SENDERGS*RECEIVERGS*20240208*032910*000000001*X*008030
ST*404*00920001
BX*00*X*PP*1234*CN*K*B
BNX*N**S
M3*R*20231116*1454
N9*BM*1234**20231116*1454
N9*PO*12345**20231116*1454
N7*CNRU*222111*20000*A3*******CN****4000
M7*123456
F9**MONTREAL TASCH YARD*PQ
D9**BRAMPTON INTER TER*ON
N1*SH*INTERMODAL SHIPPER INC
N3*123 MAIN ROAD
N4*MONTREAL*PQ*H4T 1T1
N1*CN*INTERMODAL CONSIGNEE INC
N3*12 SMITH STREET
N4*TORONTO*ON*M9W 1R6
N1*N1*INTERMODAL SHIPPER INC
R2*CN*S***25
LX*1
L5*1*FAK*4611110*T
L0*1***20000*N***600*600
SE*22*00920001
GE*1*000000001
IEA*1*000000001

sample 2

ISA*00* *00* *ZZ*GENERIC *02*CN *231116*1454*U*00803*000054913*0*P*^
GS*SR*GENERIC*CN*20231116*1454*000000092*X*008030
ST*404*00920001
BX*00*X*PP*1234*CN*K*B
BNX*N**S
M3*R*20231116*1454
N9*BM*1234**20231116*1454
N9*PO*12345**20231116*1454
N7*CNRU*222111*20000*A3*******CN****4000
M7*123456
F9**MONTREAL*PQ
D9**CALGARY*AB
N1*SH*INTERMODAL SHIPPER INC
N3*123 MAIN ROAD
N4*MONTREAL*PQ*H4T 1T1
N1*CN*INTERMODAL CONSIGNEE INC
N3*123 SMITH STREET
N4*CALGARY*AB* T2G 5S2
N1*N1*INTERMODAL SHIPPER INC
R2*CN*S***20
LX*1
L5*1* FREIGHT ALL KINDS, (FAK)*4611110*T
L0*1***20000*N***1738*CAS
SE*22*00920001
GE*1*000000092
IEA*1*000054913

sample 3

ISA*00* *00* *ZZ*GENERIC *02*CN *231116*1454*U*00803*000054913*0*P*^
GS*SR*GENERIC*CN*20231116*1454*000000092*X*008030
ST*404*00920001
BX*00*X*PP*1234*CN*K*B
BNX*N**S
M3*R*20231116*1454
N9*BM*1234**20231116*1454
N9*PO*12345**20231116*1454
N7*CNRU*222111*20000*A3*******CN****4000
F9**MONTREAL*PQ
D9**CALGARY*AB
N1*SH*INTERMODAL SHIPPER INC
N3*123 MAIN ROAD
N4*MONTREAL*PQ*H4T 1T1
N1*CN*INTERMODAL CONSIGNEE INC
N3*123 SMITH STREET
N4*CALGARY*AB* T2G 5S2
N1*N1*INTERMODAL SHIPPER INC
S1*1*ABCD CO****A
S2*1*123 MAIN ST
S9*1**CALGARY*AB**PU
R2*CN*S***20
LX*1
L5*1*FAK*4611110*T
L0*1***22162*N***1738*CAS
LX*2
L5*2*DELY: 1 # PCS: 511 WEIGHT: 5000 KGS
LX*3
L5*3*DELY: 2 # PCS: 1227 WEIGHT: 15000 KGS
SE*28*00920001
GE*1*000000092
IEA*1*000054913

sample 4

ISA*00* *00* *ZZ*SENDER *ZZ*RECEIVER *240208*0327*^*00803*000000001*0*T*>
GS*SR*SENDERGS*RECEIVERGS*20240208*032746*000000001*X*008030
ST*404*00920001
BX*00*X*PP*1234*CN*K*B
BNX*N**S
M3*R*20231116*0728
N9*BM*1234**20231116*1454
N9*PO*12345**20231116*1454
N7*CNRU*222111*20000*A3*******CN****4000
M7*123456
F9**BRAMPTON INTER TER*ON
D9**MONTREAL TASCH YARD*PQ
N1*SH*INTERMODAL SHIPPER INC
N3*123 MAIN ROAD
N4*TORONTO*ON
N1*CN*INTERMODAL CONSIGNEE INC
N3*12 SMITH STREET
N4*MONTREAL*PQ
N1*N1*INTERMODAL CONSIGNEE INC
N4*MONTREAL*PQ
R2*CN*S***25
LX*1
L5*1*FAK-HAZARDOUS GOODS*4950150*T
L0*1*******20000*N***200*200*L
LS*LH1
LH1*PC*19*UN3481**4966481*KG*470
LH2*9*P
LH3*LITHIUM ION BATTERIES*C
PER*HM*offeror company name or contract number*TE*1-613-996-6666
N1*SH*INTERMODAL SHIPPER INC
N3*123 MAIN ROAD
N4*TORONTO*ON
LE*LH1
LH6*JOHN Q SHIPPER
SE*33*00920001
GE*1*000000001
IEA*1*000000001

sample 5

ISA*00* *00* *ZZ*GENERIC *02*CN *231116*1454*U*00803*000054913*0*P*^
GS*SR*GENERIC*CN*20231116*1454*000000092*X*008030
ST*404*00920001
BX*00*X*PP*1234*CN*K*B
BNX*N**S
M3*R*20231116*0728
N9*BM*1234**20231116*1454
N9*PO*12345**20231116*1454
N7*CNRU*222111*20000*A3*******CN****4000
M7*123456
F9**TORONTO*ON
D9**MONTREAL*PQ
N1*SH*INTERMODAL SHIPPER INC
N3*123 MAIN ROAD
N4*TORONTO*ON
N1*CN*INTERMODAL CONSIGNEE INC
N3*12 SMITH STREET
N4*MONTREAL*PQ
N1*N1*INTERMODAL CONSIGNEE INC
N4*MONTREAL*PQ
R2*CN*S***20
LX*1
L5*1*FAK-HAZARDOUS GOODS*4950150*T
L0*1*******20000*N***200*200*L
LS*LH1
LH1*PC*19*UN3481**4966481*KG*470
LH2*9*P
LH3*LITHIUM ION BATTERIES*C
PER*HM*(offeror) company name or contract number*TE*1-613-996-6666
N1*SH*INTERMODAL SHIPPER INC
N3*123 MAIN ROAD
N4*TORONTO*ON
LE*LH1
LH6*JOHN Q SHIPPER
SE*33*00920001
GE*1*000000092
IEA*1*000054913

Stedi is a registered trademark of Stedi, Inc. All names, logos, and brands of third parties listed on this page are trademarks of their respective owners (including “X12”, which is a trademark of X12 Incorporated). Stedi, Inc. and its products and services are not endorsed by, sponsored by, or affiliated with these third parties. Use of these names, logos, and brands is for identification purposes only, and does not imply any such endorsement, sponsorship, or affiliation.