X12 214 Transportation Carrier Shipment Status Message Last updated: 2026-09-29
The 214 is the X12 transportation carrier shipment status message. Carriers send it to shippers and consignees to report pickup, in-transit events, appointments and delivery.
B10 identifies the shipment, and each LX loop reports an event: AT7 with the status code and date, MS1 with the location and MS2 with the equipment.
At a glance
- Standard
- X12
- Version
004010- Functional group
QM(GS01)- Sent by
- Carrier to shipper or consignee
- Responses
- 997
- ediFabric .NET template
TS214inEdiFabric.Templates.X12- OpenEDI definition
- View 214 in the spec library
214 structure
The full X12 214 layout from its OpenEDI definition, the same model ediFabric uses to parse, validate and generate it: 12 loops and 54 segment positions, in file order. Loops are shaded and their segments indented; Max use is how many times a segment or loop may repeat.
| Segment / loop | Name | Usage | Max use |
|---|---|---|---|
ST | Transaction Set Header | Mandatory | 1 |
B10 | Beginning Segment for Transportation Carrier Shipment Status Message | Mandatory | 1 |
L11 | Business Instructions and Reference Number | Optional | 300 |
MAN | Marks and Numbers | Optional | 9999 |
K1 | Remarks | Optional | 10 |
| N1 loop | Name | Optional | 10 |
N1 | Name | Mandatory | 1 |
N2 | Additional Name Information | Optional | 1 |
N3 | Address Information | Optional | 2 |
N4 | Geographic Location | Optional | 1 |
G61 | Contact | Optional | 1 |
G62 | Date/Time | Optional | 1 |
L11 | Business Instructions and Reference Number | Optional | 10 |
MS3 | Interline Information | Optional | 12 |
| LX loop | Assigned Number | Optional | 999999 |
LX | Assigned Number | Mandatory | 1 |
| AT7 loop | Shipment Status Details | Optional | 10 |
AT7 | Shipment Status Details | Mandatory | 1 |
MS1 | Equipment, Shipment, or Real Property Location | Optional | 1 |
MS2 | Equipment or Container Owner and Type | Optional | 1 |
L11 | Business Instructions and Reference Number | Optional | 10 |
MAN | Marks and Numbers | Optional | 9999 |
Q7 | Lading Exception Code | Optional | 10 |
K1 | Remarks | Optional | 10 |
AT5 | Bill of Lading Handling Requirements | Optional | 10 |
AT8 | Shipment Weight, Packaging and Quantity Data | Optional | 10 |
| CD3 loop | Carton (Package) Detail | Optional | 999999 |
CD3 | Carton (Package) Detail | Mandatory | 1 |
L11 | Business Instructions and Reference Number | Optional | 20 |
| AT7 loop | Shipment Status Details | Optional | 10 |
AT7 | Shipment Status Details | Mandatory | 1 |
MS1 | Equipment, Shipment, or Real Property Location | Optional | 1 |
MS2 | Equipment or Container Owner and Type | Optional | 1 |
NM1 | Individual or Organizational Name | Optional | 1 |
Q7 | Lading Exception Code | Optional | 10 |
AT8 | Shipment Weight, Packaging and Quantity Data | Optional | 1 |
MAN | Marks and Numbers | Optional | 9999 |
| N1 loop | Name | Optional | 999999 |
N1 | Name | Mandatory | 1 |
N2 | Additional Name Information | Optional | 1 |
N3 | Address Information | Optional | 3 |
N4 | Geographic Location | Optional | 1 |
L11 | Business Instructions and Reference Number | Optional | 10 |
| PRF loop | Purchase Order Reference | Optional | 999999 |
PRF | Purchase Order Reference | Mandatory | 1 |
| N1 loop | Name | Optional | 999999 |
N1 | Name | Mandatory | 1 |
N2 | Additional Name Information | Optional | 1 |
N3 | Address Information | Optional | 3 |
N4 | Geographic Location | Optional | 1 |
L11 | Business Instructions and Reference Number | Optional | 10 |
| CD3 loop | Carton (Package) Detail | Optional | 999999 |
CD3 | Carton (Package) Detail | Mandatory | 1 |
L11 | Business Instructions and Reference Number | Optional | 20 |
| AT7 loop | Shipment Status Details | Optional | 10 |
AT7 | Shipment Status Details | Mandatory | 1 |
MS1 | Equipment, Shipment, or Real Property Location | Optional | 1 |
MS2 | Equipment or Container Owner and Type | Optional | 1 |
MAN | Marks and Numbers | Optional | 9999 |
| SPO loop | Shipment Purchase Order Detail | Optional | 999999 |
SPO | Shipment Purchase Order Detail | Mandatory | 1 |
SDQ | Destination Quantity | Optional | 10 |
| EFI loop | Electronic Format Identification | Optional | >1 |
EFI | Electronic Format Identification | Mandatory | 1 |
BIN | Binary Data | Mandatory | 1 |
SE | Transaction Set Trailer | Mandatory | 1 |
Sample 214 file
A shipment status message with pickup and delivery events. Paste it into EdiNation to see every element named and validated.
ISA*00* *00* *16*SENDER1 *14*RECEIVER1 *071216*1406*U*00204*000000263*1*T*>~ GS*IN*SENDER1*RECEIVER1*20071216*1406*000000001*X*004010~ ST*214*0006~ B10*123456**BAWC**RU*ROUTE1~ L11*55555555*EQ~ N1*SF**92*23083C~ N4*DECORAH*IA**US~ N1*ST**92*00073~ N4*SUMMIT*IL**US~ MS3*BAWC*B**GG~ LX*1~ AT7*X3*NS***19970925*0830*CT~ MS1****0914726*0431836*W*N~ SE*12*0006~ GE*2*000000001~ IEA*1*000000263~
The same 214 as JSON
ediFabric turns every loop, segment and element into a named field. This is the transaction from the sample, in the JSON that ediFabric Native and Cloud return and accept.
{
"ST": {
"TransactionSetIdentifierCode_01": "214",
"TransactionSetControlNumber_02": "0006"
},
"B10": {
"ReferenceIdentification_01": "123456",
"StandardCarrierAlphaCode_03": "BAWC",
"ReferenceIdentificationQualifier_05": "RU",
"ReferenceIdentification_06": "ROUTE1"
},
"L11": [
{
"ReferenceIdentification_01": "55555555",
"ReferenceIdentificationQualifier_02": "EQ"
}
],
"N1Loop": [
{
"N1": {
"EntityIdentifierCode_01": "SF",
"IdentificationCodeQualifier_03": "92",
"IdentificationCode_04": "23083C"
},
"N4": {
"CityName_01": "DECORAH",
"StateorProvinceCode_02": "IA",
"CountryCode_04": "US"
}
},
{
"N1": {
"EntityIdentifierCode_01": "ST",
"IdentificationCodeQualifier_03": "92",
"IdentificationCode_04": "00073"
},
"N4": {
"CityName_01": "SUMMIT",
"StateorProvinceCode_02": "IL",
"CountryCode_04": "US"
}
}
],
"MS3": [
{
"StandardCarrierAlphaCode_01": "BAWC",
"RoutingSequenceCode_02": "B",
"TransportationMethodTypeCode_04": "GG"
}
],
"LXLoop": [
{
"LX": {
"AssignedNumber_01": "1"
},
"AT7Loop": [
{
"AT7": {
"ShipmentStatusCode_01": "X3",
"ShipmentStatusorAppointmentReasonCode_02": "NS",
"Date_05": "19970925",
"Time_06": "0830",
"TimeCode_07": "CT"
},
"MS1": {
"LongitudeCode_04": "0914726",
"LatitudeCode_05": "0431836",
"DirectionIdentifierCode_06": "W",
"DirectionIdentifierCode_07": "N"
}
}
]
}
],
"SE": {
"NumberofIncludedSegments_01": "12",
"TransactionSetControlNumber_02": "0006"
}
}Parse and validate a 214 file
Read the file into typed objects with ediFabric .NET, convert it to JSON in process with the ediFabric Native bindings for Python, Java and C, or post it to the ediFabric Cloud REST API from any language.
using EdiFabric.Templates.X12004010; License.SetSerial("YOUR_SERIAL_KEY"); using (var stream = File.OpenRead(@"C:\edi\ShipmentStatus.txt")) using (var reader = new X12Reader(stream, "EdiFabric.Templates.X12")) { var items = await reader.ReadToEndAsync(); foreach (var transaction in items.OfType<TS214>()) { if (transaction.IsValid(out MessageErrorContext errors)) Console.WriteLine($"{transaction.ST.TransactionSetControlNumber_02} is valid"); else Console.WriteLine(string.Join(Environment.NewLine, errors.Flatten())); } }
import json import edifabric_x12 as ef serial = "YOUR_SERIAL_KEY" ef.load_library() ef.set_serial(serial) ef.set_map(json.dumps({"default": serial, "maps": {}})) edi = open("ShipmentStatus.txt", "rb").read() output, offset = ef.parse(edi, ef.ParseMode.JSON_VALIDATE) transactions = output[:offset] report = json.loads(output[offset:]) print(report["errors_count"])
import com.edifabric.nativex12.EdiFabricX12; import com.edifabric.nativex12.ParseMode; import com.edifabric.nativex12.ParseResult; String serial = "YOUR_SERIAL_KEY"; EdiFabricX12.loadLibrary(); EdiFabricX12.setSerial(serial); EdiFabricX12.setMap("{\"default\":\"" + serial + "\",\"maps\":{}}"); String edi = Files.readString(Path.of("ShipmentStatus.txt")); ParseResult result = EdiFabricX12.parse(edi, ParseMode.JSON_VALIDATE); System.out.println(result.getTransactions()); System.out.println(result.getReport());
#include "edifabric_x12.h" const char *serial = "YOUR_SERIAL_KEY"; ef_parse_result result; if (ef_load_library(NULL) != 0) return 1; ef_set_serial(serial); ef_set_map("{\"default\":\"YOUR_SERIAL_KEY\",\"maps\":{}}"); char *edi = read_file("ShipmentStatus.txt", NULL); /* helper in example_all_functions.c */ if (ef_parse(edi, EF_PARSE_JSON_VALIDATE, NULL, &result) == 0) { /* transactions = output[0 .. offset), report = output[offset .. length) */ fwrite(result.output.data, 1, (size_t)result.output.length, stdout); ef_free(result.output.data); }
curl -X POST 'https://api.edination.com/v2/x12/read' \ -H 'Ocp-Apim-Subscription-Key: YOUR_SERIAL_KEY' \ -H 'Content-Type: application/octet-stream' \ --data-binary '@ShipmentStatus.txt'
Generate a 214 file
Populate a TS214 object in .NET, or pass JSON in the shape shown above to ediFabric Native or ediFabric Cloud, and get a valid 214 file back.
using EdiFabric.Templates.X12004010; License.SetSerial("YOUR_SERIAL_KEY"); var transaction = new TS214(); // Start Transaction Set 214 // Control number = 0006 transaction.ST = new ST(); transaction.ST.TransactionSetIdentifierCode_01 = "214"; transaction.ST.TransactionSetControlNumber_02 = "0001"; // Reference Number = 123456 // Carrier SCAC = BAWC // Route Code = ROUTE1 transaction.B10 = new B10(); transaction.B10.ReferenceIdentification_01 = "123456"; transaction.B10.StandardCarrierAlphaCode_03 = "BAWC"; transaction.B10.ReferenceIdentificationQualifier_05 = "RU"; transaction.B10.ReferenceIdentification_06 = "ROUTE1"; // Repeating L11 transaction.L11 = new List<L11>(); // ... set the remaining loops and segments the same way // SegmentBuilders is in the Common project of the example repository using (var stream = new MemoryStream()) { using (var writer = new X12Writer(stream)) { writer.Write(SegmentBuilders.BuildIsa("1")); writer.Write(SegmentBuilders.BuildGs("1")); writer.Write(transaction); } Console.WriteLine(Encoding.UTF8.GetString(stream.ToArray())); }
import json import edifabric_x12 as ef serial = "YOUR_SERIAL_KEY" ef.load_library() ef.set_serial(serial) ef.set_map(json.dumps({"default": serial, "maps": {}})) # the transactions JSON returned by ef.parse, edited or produced by your application transactions = open("ShipmentStatus.json", "rb").read() edi = ef.build(transactions, postfix="\r\n") print(edi)
import com.edifabric.nativex12.EdiFabricX12; String serial = "YOUR_SERIAL_KEY"; EdiFabricX12.loadLibrary(); EdiFabricX12.setSerial(serial); EdiFabricX12.setMap("{\"default\":\"" + serial + "\",\"maps\":{}}"); // the transactions JSON returned by parse, edited or produced by your application String transactions = Files.readString(Path.of("ShipmentStatus.json")); String edi = EdiFabricX12.build(transactions, "\r\n"); System.out.println(edi);
#include "edifabric_x12.h" ef_buffer edi; if (ef_load_library(NULL) != 0) return 1; ef_set_serial("YOUR_SERIAL_KEY"); ef_set_map("{\"default\":\"YOUR_SERIAL_KEY\",\"maps\":{}}"); /* the transactions JSON returned by ef_parse, edited or produced by your application */ char *transactions = read_file("ShipmentStatus.json", NULL); if (ef_build(transactions, "\r\n", &edi) == 0) { fwrite(edi.data, 1, (size_t)edi.length, stdout); ef_free(edi.data); }
# the JSON returned by /read, edited or produced by your application curl -X POST 'https://api.edination.com/v2/x12/write' \ -H 'Ocp-Apim-Subscription-Key: YOUR_SERIAL_KEY' \ -H 'Content-Type: application/json' \ --data-binary '@ShipmentStatus.json' \ -o 'ShipmentStatus.txt'
Complete ediFabric .NET example
A complete C# program for the X12 214, built on TS214 in EdiFabric.Templates.X12. The same code is in the ediFabric .NET examples on GitHub.
using EdiFabric.Core.Model.Edi;
using EdiFabric.Core.Model.Edi.X12;
using EdiFabric.Examples.X12.Common;
using EdiFabric.Framework.Readers;
using EdiFabric.Framework.Writers;
using EdiFabric.Templates.X12004010;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace EdiFabric.Examples.X12.T214
{
class Program
{
static void Main(string[] args)
{
SerialKey.Set(Common.SerialKey.Get());
Read();
Write();
}
///
/// Read Shipment Status
///
static void Read()
{
var ediStream = File.OpenRead(Directory.GetCurrentDirectory() + @"\..\..\..\Files\X12\ShipmentStatus.txt");
List ediItems;
using (var ediReader = new X12Reader(ediStream, "EdiFabric.Templates.X12"))
ediItems = ediReader.ReadToEnd().ToList();
var transactions = ediItems.OfType();
foreach (var transaction in transactions)
{
if (transaction.HasErrors)
{
// partially parsed
var errors = transaction.ErrorContext.Flatten();
}
}
}
///
/// Write Shipment Status
///
static void Write()
{
var transaction = BuildShipmentStatus("6");
using (var stream = new MemoryStream())
{
using (var writer = new X12Writer(stream))
{
writer.Write(SegmentBuilders.BuildIsa("1"));
writer.Write(SegmentBuilders.BuildGs("1"));
writer.Write(transaction);
}
var ediString = stream.LoadToString();
}
}
///
/// Builds Shipment Status.
/// Original from https://ps.nafta.extra.fcagroup.com/sites/itb-ebus/Shared%20Documents/214STARSShipmentStatus.pdf
///
static TS214 BuildShipmentStatus(string controlNumber)
{
var result = new TS214();
// Start Transaction Set 214
// Control number = 0006
result.ST = new ST();
result.ST.TransactionSetIdentifierCode_01 = "214";
result.ST.TransactionSetControlNumber_02 = controlNumber.PadLeft(9, '0');
// Reference Number = 123456
// Carrier SCAC = BAWC
// Route Code = ROUTE1
result.B10 = new B10();
result.B10.ReferenceIdentification_01 = "123456";
result.B10.StandardCarrierAlphaCode_03 = "BAWC";
result.B10.ReferenceIdentificationQualifier_05 = "RU";
result.B10.ReferenceIdentification_06 = "ROUTE1";
// Repeating L11
result.L11 = new List();
// Power unit = 55555555
var l11 = new L11();
l11.ReferenceIdentification_01 = "55555555";
l11.ReferenceIdentificationQualifier_02 = "EQ";
result.L11.Add(l11);
// Repeating N1 Loops
result.N1Loop = new List();
// Begin N1 Loop 1
var n1Loop1 = new Loop_N1_214();
// Pick-up location = 23083C
n1Loop1.N1 = new N1();
n1Loop1.N1.EntityIdentifierCode_01 = "SF";
n1Loop1.N1.IdentificationCodeQualifier_03 = "92";
n1Loop1.N1.IdentificationCode_04 = "23083C";
// Pick-up city and state = Decorah, IA
// Pick - up country = US(United States)
n1Loop1.N4 = new N4();
n1Loop1.N4.CityName_01 = "DECORAH";
n1Loop1.N4.StateorProvinceCode_02 = "IA";
n1Loop1.N4.CountryCode_04 = "US";
// End N1 Loop 1
result.N1Loop.Add(n1Loop1);
// Begin N1 Loop 2
var n1Loop2 = new Loop_N1_214();
// Delivery location = 00073
n1Loop2.N1 = new N1();
n1Loop2.N1.EntityIdentifierCode_01 = "ST";
n1Loop2.N1.IdentificationCodeQualifier_03 = "92";
n1Loop2.N1.IdentificationCode_04 = "00073";
// Delivery city and state = Summit, IL
// Delivery country = US(United States)
n1Loop2.N4 = new N4();
n1Loop2.N4.CityName_01 = "SUMMIT";
n1Loop2.N4.StateorProvinceCode_02 = "IL";
n1Loop2.N4.CountryCode_04 = "US";
// End N1 Loop 2
result.N1Loop.Add(n1Loop2);
// Repeating MS3
result.MS3 = new List();
// Power SCAC code = BAWC
// Origin / Delivery Carrier Transportation Mode
// = GG(Geographic Shipping and Receiving)
var ms3 = new MS3();
ms3.StandardCarrierAlphaCode_01 = "BAWC";
ms3.RoutingSequenceCode_02 = "B";
ms3.TransportationMethodTypeCode_04 = "GG";
result.MS3.Add(ms3);
// Repeating LX Loops
result.LXLoop = new List();
// Begin LX Loop
var lxLoop1 = new Loop_LX_214();
// Assigned number = 1
lxLoop1.LX = new LX();
lxLoop1.LX.AssignedNumber_01 = "1";
// Repeating At7 Loops
lxLoop1.AT7Loop = new List();
// Begin AT7 Loop
var at7loop1 = new Loop_AT7_214();
// Arrival at Pick-Up Location
// Arrival date = 09 / 25 / 1997
// Arrival time = 08:30AM
// Time Zone = Central Time
at7loop1.AT7 = new AT7();
at7loop1.AT7.ShipmentStatusCode_01 = "X3";
at7loop1.AT7.ShipmentStatusorAppointmentReasonCode_02 = "NS";
at7loop1.AT7.Date_05 = "19970925";
at7loop1.AT7.Time_06 = "0830";
at7loop1.AT7.TimeCode_07 = "CT";
// Latitude
// = 043 Degrees, 18 Minutes, 36 Seconds North
// Longitude
// = 091 Degrees, 47 Minutes, 26 Seconds West
at7loop1.MS1 = new MS1();
at7loop1.MS1.LongitudeCode_04 = "0914726";
at7loop1.MS1.LatitudeCode_05 = "0431836";
at7loop1.MS1.DirectionIdentifierCode_06 = "W";
at7loop1.MS1.DirectionIdentifierCode_07 = "N";
// End AT7 Loop
lxLoop1.AT7Loop.Add(at7loop1);
// End LX Loop
result.LXLoop.Add(lxLoop1);
return result;
}
}
}More operations in ediFabric .NET
214 questions
What are the most common AT7 status codes?
X3 arrived at pickup location, AF departed pickup location, X1 arrived at delivery location, D1 completed unloading at delivery location, and AG estimated delivery.
How often is a 214 sent?
Per event, as agreed with the shipper. Some carriers also send periodic in-transit location updates.
What is the EDIFACT equivalent?
IFTSTA, the international multimodal status report.
How do I parse and generate X12 214 files in .NET, Python, Java and C?
In .NET, install EdiFabric and EdiFabric.Templates.X12, read the file with X12Reader into TS214 objects and write them back with X12Writer. From Python, Java or C, use ediFabric Native, which converts 214 files to JSON and JSON back to X12 inside your process. From any other language, post the file to the ediFabric Cloud REST API.
Resources
Parse your first X12 214 in five minutes
The Community plan is free forever and needs no credit card. It includes ediFabric .NET, Native and Cloud with one serial key.
Sign up free Validate EDI files free