Canadian Pacific
/
Rail Carrier Waybill Interchange
  • Specification
  • EDI Inspector
Stedi maintains this guide based on public documentation from Canadian Pacific. Contact Canadian Pacific for official EDI specifications. To report any errors in this guide, please contact us.
Go to Stedi Network
Canadian Pacific logo

X12 417 Rail Carrier Waybill Interchange

X12 Release 4040
Delimiters
  • ~ Segment
  • * Element
  • > Component
  • ^ Repetition
EDI sample
  • Sample
View the latest version of this implementation guide as an interactive webpage
https://www.stedi.com/app/guides/view/canadian-pacific/rail-carrier-waybill-interchange/01H66FS33YYFJN9YHX26F98QNR
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
ZC1
0200
Beginning Segment for Data Correction or Change
Max use 1
Optional
BX
0300
General Shipment Information
Max use 1
Required
BNX
0400
Rail Shipment Information
Max use 1
Required
N9
0500
Reference Identification
Max use 30
Optional
CM
0600
Cargo Manifest
Max use 2
Optional
DTM
0700
Date/Time Reference
Max use 5
Optional
N7 Loop
N7
0800
Equipment Details
Max use 1
Required
VC Loop
M12
1200
In-bond Identifying Information
Max use 2
Optional
M7
1400
Seal Numbers
Max use 5
Optional
GA
1650
Canadian Grain Information
Max use 15
Optional
N8
1800
Waybill Reference
Max use 499
Required
F9
2000
Origin Station
Max use 1
Required
D9
2100
Destination Station
Max use 1
Required
R2
4700
Route Information
Max use 13
Required
H3
5200
Special Handling Instructions
Max use 20
Optional
PS
5300
Protective Service Instructions
Max use 5
Optional
LS
6600
Loop Header
Max use 1
Optional
LE
7500
Loop Trailer
Max use 1
Optional
PER
7600
Administrative Communications Contact
Max use 5
Optional
LH2
7700
Hazardous Classification Information
Max use 6
Optional
LHR
7800
Hazardous Material Identifying Reference Numbers
Max use 1
Optional
XH
7850
Pro Forma - B13 Information
Max use 1
Optional
X7
7900
Customs Information
Max use 10
Optional
SE
8100
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
Example
ISA-01
I01
Authorization Information Qualifier
Required
Identifier (ID)
00
No Authorization Information Present (No Meaningful Information in I02)
ISA-02
I02
Authorization Information
Required
String (AN)
Min 10Max 10
ISA-03
I03
Security Information Qualifier
Required
Identifier (ID)
00
No Security Information Present (No Meaningful Information in I04)
ISA-04
I04
Security Information
Required
String (AN)
Min 10Max 10
ISA-05
I05
Interchange ID Qualifier
Required
Identifier (ID)
Min 2Max 2
Codes
ISA-06
I06
Interchange Sender ID
Required
String (AN)
Min 15Max 15
ISA-07
I05
Interchange ID Qualifier
Required
Identifier (ID)
Min 2Max 2
Codes
ISA-08
I07
Interchange Receiver ID
Required
String (AN)
Min 15Max 15
ISA-09
I08
Interchange Date
Required
Date (DT)
YYMMDD format
ISA-10
I09
Interchange Time
Required
Time (TM)
HHMM format
ISA-11
I65
Repetition Separator
Required
String (AN)
Min 1Max 1
^
Repetition Separator
ISA-12
I11
Interchange Control Version Number
Required
Identifier (ID)
00404
Standards Approved for Publication by ASC X12 Procedures Review Board through October 2000
ISA-13
I12
Interchange Control Number
Required
Numeric (N0)
Min 9Max 9
ISA-14
I13
Acknowledgment Requested
Required
Identifier (ID)
Min 1Max 1
0
No Acknowledgment Requested
1
Interchange Acknowledgment Requested
ISA-15
I14
Usage Indicator
Required
Identifier (ID)
Min 1Max 1
I
Information
P
Production Data
T
Test Data
ISA-16
I15
Component Element Separator
Required
String (AN)
Min 1Max 1
>
Component Element Separator

Functional Group Header

RequiredMax use 1
Example
GS-01
479
Functional Identifier Code
Required
Identifier (ID)
WB
Rail Carrier Waybill Interchange (417)
GS-02
142
Application Sender's Code
Required
String (AN)
Min 2Max 15
GS-03
124
Application Receiver's Code
Required
String (AN)
Min 2Max 15
Required
Date (DT)
CCYYMMDD format
Required
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
GS-06
28
Group Control Number
Required
Numeric (N0)
Min 1Max 9
GS-07
455
Responsible Agency Code
Required
Identifier (ID)
Min 1Max 2
T
Transportation Data Coordinating Committee (TDCC)
X
Accredited Standards Committee X12
GS-08
480
Version / Release / Industry Identifier Code
Required
String (AN)
004040
Standards Approved for Publication by ASC X12 Procedures Review Board through October 2000

Heading

ST
0100
Heading > ST

Transaction Set Header

RequiredMax use 1
Example
ST-01
143
Transaction Set Identifier Code
Required
Identifier (ID)
417
Rail Carrier Waybill Interchange
ST-02
329
Transaction Set Control Number
Required
Numeric (N)
Min 4Max 9
ZC1
0200
Heading > ZC1

Beginning Segment for Data Correction or Change

OptionalMax use 1
Example
ZC1-01
145
Shipment Identification Number
Optional
String (AN)
Min 1Max 30
ZC1-02
206
Equipment Initial
Required
String (AN)
Min 1Max 4
ZC1-03
207
Equipment Number
Required
String (AN)
Min 1Max 15
ZC1-04
244
Transaction Reference Number
Required
String (AN)
Min 1Max 15
ZC1-05
243
Transaction Reference Date
Required
Date (DT)
CCYYMMDD format
ZC1-06
202
Correction Indicator
Required
Identifier (ID)
Min 2Max 2
ZC1-07
140
Standard Carrier Alpha Code
Required
Identifier (ID)
Min 2Max 4
ZC1-08
91
Transportation Method/Type Code
Required
Identifier (ID)
Min 1Max 2
ZC1-09
761
Equipment Number Check Digit
Optional
Numeric (N0)
Min 1Max 1
BX
0300
Heading > BX

General Shipment Information

RequiredMax use 1
Example
BX-01
353
Transaction Set Purpose Code
Required
Identifier (ID)
00
Original
BX-02
91
Transportation Method/Type Code
Required
Identifier (ID)
R
Rail
X
Intermodal (Piggyback)
BX-03
146
Shipment Method of Payment
Required
Identifier (ID)
11
Rule 11 Shipment
CC
Collect
NC
Service Freight, No Charge
NR
Non Revenue
PP
Prepaid (by Seller)
BX-04
145
Shipment Identification Number
Optional
String (AN)
Min 1Max 30
BX-05
140
Standard Carrier Alpha Code
Optional
Identifier (ID)
CPRS
Canadian Pacific Railway
BX-06
188
Weight Unit Code
Optional
Identifier (ID)
E
Metric Ton
K
Kilograms
L
Pounds
BX-07
147
Shipment Qualifier
Optional
Identifier (ID)
1
Master Bill for Empty Non-Revenue Equipment
B
Bill of Lading for Individual Shipment
E
Empty Equipment Billing (Non-Revenue)
H
Company Business (Non-revenue)
M
Master Bill of Lading for Assembly, Distribution and Volume Shipment
S
Submaster Bill of Lading for Volume Shipment
W
Revenue Empty
BX-08
226
Section Seven Code
Optional
Identifier (ID)
N
Not in Effect
S
In Effect
BX-09
195
Capacity Load Code
Optional
Identifier (ID)
Min 1Max 1
BNX
0400
Heading > BNX

Rail Shipment Information

RequiredMax use 1
Example
BNX-01
460
Shipment Weight Code
Optional
Identifier (ID)
A
Shipper's Weight Agreement
M
Manifest Weight
N
No Wt. Req., Ship. Moving on Contract or per car rate
O
Official Weight
R
Carrier Scale Weight
S
Shipper Certified Scale Weights
T
Tariff Authorized Weight
BNX-03
11
Billing Code
Optional
Identifier (ID)
E
Storage
M
Multiple Shipment Billing
S
Single Shipment Billing
U
Unit Train Billing
N9
0500
Heading > N9

Reference Identification

OptionalMax use 30
Example
At least one of Reference Identification (N9-02) or Free-form Description (N9-03) is required
If Time Code (N9-06) is present, then Time (N9-05) is required
N9-01
128
Reference Identification Qualifier
Required
Identifier (ID)
Usage notes
2K
Food and Drug Administration (FDA) Product Type
09
Customs Bar Code Number
BL
Government Bill of Lading
BM
Bill of Lading Number
BN
Booking Number
CG
Consignee's Order Number
CN
Carrier's Reference Number (PRO/Invoice)
CO
Customer Order Number
CR
Customer Reference Number
CT
Contract Number
EB
Embargo Permit Number
ED
Export Declaration
EN
Embargo Number
EP
Export Permit Number
FRC
GB
Grain Block Number
GR
Grain Order Reference Number
GT
Goods and Service Tax Registration Number
IB
In Bond Number
IL
Internal Order Number
MB
Master Bill of Lading
OD
Original Return Request Reference Number
PN
Permit Number
PO
Purchase Order Number
SI
Shipper's Identifying Number for Shipment (SID)
SO
Shipper's Order (Invoice Number)
UT
Unit Train
WM
Weight Agreement Number
WO
Work Order Number
ZZ
Mutually Defined
N9-02
127
Reference Identification
Optional
String (AN)
Min 1Max 50
N9-03
369
Free-form Description
Optional
String (AN)
Min 1Max 45
Optional
Date (DT)
CCYYMMDD format
Optional
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
N9-06
623
Time Code
Optional
Identifier (ID)
Min 2Max 2
CM
0600
Heading > CM

Cargo Manifest

OptionalMax use 2
Example
If Date (CM-04) is present, then Port or Terminal Function Code (CM-02) is required
CM-01
55
Flight/Voyage Number
Optional
String (AN)
Min 2Max 10
CM-02
115
Port or Terminal Function Code
Optional
Identifier (ID)
Min 1Max 1
CM-03
114
Port Name
Optional
String (AN)
Min 2Max 24
Optional
Date (DT)
CCYYMMDD format
CM-05
13
Booking Number
Optional
String (AN)
Min 1Max 17
CM-06
140
Standard Carrier Alpha Code
Optional
Identifier (ID)
Min 2Max 4
CM-07
140
Standard Carrier Alpha Code
Optional
Identifier (ID)
Min 2Max 4
Optional
Date (DT)
CCYYMMDD format
CM-09
182
Vessel Name
Optional
String (AN)
Min 2Max 28
CM-10
113
Pier Number
Optional
String (AN)
Min 1Max 4
CM-11
112
Pier Name
Optional
String (AN)
Min 2Max 14
CM-12
174
Terminal Name
Optional
String (AN)
Min 2Max 30
CM-13
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
CM-14
26
Country Code
Optional
Identifier (ID)
Min 2Max 3
CM-15
127
Reference Identification
Optional
String (AN)
Min 1Max 50
DTM
0700
Heading > DTM

Date/Time Reference

OptionalMax use 5
Example
If Time Code (DTM-04) is present, then Time (DTM-03) is required
DTM-01
374
Date/Time Qualifier
Required
Identifier (ID)
Min 3Max 3
Optional
Date (DT)
CCYYMMDD format
Optional
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
DTM-04
623
Time Code
Optional
Identifier (ID)
Min 2Max 2
N7 Loop
RequiredMax >1
N7
0800
Heading > N7 Loop > N7

Equipment Details

RequiredMax use 1
Example
If either Weight (N7-03) or Weight Qualifier (N7-04) is present, then the other is required
N7-01
206
Equipment Initial
Required
String (AN)
Min 1Max 4
N7-02
207
Equipment Number
Required
String (AN)
Min 1Max 15
N7-03
81
Weight
Optional
Decimal number (R)
Min 1Max 10
N7-04
187
Weight Qualifier
Optional
Identifier (ID)
A3
Shippers Weight
E
Estimated Net Weight
G
Gross Weight
N
Actual Net Weight
N7-06
232
Weight Allowance
Optional
Numeric (N0)
Min 2Max 6
VC Loop
OptionalMax >1
VC
0900
Heading > N7 Loop > VC Loop > VC

Motor Vehicle Control

RequiredMax use 1
Example
VC-01
539
Vehicle Identification Number
Required
String (AN)
Min 1Max 30
VC-02
836
Vehicle Deck Position Code
Optional
Identifier (ID)
Min 2Max 2
VC-03
837
Vehicle Type Code
Optional
Identifier (ID)
1
Automobile
2
Truck
3
Others
4
Used Vehicles
5
Military
VC-04
838
Dealer Code
Optional
String (AN)
Min 2Max 9
N1 Loop
OptionalMax >1
N1
0920
Heading > N7 Loop > VC Loop > N1 Loop > N1

Name

RequiredMax use 1
Example
At least one of Name (N1-02) or Identification Code Qualifier (N1-03) is required
If either Identification Code Qualifier (N1-03) or Identification Code (N1-04) is present, then the other is required
N1-01
98
Entity Identifier Code
Required
Identifier (ID)
CN
Consignee
N1
Notify Party no. 1
OW
Owner of Property or Unit
PF
Party to Receive Freight Bill
UC
Ultimate Consignee
Optional
String (AN)
Min 1Max 60
N1-03
66
Identification Code Qualifier
Optional
Identifier (ID)
Min 1Max 2
N1-04
67
Identification Code
Optional
String (AN)
Min 2Max 80
N3
0940
Heading > N7 Loop > VC Loop > N1 Loop > N3

Address Information

OptionalMax use 2
Example
N3-01
166
Address Information
Required
String (AN)
Min 1Max 55
N3-02
166
Address Information
Optional
String (AN)
Min 1Max 55
N4
0960
Heading > N7 Loop > VC Loop > N1 Loop > N4

Geographic Location

OptionalMax use 1
Example
N4-01
19
City Name
Optional
String (AN)
Min 2Max 30
N4-02
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
N4-03
116
Postal Code
Optional
Identifier (ID)
Min 3Max 15
N4-04
26
Country Code
Optional
Identifier (ID)
Min 2Max 3
H3
0980
Heading > N7 Loop > VC Loop > N1 Loop > H3

Special Handling Instructions

OptionalMax use 1
Example
H3-01
152
Special Handling Code
Optional
Identifier (ID)
Min 2Max 3
N1 Loop end
VC Loop end
M12
1200
Heading > N7 Loop > M12

In-bond Identifying Information

OptionalMax use 2
Example
If either Reference Identification Qualifier (M12-08) or Reference Identification (M12-09) is present, then the other is required
M12-01
581
Customs Entry Type Code
Required
Identifier (ID)
Min 2Max 2
M12-02
601
Customs Entry Number
Optional
String (AN)
Min 1Max 15
M12-03
310
Location Identifier
Optional
String (AN)
Min 1Max 30
M12-04
310
Location Identifier
Optional
String (AN)
Min 1Max 30
M12-05
602
Customs Shipment Value
Optional
String (AN)
Min 2Max 8
M12-08
128
Reference Identification Qualifier
Optional
Identifier (ID)
Min 2Max 3
M12-09
127
Reference Identification
Optional
String (AN)
Min 1Max 50
M7
1400
Heading > N7 Loop > M7

Seal Numbers

OptionalMax use 5
Example
M7-01
225
Seal Number
Required
String (AN)
Min 2Max 15
M7-02
225
Seal Number
Optional
String (AN)
Min 2Max 15
M7-03
225
Seal Number
Optional
String (AN)
Min 2Max 15
M7-04
225
Seal Number
Optional
String (AN)
Min 2Max 15
GA
1650
Heading > N7 Loop > GA

Canadian Grain Information

OptionalMax use 15
Example
If either Reference Identification Qualifier (GA-04) or Reference Identification (GA-05) is present, then the other is required
If either Location Identifier (GA-14) or State or Province Code (GA-15) is present, then the other is required
If either Percent Qualifier (GA-16) or Percent (GA-17) is present, then the other is required
GA-01
1275
Fumigated/Cleaned Indicator
Optional
Identifier (ID)
Min 1Max 1
GA-02
22
Commodity Code
Optional
String (AN)
Min 1Max 30
GA-03
1576
Inspected/Weighed Indicator Code
Optional
Identifier (ID)
Min 1Max 2
GA-04
128
Reference Identification Qualifier
Optional
Identifier (ID)
Min 2Max 3
GA-05
127
Reference Identification
Optional
String (AN)
Min 1Max 50
Optional
Numeric (N0)
Min 6Max 6
GA-07
899
Unload Terminal Elevator Code
Optional
Identifier (ID)
Min 3Max 4
Optional
Date (DT)
CCYYMMDD format
GA-09
1470
Number
Optional
Numeric (N0)
Min 1Max 9
GA-10
1276
Machine Separable Indicator Code
Optional
Identifier (ID)
Min 2Max 2
GA-11
1277
Canadian Wheat Board (CWB) Marketing Class Code
Optional
Identifier (ID)
Min 1Max 1
GA-12
1278
Canadian Wheat Board (CWB) Marketing Class Type Code
Optional
Identifier (ID)
Min 1Max 1
GA-14
310
Location Identifier
Optional
String (AN)
Min 1Max 30
GA-15
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
GA-16
1004
Percent Qualifier
Optional
Identifier (ID)
Min 1Max 2
GA-17
954
Percent
Optional
Decimal number (R)
Min 1Max 10
N7 Loop end
N8
1800
Heading > N8

Waybill Reference

RequiredMax use 499
Example
N8-01
186
Waybill Number
Required
Numeric (N0)
Min 1Max 6
Required
Date (DT)
CCYYMMDD format
F9
2000
Heading > F9

Origin Station

RequiredMax use 1
Example
F9-01
573
Freight Station Accounting Code
Optional
Identifier (ID)
Min 1Max 5
F9-02
19
City Name
Required
String (AN)
Min 2Max 30
F9-03
156
State or Province Code
Required
Identifier (ID)
Min 2Max 2
F9-08
154
Standard Point Location Code
Optional
Identifier (ID)
Min 6Max 9
D9
2100
Heading > D9

Destination Station

RequiredMax use 1
Example
D9-01
573
Freight Station Accounting Code
Optional
Identifier (ID)
Min 1Max 5
D9-02
19
City Name
Required
String (AN)
Min 2Max 30
D9-03
156
State or Province Code
Required
Identifier (ID)
Min 2Max 2
D9-08
154
Standard Point Location Code
Optional
Identifier (ID)
Min 6Max 9
N1 Loop
RequiredMax >1
N1
2200
Heading > N1 Loop > N1

Name

RequiredMax use 1
Example
At least one of Name (N1-02) or Identification Code Qualifier (N1-03) is required
If either Identification Code Qualifier (N1-03) or Identification Code (N1-04) is present, then the other is required
N1-01
98
Entity Identifier Code
Required
Identifier (ID)
Usage notes
11
Party to be billed(AAR Accounting Rule 11)
BN
Beneficial Owner
C1
In Care Of Party no. 1
CN
Consignee
FW
Forwarder
IM
Importer
N1
Notify Party no. 1
PF
Party to Receive Freight Bill
PU
Party at Pick-up Location
SH
Shipper
UC
Ultimate Consignee
XQ
Canadian Customs Broker
XR
Mexican Customs Broker
XU
United States Customs Broker
Optional
String (AN)
Min 1Max 60
N1-03
66
Identification Code Qualifier
Optional
Identifier (ID)
Min 1Max 2
N1-04
67
Identification Code
Optional
String (AN)
Min 2Max 80
N3
2300
Heading > N1 Loop > N3

Address Information

OptionalMax use 2
Example
N3-01
166
Address Information
Required
String (AN)
Min 1Max 55
N4
2400
Heading > N1 Loop > N4

Geographic Location

OptionalMax use 1
Example
N4-01
19
City Name
Optional
String (AN)
Min 2Max 30
N4-02
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
N4-03
116
Postal Code
Optional
Identifier (ID)
Min 3Max 15
N4-04
26
Country Code
Optional
Identifier (ID)
Min 2Max 3
BL
2620
Heading > N1 Loop > BL

Billing Information

OptionalMax use 12
Example
At least one of Freight Station Accounting Code (BL-02) or City Name (BL-05) is required
If State or Province Code (BL-06) is present, then City Name (BL-05) is required
At least one of Freight Station Accounting Code (BL-03) or City Name (BL-09) is required
If State or Province Code (BL-10) is present, then City Name (BL-09) is required
BL-01
747
Rebill Reason Code
Required
Identifier (ID)
RC
R11 Collect Beyond
RD
R11 Prepaid Beyond
BL-02
573
Freight Station Accounting Code
Optional
Identifier (ID)
Min 1Max 5
BL-03
573
Freight Station Accounting Code
Optional
Identifier (ID)
Min 1Max 5
BL-04
154
Standard Point Location Code
Optional
Identifier (ID)
Min 6Max 9
BL-05
19
City Name
Optional
String (AN)
Min 2Max 30
BL-06
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
BL-09
19
City Name
Optional
String (AN)
Min 2Max 30
BL-10
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
BL-11
26
Country Code
Optional
Identifier (ID)
Min 2Max 3
BL-12
140
Standard Carrier Alpha Code
Optional
Identifier (ID)
Min 2Max 4
BL-13
140
Standard Carrier Alpha Code
Optional
Identifier (ID)
Min 2Max 4
N1 Loop end
R2
4700
Heading > R2

Route Information

RequiredMax use 13
Example
R2-01
140
Standard Carrier Alpha Code
Required
Identifier (ID)
CPRS
SCAC Code for Canadian Pacific Railway
R2-02
133
Routing Sequence Code
Required
Identifier (ID)
1
1st Carrier after Origin Carrier
2
2nd Carrier after Origin Carrier
3
3rd Carrier after Origin Carrier
4
4th Carrier after Origin Carrier
5
5th Carrier after Origin Carrier
6
6th Carrier after Origin Carrier
D
DELY (Delivery Switch Carrier)
I
Origin Switch Carrier
R
Origin Carrier, Rule 11 Shipment
S
Origin Carrier, Shipper's Routing (Rail)
R2-03
19
City Name
Optional
String (AN)
Min 2Max 30
Usage notes
R2-04
154
Standard Point Location Code
Optional
Identifier (ID)
Min 6Max 9
R2-05
177
Intermodal Service Code
Optional
Identifier (ID)
Min 1Max 2
H3
5200
Heading > H3

Special Handling Instructions

OptionalMax use 20
Example
H3-01
152
Special Handling Code
Optional
Identifier (ID)
Min 2Max 3
PS
5300
Heading > PS

Protective Service Instructions

OptionalMax use 5
Example
If Temperature (PS-04) is present, then Unit or Basis for Measurement Code (PS-03) is required
PS-01
746
Protective Service Rule Code
Required
Identifier (ID)
Min 3Max 9
PS-02
241
Protective Service Code
Required
Identifier (ID)
Min 1Max 4
PS-03
355
Unit or Basis for Measurement Code
Optional
Identifier (ID)
Min 2Max 2
PS-04
408
Temperature
Optional
Decimal number (R)
Min 1Max 4
PS-05
140
Standard Carrier Alpha Code
Optional
Identifier (ID)
Min 2Max 4
LX Loop
RequiredMax >1
LX
5400
Heading > LX Loop > LX

Assigned Number

RequiredMax use 1
Example
LX-01
554
Assigned Number
Required
Numeric (N0)
Min 1Max 6
L5
5500
Heading > LX Loop > L5

Description, Marks and Numbers

RequiredMax use 15
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
Required
Numeric (N0)
Min 1Max 3
L5-02
79
Lading Description
Required
String (AN)
Min 1Max 50
L5-03
22
Commodity Code
Required
String (AN)
Min 1Max 30
L5-04
23
Commodity Code Qualifier
Optional
Identifier (ID)
Min 1Max 1
L5-05
103
Packaging Code
Optional
String (AN)
Min 3Max 5
L0 Loop
RequiredMax >1
L0
5700
Heading > LX Loop > L0 Loop > L0

Line Item - Quantity and Weight

RequiredMax use 1
Example
If either Billed/Rated-as Quantity (L0-02) or Billed/Rated-as Qualifier (L0-03) is present, then the other is required
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 3
L0-02
220
Billed/Rated-as Quantity
Optional
Decimal number (R)
Min 1Max 11
L0-03
221
Billed/Rated-as Qualifier
Optional
Identifier (ID)
DM
Miles
GL
Gallon
ND
Cord
NP
Piece
NU
Unit
NV
Vehicle
L0-04
81
Weight
Optional
Decimal number (R)
Min 1Max 10
L0-05
187
Weight Qualifier
Optional
Identifier (ID)
Usage notes
A3
Shippers Weight
B
Billed Weight
C
Actual Net Repeated for Combination
E
Estimated Net Weight
G
Gross Weight
J
Light Weight
K
Clean Out
M
Minimum Weight (for rate)
N
Actual Net Weight
O
Excess Weight Over Maximum
X
Maximum Weight (for Rate)
L0-08
80
Lading Quantity
Optional
Numeric (N0)
Min 1Max 7
L0-09
211
Packaging Form Code
Optional
Identifier (ID)
Usage notes
BAG
Bag
BAL
Bale
BDL
Bundle
BLK
Bulk
CLD
Car Load, Rail
CTN
Carton
DRM
Drum
LIF
Lifts
PCS
Pieces
PKG
Package
PLT
Pallet
SKD
Skid
TKR
Tank Car
UNT
Unit
VEH
Vehicles
L0-11
188
Weight Unit Code
Optional
Identifier (ID)
Min 1Max 1
PI
5900
Heading > LX Loop > L0 Loop > PI

Price Authority Identification

OptionalMax use 30
Example
PI-01
128
Reference Identification Qualifier
Required
Identifier (ID)
CT
Contract Number
PR
Price Quote Number
TS
Tariff Number
PI-02
127
Reference Identification
Required
String (AN)
Min 1Max 50
PI-03
436
Primary Publication Authority Code
Optional
Identifier (ID)
OP
Other Publication
TP
Tariff Publication
PI-04
930
Regulatory Agency Code
Optional
Identifier (ID)
Min 3Max 5
PI-05
168
Tariff Agency Code
Optional
Identifier (ID)
Min 1Max 4
PI-06
965
Issuing Carrier Identifier
Optional
String (AN)
Min 1Max 10
PI-07
660
Contract Suffix
Optional
String (AN)
Min 1Max 2
PI-08
169
Tariff Item Number
Optional
String (AN)
Min 1Max 16
PI-09
173
Tariff Supplement Identifier
Optional
String (AN)
Min 1Max 4
PI-10
172
Tariff Section
Optional
String (AN)
Min 1Max 2
PI-11
660
Contract Suffix
Optional
String (AN)
Min 1Max 2
L0 Loop end
X1
5950
Heading > LX Loop > X1

Export License

OptionalMax use 6
Example
X1-01
83
Code For Licensing, Certification, Registration, or Accreditation Agency
Optional
Identifier (ID)
Min 1Max 2
X1-02
50
Export License Number
Optional
String (AN)
Min 6Max 35
X1-03
51
Export License Status Code
Optional
Identifier (ID)
Min 1Max 1
Optional
Date (DT)
CCYYMMDD format
X1-05
52
Export License Symbol Code
Optional
Identifier (ID)
Min 1Max 2
X1-06
48
Export License Control Code
Optional
Identifier (ID)
Min 1Max 1
X1-07
26
Country Code
Optional
Identifier (ID)
Min 2Max 3
X1-08
141
Schedule B Code
Optional
Identifier (ID)
Min 7Max 10
X1-09
210
International/Domestic Code
Optional
Identifier (ID)
Min 1Max 1
X1-10
80
Lading Quantity
Optional
Numeric (N0)
Min 1Max 7
X1-11
148
Lading Value
Optional
Decimal number (R)
Min 2Max 9
X1-12
47
Export Filing Key Code
Optional
Identifier (ID)
Min 1Max 1
X1-13
355
Unit or Basis for Measurement Code
Optional
Identifier (ID)
Min 2Max 2
X1-14
212
Unit Price
Optional
Decimal number (R)
Min 1Max 15
X1-15
1306
U.S. Government License Type
Optional
String (AN)
Min 1Max 1
X1-16
67
Identification Code
Optional
String (AN)
Min 2Max 80
X1-17
310
Location Identifier
Optional
String (AN)
Min 1Max 30
LX Loop end
LS
6600
Heading > LS

Loop Header

OptionalMax use 1
Example
LS-01
447
Loop Identifier Code
Required
String (AN)
Min 1Max 6
LH1 Loop
OptionalMax >1
LH1
6700
Heading > LH1 Loop > LH1

Hazardous Identification Information

RequiredMax use 1
Example
LH1-01
355
Unit or Basis for Measurement Code
Required
Identifier (ID)
Usage notes
1P
Tank Car
16
115 Kilogram Drum
17
100 Pound Drum
18
55 Gallon Drum
TK
Tank
LH1-02
80
Lading Quantity
Required
Numeric (N0)
Min 1Max 7
LH1-03
277
UN/NA Identification Code
Optional
Identifier (ID)
Min 6Max 6
LH1-05
22
Commodity Code
Optional
String (AN)
Min 1Max 30
LH1-06
355
Unit or Basis for Measurement Code
Optional
Identifier (ID)
Min 2Max 2
LH1-07
380
Quantity
Optional
Decimal number (R)
Min 1Max 15
LH1-09
665
Residue Indicator Code
Optional
Identifier (ID)
Min 1Max 1
LH1-10
254
Packing Group Code
Optional
Identifier (ID)
Min 1Max 3
LH2
6800
Heading > LH1 Loop > LH2

Hazardous Classification Information

OptionalMax use 4
Example
If either Unit or Basis for Measurement Code (LH2-06) or Temperature (LH2-07) is present, then the other is required
If either Unit or Basis for Measurement Code (LH2-08) or Temperature (LH2-09) is present, then the other is required
If either Unit or Basis for Measurement Code (LH2-10) or Temperature (LH2-11) is present, then the other is required
If either Weight Unit Code (LH2-12) or Net Explosive Quantity (LH2-13) is present, then the other is required
LH2-01
215
Hazardous Classification
Optional
Identifier (ID)
Min 1Max 30
LH2-02
983
Hazardous Class Qualifier
Optional
Identifier (ID)
P
Primary
S
Secondary
LH2-03
218
Hazardous Placard Notation
Optional
Identifier (ID)
Min 14Max 40
LH2-04
222
Hazardous Endorsement
Optional
Identifier (ID)
Min 4Max 25
LH2-05
759
Reportable Quantity Code
Optional
Identifier (ID)
RQ
Reportable Quantity
LH2-06
355
Unit or Basis for Measurement Code
Optional
Identifier (ID)
CE
Centigrade, Celsius
FA
Fahrenheit
LH2-07
408
Temperature
Optional
Decimal number (R)
Min 1Max 4
LH2-08
355
Unit or Basis for Measurement Code
Optional
Identifier (ID)
CE
Centigrade, Celsius
FA
Fahrenheit
LH2-09
408
Temperature
Optional
Decimal number (R)
Min 1Max 4
LH2-10
355
Unit or Basis for Measurement Code
Optional
Identifier (ID)
Min 2Max 2
LH2-11
408
Temperature
Optional
Decimal number (R)
Min 1Max 4
LH2-12
188
Weight Unit Code
Optional
Identifier (ID)
E
Metric Ton
K
Kilograms
L
Pounds
LH2-13
267
Net Explosive Quantity
Optional
Numeric (N0)
Min 1Max 10
LH3
6900
Heading > LH1 Loop > LH3

Hazardous Material Shipping Name

OptionalMax use 10
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
LH3-02
984
Hazardous Material Shipping Name Qualifier
Optional
Identifier (ID)
C
Canadian Shipping Name
D
Domestic (United States) Shipping Name
I
International Shipping Name
LFH
7000
Heading > LH1 Loop > LFH

Freeform Hazardous Material Information

OptionalMax use 20
Example
If either Unit or Basis for Measurement Code (LFH-05) or Quantity (LFH-06) is present, then the other is required
LFH-01
808
Hazardous Material Shipment Information Qualifier
Required
Identifier (ID)
Usage notes
ADI
Additional Descriptive Information Not Required by Regulation but Desired to Accompany the Movement by the Shipper
D13
"DOT - 113, Do Not Bump or Cut Off Car While in Motion" Declaration
DRC
Damaged Car Number
HOT
Identifies Products in a Heated Molten State
HZC
Hazardous Substance Constituents
INH
Inhalation Hazard
LQY
"Limited Quantity" Declaration
MOS
Maximum Operating Speed
MPI
Marine Pollutant
PIH
"Poison - Inhalation Hazard" Declaration
POI
"Poison" Declaration
RAM
Radioactive Material Data
TEC
Technical or Chemical Group Name
TNM
Trade Name
WST
Waste Declaration
LFH-02
809
Hazardous Material Shipment Information
Required
String (AN)
Min 1Max 25
LFH-03
809
Hazardous Material Shipment Information
Optional
String (AN)
Min 1Max 25
LFH-04
1023
Hazard Zone Code
Optional
Identifier (ID)
A
Hazard Zone A
B
Hazard Zone B
C
Hazard Zone C
D
Hazard Zone D
LFH-05
355
Unit or Basis for Measurement Code
Optional
Identifier (ID)
4N
Megabecquerel
G4
Gigabecquerel
R2
Becquerel
LFH-06
380
Quantity
Optional
Decimal number (R)
Min 1Max 15
LFH-07
380
Quantity
Optional
Decimal number (R)
Min 1Max 15
LEP
7100
Heading > LH1 Loop > LEP

EPA Required Data

OptionalMax use 3
Example
LEP-01
806
EPA Waste Stream Number Code
Optional
Identifier (ID)
Min 4Max 6
LH4
7200
Heading > LH1 Loop > LH4

Canadian Dangerous Requirements

OptionalMax use 1
Example
If either Emergency Response Plan Number (LH4-01) or Communication Number (LH4-02) is present, then the other is required
LH4-01
238
Emergency Response Plan Number
Optional
String (AN)
Min 1Max 12
LH4-02
364
Communication Number
Optional
String (AN)
Min 1Max 256
LHT
7300
Heading > LH1 Loop > LHT

Transborder Hazardous Requirements

OptionalMax use 3
Example
LHT-01
215
Hazardous Classification
Optional
Identifier (ID)
Min 1Max 30
LHR
7400
Heading > LH1 Loop > LHR

Hazardous Material Identifying Reference Numbers

OptionalMax use 5
Example
LHR-01
128
Reference Identification Qualifier
Required
Identifier (ID)
Usage notes
AH
Agreement Number
F3
Submission Number
HA
Competent Authority
HD
Department of Transportation Hazardous Number
HE
Hazardous Exemption Number
MA
Ship Notice/Manifest Number
MDN
Hazardous Waste Manifest Document Number
PN
Permit Number
S0
Special Approval
LHR-02
127
Reference Identification
Required
String (AN)
Min 1Max 50
Optional
Date (DT)
CCYYMMDD format
PER
7450
Heading > LH1 Loop > PER

Administrative Communications Contact

OptionalMax use 5
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)
CN
General Contact
HM
Hazardous Material Contact
Optional
String (AN)
Min 1Max 60
PER-03
365
Communication Number Qualifier
Optional
Identifier (ID)
TE
Telephone
PER-04
364
Communication Number
Optional
String (AN)
Min 1Max 256
N1 Loop
OptionalMax >1
N1
7460
Heading > LH1 Loop > N1 Loop > N1

Name

RequiredMax use 1
Example
At least one of Name (N1-02) or Identification Code Qualifier (N1-03) is required
If either Identification Code Qualifier (N1-03) or Identification Code (N1-04) is present, then the other is required
N1-01
98
Entity Identifier Code
Required
Identifier (ID)
Min 2Max 3
Optional
String (AN)
Min 1Max 60
N1-03
66
Identification Code Qualifier
Optional
Identifier (ID)
Min 1Max 2
N1-04
67
Identification Code
Optional
String (AN)
Min 2Max 80
N3
7470
Heading > LH1 Loop > N1 Loop > N3

Address Information

OptionalMax use 2
Example
N3-01
166
Address Information
Required
String (AN)
Min 1Max 55
N4
7480
Heading > LH1 Loop > N1 Loop > N4

Geographic Location

OptionalMax use 1
Example
N4-01
19
City Name
Optional
String (AN)
Min 2Max 30
N4-02
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
N4-03
116
Postal Code
Optional
Identifier (ID)
Min 3Max 15
N4-04
26
Country Code
Optional
Identifier (ID)
Min 2Max 3
PER
7490
Heading > LH1 Loop > N1 Loop > PER

Administrative Communications Contact

OptionalMax use 2
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)
Min 2Max 2
Optional
String (AN)
Min 1Max 60
PER-03
365
Communication Number Qualifier
Optional
Identifier (ID)
Min 2Max 2
PER-04
364
Communication Number
Optional
String (AN)
Min 1Max 256
N1 Loop end
LH1 Loop end
LE
7500
Heading > LE

Loop Trailer

OptionalMax use 1
Example
LE-01
447
Loop Identifier Code
Required
String (AN)
Min 1Max 6
PER
7600
Heading > PER

Administrative Communications Contact

OptionalMax use 5
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)
Min 2Max 2
Optional
String (AN)
Min 1Max 60
PER-03
365
Communication Number Qualifier
Optional
Identifier (ID)
Min 2Max 2
PER-04
364
Communication Number
Optional
String (AN)
Min 1Max 256
LH2
7700
Heading > LH2

Hazardous Classification Information

OptionalMax use 6
Example
LH2-03
218
Hazardous Placard Notation
Optional
Identifier (ID)
Min 14Max 40
LHR
7800
Heading > LHR

Hazardous Material Identifying Reference Numbers

OptionalMax use 1
Example
LHR-01
128
Reference Identification Qualifier
Required
Identifier (ID)
Min 2Max 3
LHR-02
127
Reference Identification
Required
String (AN)
Min 1Max 50
Optional
Date (DT)
CCYYMMDD format
XH
7850
Heading > XH

Pro Forma - B13 Information

OptionalMax use 1
Example
XH-01
100
Currency Code
Required
Identifier (ID)
Min 3Max 3
XH-02
645
Related Company Indication Code
Optional
Identifier (ID)
Min 1Max 1
XH-03
150
Special Charge or Allowance Code
Optional
Identifier (ID)
Min 3Max 3
XH-04
610
Amount
Optional
Numeric (N2)
Min 1Max 15
XH-05
503
Block 20 Code
Optional
Identifier (ID)
Min 1Max 1
XH-06
504
Chemical Analysis Percentage
Optional
Numeric (N2)
Min 2Max 9
XH-07
212
Unit Price
Optional
Decimal number (R)
Min 1Max 15
X7
7900
Heading > X7

Customs Information

OptionalMax use 10
Example
X7-01
61
Free-Form Message
Required
String (AN)
Min 1Max 30
X7-02
61
Free-Form Message
Optional
String (AN)
Min 1Max 30
SE
8100
Heading > SE

Transaction Set Trailer

RequiredMax use 1
Example
SE-01
96
Number of Included Segments
Required
Numeric (N0)
Min 1Max 10
SE-02
329
Transaction Set Control Number
Required
Numeric (N)
Min 4Max 9
Heading end

Functional Group Trailer

RequiredMax use 1
Example
GE-01
97
Number of Transaction Sets Included
Required
Numeric (N0)
Min 1Max 6
GE-02
28
Group Control Number
Required
Numeric (N0)
Min 1Max 9

Interchange Control Trailer

RequiredMax use 1
Example
IEA-01
I16
Number of Included Functional Groups
Required
Numeric (N0)
Min 1Max 5
IEA-02
I12
Interchange Control Number
Required
Numeric (N0)
Min 9Max 9
EDI Samples

Sample

ISA*00* *00* *ZZ*SENDER *ZZ*RECEIVER *231102*0348*^*00404*000000001*0*T*>
GS*WB*SENDERGS*RECEIVERGS*20231102*034836*000000001*X*004040
ST*417*0001
BX*00*R*NC*13403*CPRS*L*H*N*V
BNX*N**S
N9*IL*12345
N9*FRC*H283
N9*BM*NS**20190123*133500*CS
N9*WM*TAW
N9*OD*13403
DTM*002*20190123*1335*CS
N7*UCRY*6510*110685*N**00
N8*379970*20190123
F9*00817*SUPERIOR*WI*****323130
D9*09637*ASHCROFT*BC*****091045
N1*SH*SHIPPER NAME*C5*0061794930000
N3*3185 S COUNTY RD A
N4*SUPERIOR*WI*54880*US
N1*CN*CANADIAN PACIFIC RAILWAY CO*C5*2001983699040
N3*7550 OGDEN DALE ROAD SE
N4*CALGARY*AB*T2C4X9*CA
N1*C1*CARE OF PARTY*C5*2029429670000
N3*1425 EVANS RD
N4*ASHCROFT*BC*V0K1A0*CA
N1*XQ*CUSTOMS BROKER*C5*A000302450000
N3*ROUTE 9-15
N4*LACOLLE*PQ*J0J1J0*CA
R2*CPRS*S
LX*1
L5*1*TIES, RAILROAD*2411210*T
L0*1***0*N***471*PCS**L
SE*30*0001
GE*1*000000001
IEA*1*000000001

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.