EDI
API DocsTerminal
NEW!
Programmatically translate EDI to JSON with the EDI Core REST API
Get started in minutes →
Segment
in
X12 Release 003030

HL Hierarchical Level

To identify dependencies among and the content of hierarchically related groups of data segments.
Sequence
Element
Name
Type
Requirement
Min
Max
Repeat
01
628
Hierarchical ID Number
String (AN)
Mandatory
1
12
-
A unique number assigned by the sender to identify a particular data segment in a hierarchical structure.
HL01 shall contain a unique alphanumeric number for each occurrence of the HL segment in the transaction set. For example HL01 could be used to indicate the number of occurrences of the HL segment, in which case the value of HL01 would be "1" for the initial HL segment, and would be incremented by one in each subsequent HL segment within the transaction.
02
Hierarchical Parent ID Number
String (AN)
Optional
1
12
-
Identification number of the next higher hierarchical data segment that the data segment being described is subordinate to.
HL02 identifies the Hierarchical ID Number of the HL segment to which the current HL segment is subordinate.
03
Hierarchical Level Code
Identifier (ID)
Mandatory
1
2
-
Code defining the characteristic of a level in a hierarchical structure.
HL03 indicates the context of the series of segments following the current HL segment up to the next occurrence of an HL segment in the transaction. For example, HL03 is used to indicate that subsequent segments in the HL loop form a logical grouping of data referring to shipment, order or item level information.
Codes (52)
04
Hierarchical Child Code
Identifier (ID)
Optional
1
1
-
Code indicating whether if there are hierarchical child data segments subordinate to the level being described.
HL04 indicates whether or not there are subordinate (or child) HL segments related to the current HL segment.
Codes (2)
Stedi is a registered trademark of Stedi, Inc. Stedi's EDI Reference and Mapping Guides are provided for marketing purposes and are free of charge. All names, logos, and brands of third parties listed on our site 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. Our use of these names, logos, and brands is for identification purposes only, and does not imply any such endorsement, sponsorship, or affiliation.
Stedi is a registered trademark of Stedi, Inc. Stedi's EDI Reference and Mapping Guides are provided for marketing purposes and are free of charge. All names, logos, and brands of third parties listed on our site 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. Our use of these names, logos, and brands is for identification purposes only, and does not imply any such endorsement, sponsorship, or affiliation.