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

This X12 Transaction Set contains the format and establishes the data contents of the Rail Carrier Waybill Interchange Transaction Set (417) for use within the context of an Electronic Data Interchange (EDI) environment. The transaction set can be used to provide the rail carrier with detailed movement instructions pertinent to a rail carrier shipment and is used by all Class I rail carriers in the United States and Canada.

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

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
Required
Identifier (ID)

Code specifying the version number of the interchange control segments

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

A control number assigned by the interchange sender

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

Code indicating sender's request for an interchange acknowledgment

0
No Acknowledgment Requested
1
Interchange Acknowledgment Requested
ISA-15
I14
Usage Indicator
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 Element Separator
Required
String (AN)
Min 1Max 1

Type is not applicable; the component 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

WB
Rail Carrier Waybill Interchange (417)
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

Required
Date (DT)
CCYYMMDD format

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

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

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

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 uniquely 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).
417
Rail Carrier Waybill Interchange
ST-02
329
Transaction Set Control Number
Required
Numeric (N)
Min 4Max 9

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

ZC1
0200
Heading > ZC1

Beginning Segment for Data Correction or Change

OptionalMax use 1

To transmit identifying numbers, dates, and other basic data relating to the transaction set

Example
ZC1-01
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)

ZC1-02
206
Equipment Initial
Required
String (AN)
Min 1Max 4

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

  • For any rail shipment, ZC102 is required.
ZC1-03
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)

ZC1-04
244
Transaction Reference Number
Required
String (AN)
Min 1Max 15

Sender's assigned number for referenced transaction set

ZC1-05
243
Transaction Reference Date
Required
Date (DT)
CCYYMMDD format

Date of referenced transaction set expressed in format CCYYMMDD where CC represents the first two digits of the calendar year

ZC1-06
202
Correction Indicator
Required
Identifier (ID)
Min 2Max 2

Code used to indicate that the transaction set contains information which corrects previous information

ZC1-07
140
Standard Carrier Alpha Code
Required
Identifier (ID)
Min 2Max 4

Standard Carrier Alpha Code

ZC1-08
91
Transportation Method/Type Code
Required
Identifier (ID)
Min 1Max 2

Code specifying the method or type of transportation for the shipment

  • If ZC108 is "R" (Rail), then ZC102 is required.
ZC1-09
761
Equipment Number Check Digit
Optional
Numeric (N0)
Min 1Max 1

Number which designates the check digit applied to a piece of equipment

  • ZC109 is the equipment check digit for the equipment number in ZC103.
BX
0300
Heading > BX

General Shipment Information

RequiredMax 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.
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

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

Code identifying payment terms for transportation charges

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

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)

Standard Carrier Alpha Code

CPRS
Canadian Pacific Railway
BX-06
188
Weight Unit Code
Optional
Identifier (ID)

Code specifying the weight unit

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

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

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

Volume shipment. A bill of lading with multiple delivery locations.

S
Submaster Bill of Lading for Volume Shipment

A bill of lading for a full truckload shipment.

W
Revenue Empty
BX-08
226
Section Seven Code
Optional
Identifier (ID)

Code indicating applicability of section seven option (if not transmitted assume not in effect)

N
Not in Effect
S
In Effect
BX-09
195
Capacity Load Code
Optional
Identifier (ID)
Min 1Max 1

Code specifying type of capacity load

BNX
0400
Heading > BNX

Rail Shipment Information

RequiredMax use 1

To transmit rail-specific shipment data

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

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

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)

Code indicating type of Bill

E
Storage
M
Multiple Shipment Billing
S
Single Shipment Billing
U
Unit Train Billing
N9
0500
Heading > N9

Reference Identification

OptionalMax use 30

To transmit identifying information as specified by the Reference Identification Qualifier

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)

Code qualifying the Reference Identification

Usage notes

This is not a comprehensive list and only includes some of the most commonly used Reference Identification Qualifiers.

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)

A unique number (to the shipper) assigned by the shipper to identify the shipment.

SO
Shipper's Order (Invoice Number)
UT
Unit Train
WM
Weight Agreement Number
WO
Work Order Number

Number assigned for work including material and labor beyond normal work required to fulfill a service order.

ZZ
Mutually Defined
N9-02
127
Reference Identification
Optional
String (AN)
Min 1Max 50

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

N9-03
369
Free-form Description
Optional
String (AN)
Min 1Max 45

Free-form descriptive text

Optional
Date (DT)
CCYYMMDD format

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

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-06
623
Time Code
Optional
Identifier (ID)
Min 2Max 2

Code identifying the time. In accordance with International Standards Organization standard 8601, time can be specified by a + or - and an indication in hours in relation to Universal Time Coordinate (UTC) time; since + is a restricted character, + and - are substituted by P and M in the codes that follow

  • N906 reflects the time zone which the time reflects.
CM
0600
Heading > CM

Cargo Manifest

OptionalMax use 2

To identify specific flight or voyage information for multimodal shipments

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

Identifying designator for the particular flight or voyage on which the cargo travels

CM-02
115
Port or Terminal Function Code
Optional
Identifier (ID)
Min 1Max 1

Code defining function performed at the port or terminal with respect to a shipment

  • CM02 is "D" for rail origin and "L" for rail destination.
CM-03
114
Port Name
Optional
String (AN)
Min 2Max 24

Free-form name for the place at which an offshore carrier originates or terminates (by transshipment or otherwise) its actual ocean carriage of property

Optional
Date (DT)
CCYYMMDD format

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

  • CM04 is qualified by CM02.
CM-05
13
Booking Number
Optional
String (AN)
Min 1Max 17

Number assigned by the carrier for space reservation

CM-06
140
Standard Carrier Alpha Code
Optional
Identifier (ID)
Min 2Max 4

Standard Carrier Alpha Code

  • CM06 contains the carrier code.
CM-07
140
Standard Carrier Alpha Code
Optional
Identifier (ID)
Min 2Max 4

Standard Carrier Alpha Code

  • CM07 contains the previous carrier code.
Optional
Date (DT)
CCYYMMDD format

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

  • CM08 is the manifest date.
CM-09
182
Vessel Name
Optional
String (AN)
Min 2Max 28

Name of ship as documented in "Lloyd's Register of Ships"

CM-10
113
Pier Number
Optional
String (AN)
Min 1Max 4

Identifying number for the pier

CM-11
112
Pier Name
Optional
String (AN)
Min 2Max 14

Free-form name of the pier

CM-12
174
Terminal Name
Optional
String (AN)
Min 2Max 30

Free-form field for terminal name

CM-13
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2

Code (Standard State/Province) as defined by appropriate government agency

CM-14
26
Country Code
Optional
Identifier (ID)
Min 2Max 3

Code identifying the country

CM-15
127
Reference Identification
Optional
String (AN)
Min 1Max 50

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

  • CM15 is the vessel agent number.
DTM
0700
Heading > DTM

Date/Time Reference

OptionalMax use 5

To specify pertinent dates and times

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

Code specifying type of date or time, or both date and time

Optional
Date (DT)
CCYYMMDD format

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

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)

DTM-04
623
Time Code
Optional
Identifier (ID)
Min 2Max 2

Code identifying the time. In accordance with International Standards Organization standard 8601, time can be specified by a + or - and an indication in hours in relation to Universal Time Coordinate (UTC) time; since + is a restricted character, + and - are substituted by P and M in the codes that follow

N7 Loop
RequiredMax >1
N7
0800
Heading > N7 Loop > N7

Equipment Details

RequiredMax use 1

To identify the equipment

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

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

  • N701 is 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 defining the type of weight

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

Allowance made for increased weight due to such factors as snow

VC Loop
OptionalMax >1
VC
0900
Heading > N7 Loop > VC Loop > VC

Motor Vehicle Control

RequiredMax use 1

To define motor vehicle identification and logistics

Example
VC-01
539
Vehicle Identification Number
Required
String (AN)
Min 1Max 30

Unique identification number stamped on the vehicle by the manufacturer

VC-02
836
Vehicle Deck Position Code
Optional
Identifier (ID)
Min 2Max 2

Code to identify the specific position of a vehicle on multi-level equipment; when dealing with rail cars the front end will be defined as that end of the rail car which the vehicle faces

VC-03
837
Vehicle Type Code
Optional
Identifier (ID)

Vehicle Type Code for freight rate and claims purposes

1
Automobile
2
Truck
3
Others
4
Used Vehicles
5
Military
VC-04
838
Dealer Code
Optional
String (AN)
Min 2Max 9

A code assigned by a manufacturer to identify their dealers

N1 Loop
OptionalMax >1
N1
0920
Heading > N7 Loop > VC Loop > N1 Loop > N1

Name

RequiredMax use 1

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

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)

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

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

Free-form name

N1-03
66
Identification Code Qualifier
Optional
Identifier (ID)
Min 1Max 2

Code designating the system/method of code structure used for Identification Code (67)

N1-04
67
Identification Code
Optional
String (AN)
Min 2Max 80

Code identifying a party or other code

  • This segment, used alone, provides the most efficient method of providing organizational identification. To obtain this efficiency the "ID Code" (N104) must provide a key to the table maintained by the transaction processing party.
N3
0940
Heading > N7 Loop > VC Loop > N1 Loop > N3

Address Information

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

N3-02
166
Address Information
Optional
String (AN)
Min 1Max 55

Address information

N4
0960
Heading > N7 Loop > VC Loop > 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 (Standard State/Province) as defined by appropriate government agency

  • N402 is required only if city name (N401) is in the U.S. or Canada.
N4-03
116
Postal Code
Optional
Identifier (ID)
Min 3Max 15

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

N4-04
26
Country Code
Optional
Identifier (ID)
Min 2Max 3

Code identifying the country

H3
0980
Heading > N7 Loop > VC Loop > N1 Loop > H3

Special Handling Instructions

OptionalMax use 1

To specify special handling instructions in coded or free-form format

Example
H3-01
152
Special Handling Code
Optional
Identifier (ID)
Min 2Max 3

Code specifying special transportation handling instructions

N1 Loop end
VC Loop end
M12
1200
Heading > N7 Loop > M12

In-bond Identifying Information

OptionalMax use 2

To transmit in-bond information

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

Code defining the type of entry assigned by U.S. Customs

M12-02
601
Customs Entry Number
Optional
String (AN)
Min 1Max 15

Automated Commercial System Code Furnished by U.S. Customs Service

  • If M1202 does not contain the paperless entry number, then M1206 is required.
M12-03
310
Location Identifier
Optional
String (AN)
Min 1Max 30

Code which identifies a specific location

  • M1203 is a four-digit numeric census schedule D when identifying a U.S. port, and a three-digit numeric memorandum D when identifying a Canadian port. It is the port of destination if M1201 is "61". It is the port of export if M1201 is "62" or "63".
M12-04
310
Location Identifier
Optional
String (AN)
Min 1Max 30

Code which identifies a specific location

  • M1204 is five-digit numeric census schedule K. It is the foreign port of destination if M1201 is "62" or "63".
M12-05
602
Customs Shipment Value
Optional
String (AN)
Min 2Max 8

Customs value in whole dollars

  • M1205 is the value in whole dollars of the in-bond movement. Use twenty dollars per kilo if value is unknown.
M12-08
128
Reference Identification Qualifier
Optional
Identifier (ID)
Min 2Max 3

Code qualifying the Reference Identification

M12-09
127
Reference Identification
Optional
String (AN)
Min 1Max 50

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

M7
1400
Heading > N7 Loop > M7

Seal Numbers

OptionalMax use 5

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

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

Unique number on seal used to close a shipment

M7-02
225
Seal Number
Optional
String (AN)
Min 2Max 15

Unique number on seal used to close a shipment

M7-03
225
Seal Number
Optional
String (AN)
Min 2Max 15

Unique number on seal used to close a shipment

M7-04
225
Seal Number
Optional
String (AN)
Min 2Max 15

Unique number on seal used to close a shipment

GA
1650
Heading > N7 Loop > GA

Canadian Grain Information

OptionalMax use 15

To transmit the transportation and distribution requirements of grain at Canadian ports

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

Code indicating whether product has been fumigated and/or cleaned

GA-02
22
Commodity Code
Optional
String (AN)
Min 1Max 30

Code describing a commodity or group of commodities

  • GA02 is required on the first occurrence of the segment and for each new occurrence of a different commodity code.
  • GA02 contains the Canadian Grain Commission Commodity Code for terminal elevator accounting.
GA-03
1576
Inspected/Weighed Indicator Code
Optional
Identifier (ID)
Min 1Max 2

Code indicating whether product has been inspected and/or weighed

GA-04
128
Reference Identification Qualifier
Optional
Identifier (ID)
Min 2Max 3

Code qualifying the Reference Identification

GA-05
127
Reference Identification
Optional
String (AN)
Min 1Max 50

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

  • GA05 is used for grain block number.
Optional
Numeric (N0)
Min 6Max 6

Week expressed as year/week (CCYYWW), where week is a number between 01 and 53 inclusive

  • GA06 is used for crop week.
GA-07
899
Unload Terminal Elevator Code
Optional
Identifier (ID)
Min 3Max 4

Code specifying the unloading terminal elevator at grain exporting terminals

Optional
Date (DT)
CCYYMMDD format

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

  • GA08 is used for the unload date.
GA-09
1470
Number
Optional
Numeric (N0)
Min 1Max 9

A generic number

  • GA09 will contain the number of cars being claimed for incentive rate.
GA-10
1276
Machine Separable Indicator Code
Optional
Identifier (ID)
Min 2Max 2

Canadian Grain Commission grain code identifying the type of grain that must be separated

GA-11
1277
Canadian Wheat Board (CWB) Marketing Class Code
Optional
Identifier (ID)
Min 1Max 1

Code identifying the Canadian Wheat Board market class of the grain

GA-12
1278
Canadian Wheat Board (CWB) Marketing Class Type Code
Optional
Identifier (ID)
Min 1Max 1

Code identifying Canadian Wheat Board market class type

GA-14
310
Location Identifier
Optional
String (AN)
Min 1Max 30

Code which identifies a specific location

  • GA14 is the terminal or staging area name.
GA-15
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2

Code (Standard State/Province) as defined by appropriate government agency

GA-16
1004
Percent Qualifier
Optional
Identifier (ID)
Min 1Max 2

Code to qualify percent

GA-17
954
Percent
Optional
Decimal number (R)
Min 1Max 10

Percentage expressed as a decimal

N7 Loop end
N8
1800
Heading > N8

Waybill Reference

RequiredMax use 499

To identify the waybill and to specify the equipment used and the destination details

Example
N8-01
186
Waybill Number
Required
Numeric (N0)
Min 1Max 6

Carrier accounting number of the waybill for the inbound movement

Required
Date (DT)
CCYYMMDD format

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

  • N802 is the waybill date.
F9
2000
Heading > F9

Origin Station

RequiredMax use 1

To identify the rail origin of the shipment

Example
F9-01
573
Freight Station Accounting Code
Optional
Identifier (ID)
Min 1Max 5

Code (Freight Station Accounting) (AAR Managed Code for Locations)

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 (Standard State/Province) as defined by appropriate government agency

F9-08
154
Standard Point Location Code
Optional
Identifier (ID)
Min 6Max 9

Code (Standard Point Location) defined by National Motor Freight Tariff Association (NMFTA) or the Canadian Transportation Agency (CTA) point development group as the official code assigned to a city or point (for ratemaking purposes) within a city

  • F908 is the Standard Point Location Code (SPLC) for the city named in the F902.
D9
2100
Heading > D9

Destination Station

RequiredMax use 1

To identify the rail destination of the shipment

Example
D9-01
573
Freight Station Accounting Code
Optional
Identifier (ID)
Min 1Max 5

Code (Freight Station Accounting) (AAR Managed Code for Locations)

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 (Standard State/Province) as defined by appropriate government agency

D9-08
154
Standard Point Location Code
Optional
Identifier (ID)
Min 6Max 9

Code (Standard Point Location) defined by National Motor Freight Tariff Association (NMFTA) or the Canadian Transportation Agency (CTA) point development group as the official code assigned to a city or point (for ratemaking purposes) within a city

  • D908 is the Standard Point Location Code (SPLC) for the city named in the D902.
N1 Loop
RequiredMax >1
N1
2200
Heading > N1 Loop > N1

Name

RequiredMax use 1

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

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)

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

Usage notes

This is not a comprehensive list and only includes some of the most commonly used Entity Identifier Codes.

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

Free-form name

N1-03
66
Identification Code Qualifier
Optional
Identifier (ID)
Min 1Max 2

Code designating the system/method of code structure used for Identification Code (67)

N1-04
67
Identification Code
Optional
String (AN)
Min 2Max 80

Code identifying a party or other code

  • This segment, used alone, provides the most efficient method of providing organizational identification. To obtain this efficiency the "ID Code" (N104) must provide a key to the table maintained by the transaction processing party.
N3
2300
Heading > N1 Loop > N3

Address Information

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
2400
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 (Standard State/Province) as defined by appropriate government agency

  • N402 is required only if city name (N401) is in the U.S. or Canada.
N4-03
116
Postal Code
Optional
Identifier (ID)
Min 3Max 15

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

N4-04
26
Country Code
Optional
Identifier (ID)
Min 2Max 3

Code identifying the country

BL
2620
Heading > N1 Loop > BL

Billing Information

OptionalMax use 12

To identify the individual billing segments within a movement when joint rail rates have been established between carriers but do not cover the entire movement

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)

Code identifying reason for rebill

RC
R11 Collect Beyond
RD
R11 Prepaid Beyond
BL-02
573
Freight Station Accounting Code
Optional
Identifier (ID)
Min 1Max 5

Code (Freight Station Accounting) (AAR Managed Code for Locations)

  • BL02 is the FSAC for the origin point of the rate for this portion of this movement.
BL-03
573
Freight Station Accounting Code
Optional
Identifier (ID)
Min 1Max 5

Code (Freight Station Accounting) (AAR Managed Code for Locations)

  • BL03 is the FSAC for the destination point of the rate for this portion of the movement.
BL-04
154
Standard Point Location Code
Optional
Identifier (ID)
Min 6Max 9

Code (Standard Point Location) defined by National Motor Freight Tariff Association (NMFTA) or the Canadian Transportation Agency (CTA) point development group as the official code assigned to a city or point (for ratemaking purposes) within a city

  • BL04 is the Standard Point Location Code (SPLC) for the origin point of the rate for this portion of the movement.
BL-05
19
City Name
Optional
String (AN)
Min 2Max 30

Free-form text for city name

  • BL05 through BL07 is the city, state, and country for the rate for the beginning portion of the move.
BL-06
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2

Code (Standard State/Province) as defined by appropriate government agency

BL-09
19
City Name
Optional
String (AN)
Min 2Max 30

Free-form text for city name

  • BL09 through BL11 is the city, state, and country for the rate for ending portion of the move.
BL-10
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2

Code (Standard State/Province) as defined by appropriate government agency

BL-11
26
Country Code
Optional
Identifier (ID)
Min 2Max 3

Code identifying the country

BL-12
140
Standard Carrier Alpha Code
Optional
Identifier (ID)
Min 2Max 4

Standard Carrier Alpha Code

  • BL12 is the Standard Carrier Alpha Code (SCAC) of the first carrier participating in the rate for the move defined in BL02 through BL11.
BL-13
140
Standard Carrier Alpha Code
Optional
Identifier (ID)
Min 2Max 4

Standard Carrier Alpha Code

N1 Loop end
R2
4700
Heading > R2

Route Information

RequiredMax use 13

To specify carrier and routing sequences and details

Example
R2-01
140
Standard Carrier Alpha Code
Required
Identifier (ID)

Standard Carrier Alpha Code

CPRS
SCAC Code for Canadian Pacific Railway
R2-02
133
Routing Sequence Code
Required
Identifier (ID)

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

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

Free-form text for city name

  • R203 is the station or city name at which carriers interchange shipments.
Usage notes

Contains Rule 260 Abbreviation only.

R2-04
154
Standard Point Location Code
Optional
Identifier (ID)
Min 6Max 9

Code (Standard Point Location) defined by National Motor Freight Tariff Association (NMFTA) or the Canadian Transportation Agency (CTA) point development group as the official code assigned to a city or point (for ratemaking purposes) within a city

R2-05
177
Intermodal Service Code
Optional
Identifier (ID)
Min 1Max 2

Code identifying the Intermodal Service Plan

H3
5200
Heading > H3

Special Handling Instructions

OptionalMax use 20

To specify special handling instructions in coded or free-form format

Example
H3-01
152
Special Handling Code
Optional
Identifier (ID)
Min 2Max 3

Code specifying special transportation handling instructions

PS
5300
Heading > PS

Protective Service Instructions

OptionalMax use 5

To specify mechanical protective service and ventilation instructions

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

Association of American Railroads (AAR) Protective Service that applies to shipment

PS-02
241
Protective Service Code
Required
Identifier (ID)
Min 1Max 4

Code specifying perishable protective service- rail carriers only

PS-03
355
Unit or Basis for Measurement Code
Optional
Identifier (ID)
Min 2Max 2

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

  • PS03 qualifies the temperature in PS04 and PS14.
PS-04
408
Temperature
Optional
Decimal number (R)
Min 1Max 4

Temperature

  • PS04 is the optimum allowable temperature condition for shipment.
PS-05
140
Standard Carrier Alpha Code
Optional
Identifier (ID)
Min 2Max 4

Standard Carrier Alpha Code

  • PS05 through PS08 are used to specify the station to which the temperature applies. PS05 and PS06 are preferred over PS07 and PS08.
LX Loop
RequiredMax >1
LX
5400
Heading > LX Loop > LX

Assigned Number

RequiredMax use 1

To reference a line number in a transaction set

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

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

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

Sequential line number for a lading item

L5-02
79
Lading Description
Required
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
Required
String (AN)
Min 1Max 30

Code describing a commodity or group of commodities

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

Code identifying the commodity coding system used for Commodity Code

L5-05
103
Packaging Code
Optional
String (AN)
Min 3Max 5

Code identifying the type of packaging; Part 1: Packaging Form, Part 2: Packaging Material; if the Data Element is used, then Part 1 is always required

L0 Loop
RequiredMax >1
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

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

Sequential line number for a lading item

L0-02
220
Billed/Rated-as Quantity
Optional
Decimal number (R)
Min 1Max 11

Basis for rating (miles, value, volume, etc.); Note: Weight may be defined by either data element 220 or 81

L0-03
221
Billed/Rated-as Qualifier
Optional
Identifier (ID)

Code identifying the type of quantity or value on which the rate or item pricing is based

DM
Miles
GL
Gallon
ND
Cord

A volume measurement.

NP
Piece
NU
Unit

A specific measurement in rating shipments.

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

Numeric value of weight

L0-05
187
Weight Qualifier
Optional
Identifier (ID)

Code defining the type of weight

Usage notes

This is not a comprehensive list and only includes some of the most commonly used Weight Qualifiers.

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

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 for packaging form of the lading quantity

Usage notes

This is not a comprehensive list and only includes some of the most commonly used Packaging Form Codes.

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

Code specifying the weight unit

PI
5900
Heading > LX Loop > L0 Loop > PI

Price Authority Identification

OptionalMax use 30

To communicate basis of pricing, such as contract number, quote number, or tariff number

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

Code qualifying the Reference Identification

CT
Contract Number
PR
Price Quote Number
TS
Tariff Number
PI-02
127
Reference Identification
Required
String (AN)
Min 1Max 50

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

PI-03
436
Primary Publication Authority Code
Optional
Identifier (ID)

Code indicating type of external reference

OP
Other Publication
TP
Tariff Publication
PI-04
930
Regulatory Agency Code
Optional
Identifier (ID)
Min 3Max 5

Code relating to the regulatory agency governing the price reference

PI-05
168
Tariff Agency Code
Optional
Identifier (ID)
Min 1Max 4

Code defining the tariff bureau or tariff publishing agent that governs the rates applied to this shipment

PI-06
965
Issuing Carrier Identifier
Optional
String (AN)
Min 1Max 10

Identification assigned by issuing carrier

PI-07
660
Contract Suffix
Optional
String (AN)
Min 1Max 2

Used to identify a type of contract

  • PI07 is the price authority suffix for the contract.
PI-08
169
Tariff Item Number
Optional
String (AN)
Min 1Max 16

Number assigned in the tariff to specific rate or group of rates that applies to one or more items in the shipment

  • PI08 is the price authority item number.
PI-09
173
Tariff Supplement Identifier
Optional
String (AN)
Min 1Max 4

Identifier for the tariff supplement which contains the rate used

  • PI09 is the price authority supplement.
PI-10
172
Tariff Section
Optional
String (AN)
Min 1Max 2

Number used as an extension of the basic tariff number to identify the rates published within specific sections of the tariff

  • PI10 is the price authority section number.
PI-11
660
Contract Suffix
Optional
String (AN)
Min 1Max 2

Used to identify a type of contract

  • PI11 is the price authority suffix for tariff.
L0 Loop end
X1
5950
Heading > LX Loop > X1

Export License

OptionalMax use 6

To transmit information contained on an export license

Example
X1-01
83
Code For Licensing, Certification, Registration, or Accreditation Agency
Optional
Identifier (ID)
Min 1Max 2

Code identifying a licensing, certification, registration, or accreditation agency.

X1-02
50
Export License Number
Optional
String (AN)
Min 6Max 35

Government assigned identification number for exporter

X1-03
51
Export License Status Code
Optional
Identifier (ID)
Min 1Max 1

Code defining whether the shipment completes the terms of the license, or the shipment is only a partial delivery relative to the license terms

Optional
Date (DT)
CCYYMMDD format

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

  • X104 is the export license expiration date.
X1-05
52
Export License Symbol Code
Optional
Identifier (ID)
Min 1Max 2

Code which specifies the export symbol marked on a shipment

X1-06
48
Export License Control Code
Optional
Identifier (ID)
Min 1Max 1

Code indicating the type of control applicable to the export license

X1-07
26
Country Code
Optional
Identifier (ID)
Min 2Max 3

Code identifying the country

X1-08
141
Schedule B Code
Optional
Identifier (ID)
Min 7Max 10

Code identifying commodity number established for international statistical purposes

X1-09
210
International/Domestic Code
Optional
Identifier (ID)
Min 1Max 1

Code indicating international or domestic shipment

X1-10
80
Lading Quantity
Optional
Numeric (N0)
Min 1Max 7

Number of units (pieces) of the lading commodity

X1-11
148
Lading Value
Optional
Decimal number (R)
Min 2Max 9

Value of shipment for export, expressed in the standard monetary denomination for the currency specified

X1-12
47
Export Filing Key Code
Optional
Identifier (ID)
Min 1Max 1

Code indicating the type of communications with customs

X1-13
355
Unit or Basis for Measurement Code
Optional
Identifier (ID)
Min 2Max 2

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

X1-14
212
Unit Price
Optional
Decimal number (R)
Min 1Max 15

Price per unit of product, service, commodity, etc.

X1-15
1306
U.S. Government License Type
Optional
String (AN)
Min 1Max 1

Code to identify the type of government license involved

X1-16
67
Identification Code
Optional
String (AN)
Min 2Max 80

Code identifying a party or other code

  • X116 is the export classification code number (ECCN).
X1-17
310
Location Identifier
Optional
String (AN)
Min 1Max 30

Code which identifies a specific location

  • X117 is the Schedule D designation for the central location where the Shipper Export Declarations (SEDs) have been batch filed.
LX Loop end
LS
6600
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 >1
LH1
6700
Heading > LH1 Loop > LH1

Hazardous Identification Information

RequiredMax use 1

To specify the hazardous commodity identification reference number and quantity

Example
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.
Usage notes

This is not a comprehensive list and only includes some of the most commonly used Unit or Basis for Measurement Codes.

1P
Tank Car
16
115 Kilogram Drum

A cylindrical container whose contents weigh 115 kilograms when full.

17
100 Pound Drum

A cylindrical container whose contents weigh 100 pounds when full.

18
55 Gallon Drum

A cylindrical container whose volume is equal to 55 gallons.

TK
Tank
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

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

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

  • LH106 and LH107 are used to convey the quantity or volume and unit of measure for nonbulk shipments only.
LH1-07
380
Quantity
Optional
Decimal number (R)
Min 1Max 15

Numeric value of quantity

LH1-09
665
Residue Indicator Code
Optional
Identifier (ID)
Min 1Max 1

Code indicating that the material being described is that which remains in a packaging (including a tank car) after it has been unloaded

  • In LH109, a value of "R" or "P" requires that the receiver generate the words "residue: last contained" prior to the shipping name in accordance with regulations.
LH1-10
254
Packing Group Code
Optional
Identifier (ID)
Min 1Max 3

Code indicating degree of danger in terms of Roman number I, II or III

LH2
6800
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.
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

The hazardous classification corresponding to the shipping name of the hazardous commodity

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

Code qualifying hazardous class

P
Primary
S
Secondary
LH2-03
218
Hazardous Placard Notation
Optional
Identifier (ID)
Min 14Max 40

The placard notation corresponding to the hazard class of the hazardous commodity

LH2-04
222
Hazardous Endorsement
Optional
Identifier (ID)
Min 4Max 25

The placard endorsement that is to be shown on the shipping papers for the hazardous commodity

LH2-05
759
Reportable Quantity Code
Optional
Identifier (ID)

Code to identify presence of hazardous substance

RQ
Reportable Quantity
LH2-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

  • LH206 and LH207 indicate the flashpoint temperature.
CE
Centigrade, Celsius
FA
Fahrenheit
LH2-07
408
Temperature
Optional
Decimal number (R)
Min 1Max 4

Temperature

LH2-08
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

  • LH208 and LH209 indicate the control temperature.
CE
Centigrade, Celsius
FA
Fahrenheit
LH2-09
408
Temperature
Optional
Decimal number (R)
Min 1Max 4

Temperature

LH2-10
355
Unit or Basis for Measurement Code
Optional
Identifier (ID)
Min 2Max 2

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

  • LH210 and LH211 indicate the emergency temperature.
LH2-11
408
Temperature
Optional
Decimal number (R)
Min 1Max 4

Temperature

LH2-12
188
Weight Unit Code
Optional
Identifier (ID)

Code specifying the weight unit

  • LH212 and LH213 indicate the net explosive weight.
E
Metric Ton
K
Kilograms
L
Pounds
LH2-13
267
Net Explosive Quantity
Optional
Numeric (N0)
Min 1Max 10

Net weight of the explosive quantity of the hazardous commodity

LH3
6900
Heading > LH1 Loop > LH3

Hazardous Material Shipping Name

OptionalMax use 10

To specify the hazardous material shipping name and additional descriptive requirements

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)

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

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

To uniquely identify the variable information required by government regulation covering the transportation of hazardous material shipments

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)

Qualifier indicating the type of information being passed so that a receiver may format a description of hazardous commodity movements that meets regulatory requirements

Usage notes

This is not a comprehensive list and only includes some of the most commonly used Hazardous Material Shipment Information Qualifiers.

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

Specific information required by law for hazardous material shipments

LFH-03
809
Hazardous Material Shipment Information
Optional
String (AN)
Min 1Max 25

Specific information required by law for hazardous material shipments

LFH-04
1023
Hazard Zone Code
Optional
Identifier (ID)

Code specifying the Department of Transportation assigned zone designating the Inhalation Toxicity Hazard Zone

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)

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

4N
Megabecquerel

Unit of radiation.

G4
Gigabecquerel

Unit of radiation equal to 27 millicuries.

R2
Becquerel

Unit of radiation equal to 3.7 * 10/10 of a curie.

LFH-06
380
Quantity
Optional
Decimal number (R)
Min 1Max 15

Numeric value of quantity

  • LFH06 indicates activity of the radioactive material.
LFH-07
380
Quantity
Optional
Decimal number (R)
Min 1Max 15

Numeric value of quantity

  • LFH07 indicates transport index of the radioactive material.
LEP
7100
Heading > LH1 Loop > LEP

EPA Required Data

OptionalMax use 3

To specify the Environmental Protection Agency (EPA) information relating to shipments of hazardous material

Example
LEP-01
806
EPA Waste Stream Number Code
Optional
Identifier (ID)
Min 4Max 6

Waste stream number applicable to the movement of hazardous waste as determined by government regulations

LH4
7200
Heading > LH1 Loop > LH4

Canadian Dangerous Requirements

OptionalMax use 1

To specify additional Transport Canada requirements covering transportation of dangerous goods in Canada

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

The identity number of a specific hazardous emergency response plan that is assigned by the Director General of Canada

LH4-02
364
Communication Number
Optional
String (AN)
Min 1Max 256

Complete communications number including country or area code when applicable

  • LH402 is used for the emergency response plan telephone number.
LHT
7300
Heading > LH1 Loop > LHT

Transborder Hazardous Requirements

OptionalMax use 3

To specify the placard information required by the second government agency when shipment is to cross into another country

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

The hazardous classification corresponding to the shipping name of the hazardous commodity

LHR
7400
Heading > LH1 Loop > LHR

Hazardous Material Identifying Reference Numbers

OptionalMax use 5

To transmit specific hazardous material reference numbers

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

Code qualifying the Reference Identification

Usage notes

This is not a comprehensive list and only includes some of the most commonly used Reference Identification Qualifiers.

AH
Agreement Number
F3
Submission Number

A unique number assigned to the submitted transaction set; this number is used by the payer to track every file submitted.

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

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

Optional
Date (DT)
CCYYMMDD format

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

PER
7450
Heading > LH1 Loop > PER

Administrative Communications Contact

OptionalMax use 5

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

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
General Contact
HM
Hazardous Material Contact
Optional
String (AN)
Min 1Max 60

Free-form name

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 256

Complete communications number including country or area code when applicable

N1 Loop
OptionalMax >1
N1
7460
Heading > LH1 Loop > N1 Loop > N1

Name

RequiredMax use 1

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

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

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

Optional
String (AN)
Min 1Max 60

Free-form name

N1-03
66
Identification Code Qualifier
Optional
Identifier (ID)
Min 1Max 2

Code designating the system/method of code structure used for Identification Code (67)

N1-04
67
Identification Code
Optional
String (AN)
Min 2Max 80

Code identifying a party or other code

  • This segment, used alone, provides the most efficient method of providing organizational identification. To obtain this efficiency the "ID Code" (N104) must provide a key to the table maintained by the transaction processing party.
N3
7470
Heading > LH1 Loop > N1 Loop > N3

Address Information

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
7480
Heading > LH1 Loop > 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 (Standard State/Province) as defined by appropriate government agency

  • N402 is required only if city name (N401) is in the U.S. or Canada.
N4-03
116
Postal Code
Optional
Identifier (ID)
Min 3Max 15

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

N4-04
26
Country Code
Optional
Identifier (ID)
Min 2Max 3

Code identifying the country

PER
7490
Heading > LH1 Loop > N1 Loop > PER

Administrative Communications Contact

OptionalMax use 2

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

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

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

Optional
String (AN)
Min 1Max 60

Free-form name

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

Code identifying the type of communication number

PER-04
364
Communication Number
Optional
String (AN)
Min 1Max 256

Complete communications number including country or area code when applicable

N1 Loop end
LH1 Loop end
LE
7500
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

PER
7600
Heading > PER

Administrative Communications Contact

OptionalMax use 5

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

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

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

Optional
String (AN)
Min 1Max 60

Free-form name

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

Code identifying the type of communication number

PER-04
364
Communication Number
Optional
String (AN)
Min 1Max 256

Complete communications number including country or area code when applicable

LH2
7700
Heading > LH2

Hazardous Classification Information

OptionalMax use 6

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.
Example
LH2-03
218
Hazardous Placard Notation
Optional
Identifier (ID)
Min 14Max 40

The placard notation corresponding to the hazard class of the hazardous commodity

LHR
7800
Heading > LHR

Hazardous Material Identifying Reference Numbers

OptionalMax use 1

To transmit specific hazardous material reference numbers

Example
LHR-01
128
Reference Identification Qualifier
Required
Identifier (ID)
Min 2Max 3

Code qualifying the Reference Identification

LHR-02
127
Reference Identification
Required
String (AN)
Min 1Max 50

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

Optional
Date (DT)
CCYYMMDD format

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

XH
7850
Heading > XH

Pro Forma - B13 Information

OptionalMax use 1

This segment is used to specify a pro forma invoice and B13 Canadian Customs Export Declaration information, required by U.S. and Canadian customs

Example
XH-01
100
Currency Code
Required
Identifier (ID)
Min 3Max 3

Code (Standard ISO) for country in whose currency the charges are specified

XH-02
645
Related Company Indication Code
Optional
Identifier (ID)
Min 1Max 1

Code indicating parties to a transaction

XH-03
150
Special Charge or Allowance Code
Optional
Identifier (ID)
Min 3Max 3

Code identifying type of special charge or allowance

XH-04
610
Amount
Optional
Numeric (N2)
Min 1Max 15

Monetary amount

  • XH04 for a line item: is the freight or special charge; for the total invoice: the total charges -- expressed in the standard monetary denomination for the currency specified.
XH-05
503
Block 20 Code
Optional
Identifier (ID)
Min 1Max 1

Code defining Block 20 characteristics

XH-06
504
Chemical Analysis Percentage
Optional
Numeric (N2)
Min 2Max 9

Chemical analysis percentage

  • XH06 will contain percentage of a component of a product which is required by customs to be reported.
XH-07
212
Unit Price
Optional
Decimal number (R)
Min 1Max 15

Price per unit of product, service, commodity, etc.

  • XH07 will contain unit price of the item being shipped.
X7
7900
Heading > X7

Customs Information

OptionalMax use 10

To indicate customs information

Example
X7-01
61
Free-Form Message
Required
String (AN)
Min 1Max 30

Free-form information

X7-02
61
Free-Form Message
Optional
String (AN)
Min 1Max 30

Free-form information

SE
8100
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 (N)
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

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.