EANCOM IFTSTA International Multimodal Status Report

IFTSTA is the international multimodal status report. Carriers and logistics providers send it to report the status of consignments: picked up, in transit, delivered or delayed. This sample follows EANCOM D96A.

Each CNI group is one consignment, and STS segments within it give the status event, with dates, locations and references.

At a glance

Standard
EANCOM
Version
D96A EAN004
Sent by
Carrier to shipper or consignee
Responses
CONTRL
ediFabric .NET template
TSIFTSTA in EdiFabric.Templates.Edifact
OpenEDI definition
View IFTSTA in the spec library

IFTSTA structure

The full EANCOM IFTSTA layout from its OpenEDI definition, the same model ediFabric uses to parse, validate and generate it: 6 loops and 17 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
UNHMessage headerMandatory1
BGMBeginning of messageMandatory1
DTMDate/time/periodOptional9
NAD loopName and addressOptional9
NADName and addressMandatory1
RFF loopReferenceOptional9
RFFReferenceMandatory1
FTXFree textOptional9
CNI loopConsignment informationOptional999
CNIConsignment informationMandatory1
STS loopStatusMandatory99
STSStatusMandatory1
RFFReferenceOptional9
DTMDate/time/periodOptional9
FTXFree textOptional9
NADName and addressOptional9
LOCPlace/location identificationOptional1
GID loopGoods item detailsOptional99
GIDGoods item detailsMandatory1
PCI loopPackage identificationOptional99
PCIPackage identificationMandatory1
GINGoods identity numberOptional9
UNTMessage trailerMandatory1

Mandatory segments must be sent, Optional ones only when the data applies. Trading partners often add their own rules in companion guides - ediFabric templates can be adjusted to match. Open the element-level definition in the EdiNation spec library.

Sample IFTSTA file

An EANCOM status report with consignment events. Paste it into EdiNation to see every element named and validated.

UNB+UNOA:2+SID+RID+20130430:1159+I-EX1/1+++++T01'
UNH+ME000021+IFTSTA:D:96A:UN:EAN004'
BGM+44+95-455+9'
DTM+137:20020204:102'
NAD+FW+5422331123459::9'
NAD+CZ+5412345123453::9'
CNI+1+4215A'
STS+1+21'
RFF+DQ:5/2334'
DTM+334:200202011450:203'
NAD+DP+5411111123451::9'
CNI+2+5122C'
STS+1+31'
DTM+40E:20020207:102'
CNI+3+5145E'
STS+1+17+39'
DTM+334:20020115:102'
LOC+16E+:::H.MCUSTOMS AND EXCISE LONDON HEATHROW AIRPORT'
CNI+4+7655S'
STS+1+49'
DTM+334:20020148:102'
GID+1+1:CT'
PCI+33E'
GIN+BJ+354107380000001068'
STS+1+21'
DTM+334:20020148:102'
GID+2+1:CT'
PCI+33E'
GIN+BJ+354107380000001051'
STS+1+21'
DTM+334:20020148:102'
GID+3+1:09::9'
PCI+33E'
GIN+BJ+354123451234567892'
UNT+34+ME000021'
UNZ+1+I-EX1/1'

The same IFTSTA 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.

{
  "UNH": {
    "MessageReferenceNumber_01": "ME000021",
    "MessageIdentifier_02": {
      "MessageType_01": "IFTSTA",
      "MessageVersionNumber_02": "D",
      "MessageReleaseNumber_03": "96A",
      "ControllingAgencyCoded_04": "UN",
      "AssociationAssignedCode_05": "EAN004"
    }
  },
  "BGM": {
    "DOCUMENTMESSAGENAME_01": {
      "Documentmessagenamecoded_01": "44"
    },
    "DOCUMENTMESSAGENUMBER_02": "95-455",
    "MESSAGEFUNCTIONCODED_03": "9"
  },
  "DTM": [
    {
      "DATETIMEPERIOD_01": {
        "Datetimeperiodqualifier_01": "137",
        "Datetimeperiod_02": "20020204",
        "Datetimeperiodformatqualifier_03": "102"
      }
    }
  ],
  "NADLoop": [
    {
      "NAD": {
        "PARTYQUALIFIER_01": "FW",
        "PARTYIDENTIFICATIONDETAILS_02": {
          "Partyididentification_01": "5422331123459",
          "Codelistresponsibleagencycoded_03": "9"
        }
      }
    },
    {
      "NAD": {
        "PARTYQUALIFIER_01": "CZ",
        "PARTYIDENTIFICATIONDETAILS_02": {
          "Partyididentification_01": "5412345123453",
          "Codelistresponsibleagencycoded_03": "9"
        }
      }
    }
  ],
  "CNILoop": [
    {
      "CNI": {
        "CONSOLIDATIONITEMNUMBER_01": "1",
        "DOCUMENTMESSAGEDETAILS_02": {
          "Documentmessagenumber_01": "4215A"
        }
      },
      "STSLoop": [
        {
          "STS": {
            "STATUSTYPE_01": {
              "Statustypecoded_01": "1"
            },
            "STATUSEVENT_02": {
              "Statuseventcoded_01": "21"
            }
          },
          "RFF": [
            {
              "REFERENCE_01": {
                "Referencequalifier_01": "DQ",
                "Referencenumber_02": "5/2334"
              }
            }
          ],
          "DTM": [
            {
              "DATETIMEPERIOD_01": {
                "Datetimeperiodqualifier_01": "334",
                "Datetimeperiod_02": "200202011450",
                "Datetimeperiodformatqualifier_03": "203"
              }
            }
          ],
          "NAD": [
            {
              "PARTYQUALIFIER_01": "DP",
              "PARTYIDENTIFICATIONDETAILS_02": {
                "Partyididentification_01": "5411111123451",
                "Codelistresponsibleagencycoded_03": "9"
              }
            }
          ]
        }
      ]
    },
    {
      "CNI": {
        "CONSOLIDATIONITEMNUMBER_01": "2",
        "DOCUMENTMESSAGEDETAILS_02": {
          "Documentmessagenumber_01": "5122C"
        }
      },
      "STSLoop": [
        {
          "STS": {
            "STATUSTYPE_01": {
              "Statustypecoded_01": "1"
            },
            "STATUSEVENT_02": {
              "Statuseventcoded_01": "31"
            }
          },
          "DTM": [
            {
              "DATETIMEPERIOD_01": {
                "Datetimeperiodqualifier_01": "40E",
                "Datetimeperiod_02": "20020207",
                "Datetimeperiodformatqualifier_03": "102"
              }
            }
          ]
        }
      ]
    },
    {
      "CNI": {
        "CONSOLIDATIONITEMNUMBER_01": "3",
        "DOCUMENTMESSAGEDETAILS_02": {
          "Documentmessagenumber_01": "5145E"
        }
      },
      "STSLoop": [
        {
          "STS": {
            "STATUSTYPE_01": {
              "Statustypecoded_01": "1"
            },
            "STATUSEVENT_02": {
              "Statuseventcoded_01": "17"
            },
            "STATUSREASON_03": {
              "Statusreasoncoded_01": "39"
            }
          },
          "DTM": [
            {
              "DATETIMEPERIOD_01": {
                "Datetimeperiodqualifier_01": "334",
                "Datetimeperiod_02": "20020115",
                "Datetimeperiodformatqualifier_03": "102"
              }
            }
          ],
          "LOC": {
            "PLACELOCATIONQUALIFIER_01": "16E",
            "LOCATIONIDENTIFICATION_02": {
              "Placelocation_04": "H.MCUSTOMS AND EXCISE LONDON HEATHROW AIRPORT"
            }
          }
        }
      ]
    },
    {
      "CNI": {
        "CONSOLIDATIONITEMNUMBER_01": "4",
        "DOCUMENTMESSAGEDETAILS_02": {
          "Documentmessagenumber_01": "7655S"
        }
      },
      "STSLoop": [
        {
          "STS": {
            "STATUSTYPE_01": {
              "Statustypecoded_01": "1"
            },
            "STATUSEVENT_02": {
              "Statuseventcoded_01": "49"
            }
          },
          "DTM": [
            {
              "DATETIMEPERIOD_01": {
                "Datetimeperiodqualifier_01": "334",
                "Datetimeperiod_02": "20020148",
                "Datetimeperiodformatqualifier_03": "102"
              }
            }
          ],
          "GIDLoop": [
            {
              "GID": {
                "GOODSITEMNUMBER_01": "1",
                "NUMBERANDTYPEOFPACKAGES_02": {
                  "Numberofpackages_01": "1",
                  "Typeofpackagesidentification_02": "CT"
                }
              },
              "PCILoop": [
                {
                  "PCI": {
                    "MARKINGINSTRUCTIONSCODED_01": "33E"
                  },
                  "GIN": [
                    {
                      "IDENTITYNUMBERQUALIFIER_01": "BJ",
                      "IDENTITYNUMBERRANGE_02": {
                        "Identitynumber_01": "354107380000001068"
                      }
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "STS": {
            "STATUSTYPE_01": {
              "Statustypecoded_01": "1"
            },
            "STATUSEVENT_02": {
              "Statuseventcoded_01": "21"
            }
          },
          "DTM": [
            {
              "DATETIMEPERIOD_01": {
                "Datetimeperiodqualifier_01": "334",
                "Datetimeperiod_02": "20020148",
                "Datetimeperiodformatqualifier_03": "102"
              }
            }
          ],
          "GIDLoop": [
            {
              "GID": {
                "GOODSITEMNUMBER_01": "2",
                "NUMBERANDTYPEOFPACKAGES_02": {
                  "Numberofpackages_01": "1",
                  "Typeofpackagesidentification_02": "CT"
                }
              },
              "PCILoop": [
                {
                  "PCI": {
                    "MARKINGINSTRUCTIONSCODED_01": "33E"
                  },
                  "GIN": [
                    {
                      "IDENTITYNUMBERQUALIFIER_01": "BJ",
                      "IDENTITYNUMBERRANGE_02": {
                        "Identitynumber_01": "354107380000001051"
                      }
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "STS": {
            "STATUSTYPE_01": {
              "Statustypecoded_01": "1"
            },
            "STATUSEVENT_02": {
              "Statuseventcoded_01": "21"
            }
          },
          "DTM": [
            {
              "DATETIMEPERIOD_01": {
                "Datetimeperiodqualifier_01": "334",
                "Datetimeperiod_02": "20020148",
                "Datetimeperiodformatqualifier_03": "102"
              }
            }
          ],
          "GIDLoop": [
            {
              "GID": {
                "GOODSITEMNUMBER_01": "3",
                "NUMBERANDTYPEOFPACKAGES_02": {
                  "Numberofpackages_01": "1",
                  "Typeofpackagesidentification_02": "09",
                  "Codelistresponsibleagencycoded_04": "9"
                }
              },
              "PCILoop": [
                {
                  "PCI": {
                    "MARKINGINSTRUCTIONSCODED_01": "33E"
                  },
                  "GIN": [
                    {
                      "IDENTITYNUMBERQUALIFIER_01": "BJ",
                      "IDENTITYNUMBERRANGE_02": {
                        "Identitynumber_01": "354123451234567892"
                      }
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "UNT": {
    "NumberofSegmentsinaMessage_01": "34",
    "MessageReferenceNumber_02": "ME000021"
  }
}

Parse and validate an IFTSTA file

Read the file into typed objects with ediFabric .NET, or post it to the ediFabric Cloud REST API from any language and get JSON back.

using EdiFabric.Templates.EdifactD96A;

License.SetSerial("YOUR_SERIAL_KEY");

using (var stream = File.OpenRead(@"C:\edi\TransportStatus.txt"))
using (var reader = new EdifactReader(stream, "EdiFabric.Templates.Edifact"))
{
    var items = await reader.ReadToEndAsync();
    foreach (var transaction in items.OfType<TSIFTSTA>())
    {
        if (transaction.IsValid(out MessageErrorContext errors))
            Console.WriteLine($"{transaction.UNH.MessageReferenceNumber_01} is valid");
        else
            Console.WriteLine(string.Join(Environment.NewLine, errors.Flatten()));
    }
}
curl -X POST 'https://api.edination.com/v2/edifact/read' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SERIAL_KEY' \
-H 'Content-Type: application/octet-stream' \
--data-binary '@TransportStatus.txt'

Generate an IFTSTA file

Populate a TSIFTSTA object in .NET, or post JSON in the shape shown above to ediFabric Cloud, and get a valid IFTSTA file back.

using EdiFabric.Templates.EdifactD96A;

License.SetSerial("YOUR_SERIAL_KEY");

var transaction = new TSIFTSTA();

//  Message header
transaction.UNH = new UNH();
transaction.UNH.MessageReferenceNumber_01 = "0001";
transaction.UNH.MessageIdentifier_02 = new S009();
transaction.UNH.MessageIdentifier_02.MessageType_01 = "IFTSTA";
transaction.UNH.MessageIdentifier_02.MessageVersionNumber_02 = "D";
transaction.UNH.MessageIdentifier_02.MessageReleaseNumber_03 = "96A";
transaction.UNH.MessageIdentifier_02.ControllingAgencyCoded_04 = "UN";

//  Transport status number 95-455
transaction.BGM = new BGM();
transaction.BGM.DOCUMENTMESSAGENAME_01 = new C002();
transaction.BGM.DOCUMENTMESSAGENAME_01.Documentmessagenamecoded_01 = "44";
transaction.BGM.Documentmessagenumber_02 = "95-455";
transaction.BGM.Messagefunctioncoded_03 = "9";

//  Repeating DTM
transaction.DTM = new List<DTM>();

// ... 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 EdifactWriter(stream))
    {
        writer.Write(SegmentBuilders.BuildUnb("1"));
        writer.Write(transaction);
    }
    Console.WriteLine(Encoding.UTF8.GetString(stream.ToArray()));
}
# the JSON returned by /read, edited or produced by your application
curl -X POST 'https://api.edination.com/v2/edifact/write' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SERIAL_KEY' \
-H 'Content-Type: application/json' \
--data-binary '@TransportStatus.json' \
-o 'TransportStatus.txt'

IFTSTA questions

What does an STS segment say?

STS carries the status type and event codes and, for exceptions, the reason. DTM and LOC give the time and place.

How often is IFTSTA sent?

Per event or per agreed milestone, depending on the trading partner agreement.

What is the X12 equivalent?

The X12 214 transportation carrier shipment status message.

How do I parse and generate EANCOM IFTSTA files in .NET?

In .NET, install EdiFabric and EdiFabric.Templates.Edifact, read the file with EdifactReader into TSIFTSTA objects and write them back with EdifactWriter. From any other language, post the file to the ediFabric Cloud REST API, which returns the same structure as JSON and converts JSON back to EANCOM.

Related transactions

Parse your first IFTSTA in five minutes

The Community plan is free forever and needs no credit card. It includes ediFabric .NET, Native and Cloud.