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.
X12 417 Rail Carrier Waybill Interchange
—
Delimiters
- ~ Segment
- * Element
- > Component
- ^ Repetition
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
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
LH1 Loop
LH1
6700
Hazardous Identification Information
Max use 1
Required
LH2
6800
Hazardous Classification Information
Max use 4
Optional
LH3
6900
Hazardous Material Shipping Name
Max use 10
Optional
LFH
7000
Freeform Hazardous Material Information
Max use 20
Optional
LEP
7100
EPA Required Data
Max use 3
Optional
LH4
7200
Canadian Dangerous Requirements
Max use 1
Optional
LHT
7300
Transborder Hazardous Requirements
Max use 3
Optional
LHR
7400
Hazardous Material Identifying Reference Numbers
Max use 5
Optional
PER
7450
Administrative Communications Contact
Max use 5
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
—
- 00
- No Authorization Information Present (No Meaningful Information in I02)
—
- 00
- No Security Information Present (No Meaningful Information in I04)
—
- 00404
- Standards Approved for Publication by ASC X12 Procedures Review Board through October 2000
—
- 0
- No Acknowledgment Requested
- 1
- Interchange Acknowledgment Requested
—
- T
- Transportation Data Coordinating Committee (TDCC)
- X
- Accredited Standards Committee X12
Heading
—
- 11
- Rule 11 Shipment
- CC
- Collect
- NC
- Service Freight, No Charge
- NR
- Non Revenue
- PP
- Prepaid (by Seller)
—
- 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
—
- 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
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
—
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
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
DTM
0700
Heading > DTM
Date/Time Reference
OptionalMax use 5
—
Example
If Time Code (DTM-04) is present, then Time (DTM-03) is required
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
—
- A3
- Shippers Weight
- E
- Estimated Net Weight
- G
- Gross Weight
- N
- Actual Net Weight
VC Loop
OptionalMax >1
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
—
- CN
- Consignee
- N1
- Notify Party no. 1
- OW
- Owner of Property or Unit
- PF
- Party to Receive Freight Bill
- UC
- Ultimate Consignee
H3
0980
Heading > N7 Loop > VC Loop > N1 Loop > H3
Special Handling Instructions
OptionalMax use 1
—
Example
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
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
N7 Loop end
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
—
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
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
N1 Loop end
—
- CPRS
- SCAC Code for Canadian Pacific Railway
—
- 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)
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
LX Loop
RequiredMax >1
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
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
—
- DM
- Miles
- GL
- Gallon
- ND
- Cord—
- NP
- Piece
- NU
- Unit—
- NV
- Vehicle
—
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)
—
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
—
- CT
- Contract Number
- PR
- Price Quote Number
- TS
- Tariff Number
—
- OP
- Other Publication
- TP
- Tariff Publication
L0 Loop end
Optional
Identifier (ID)
Min 1Max 2
—
LX Loop end
LH1 Loop
OptionalMax >1
—
Usage notes
—
- 1P
- Tank Car
- 16
- 115 Kilogram Drum—
- 17
- 100 Pound Drum—
- 18
- 55 Gallon Drum—
- TK
- Tank
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
—
- CE
- Centigrade, Celsius
- FA
- Fahrenheit
—
- CE
- Centigrade, Celsius
- FA
- Fahrenheit
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
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
—
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
—
- A
- Hazard Zone A
- B
- Hazard Zone B
- C
- Hazard Zone C
- D
- Hazard Zone D
—
- 4N
- Megabecquerel—
- G4
- Gigabecquerel—
- R2
- Becquerel—
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
LHR
7400
Heading > LH1 Loop > LHR
Hazardous Material Identifying Reference Numbers
OptionalMax use 5
—
Example
—
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
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
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
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
N1 Loop end
LH1 Loop end
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
Heading end
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
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.