EANCOM IFTSTA International Multimodal Status Report Last updated: 2026-09-29

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

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'

Complete ediFabric .NET example

A complete C# program for the EANCOM IFTSTA, built on TSIFTSTA in EdiFabric.Templates.Edifact. The same code is in the ediFabric .NET examples on GitHub.

using EdiFabric.Core.Model.Edi;
using EdiFabric.Framework.Readers;
using EdiFabric.Framework.Writers;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using EdiFabric.Core.Model.Edi.Edifact;
using EdiFabric.Templates.EdifactD96A;
using EdiFabric.Examples.EDIFACT.Common;

namespace EdiFabric.Examples.EDIFACT.IFTSTA
{
    class Program
    {
        static void Main(string[] args)
        {
            SerialKey.Set(Common.SerialKey.Get());
            Read();
            Write();
        }

        ///
        /// Read Transport Status
        ///
        static void Read()
        {
            var ediStream = File.OpenRead(Directory.GetCurrentDirectory() + @"\..\..\..\Files\Eancom\TransportStatus.txt");

            List ediItems;
            using (var ediReader = new EdifactReader(ediStream, "EdiFabric.Templates.Edifact"))
                ediItems = ediReader.ReadToEnd().ToList();

            var transactions = ediItems.OfType();

            foreach (var transaction in transactions)
            {
                if (transaction.HasErrors)
                {
                    //  partially parsed
                    var errors = transaction.ErrorContext.Flatten();
                }
            }
        }

        ///
        /// Write Transport Status
        ///
        static void Write()
        {
            var transaction = BuildTransportStatus("ME000021");

            using (var stream = new MemoryStream())
            {
                using (var writer = new EdifactWriter(stream))
                {
                    writer.Write(SegmentBuilders.BuildUnb("1"));
                    writer.Write(transaction);
                }

                var ediString = stream.LoadToString();
            }
        }

        ///
        /// Build transport status.
        /// Original from https://www.gs1.org/sites/default/files/docs/eancom/s4/iftsta.pdf
        ///
        static TSIFTSTA BuildTransportStatus(string controlNumber)
        {
            var result = new TSIFTSTA();

            //  Message header
            result.UNH = new UNH();
            result.UNH.MessageReferenceNumber_01 = controlNumber.PadLeft(14, '0');
            result.UNH.MessageIdentifier_02 = new S009();
            result.UNH.MessageIdentifier_02.MessageType_01 = "IFTSTA";
            result.UNH.MessageIdentifier_02.MessageVersionNumber_02 = "D";
            result.UNH.MessageIdentifier_02.MessageReleaseNumber_03 = "96A";
            result.UNH.MessageIdentifier_02.ControllingAgencyCoded_04 = "UN";

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

            //  Repeating DTM
            result.DTM = new List();

            //  Message date/time 4th February 2002
            var dtm1 = new DTM();
            dtm1.DATETIMEPERIOD_01 = new C507();
            dtm1.DATETIMEPERIOD_01.Datetimeperiodqualifier_01 = "137";
            dtm1.DATETIMEPERIOD_01.Datetimeperiod_02 = "20020204";
            dtm1.DATETIMEPERIOD_01.Datetimeperiodformatqualifier_03 = "102";
            result.DTM.Add(dtm1);

            //  Repeating NAD Groups
            result.NADLoop = new List();

            //  Begin NAD Group 1
            var nadLoop1 = new Loop_NAD_IFTSTA();

            //  Freight forwarder identified with GLN 5422331123459
            nadLoop1.NAD = new NAD();
            nadLoop1.NAD.Partyqualifier_01 = "FW";
            nadLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02 = new C082();
            nadLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02.Partyididentification_01 = "5422331123459";
            nadLoop1.NAD.PARTYIDENTIFICATIONDETAILS_02.Codelistresponsibleagencycoded_03 = "9";

            //  End NAD Group 1
            result.NADLoop.Add(nadLoop1);

            //  Begin NAD Group 2
            var nadLoop2 = new Loop_NAD_IFTSTA();

            //  Consignor identified with GLN 5412345123453
            nadLoop2.NAD = new NAD();
            nadLoop2.NAD.Partyqualifier_01 = "CZ";
            nadLoop2.NAD.PARTYIDENTIFICATIONDETAILS_02 = new C082();
            nadLoop2.NAD.PARTYIDENTIFICATIONDETAILS_02.Partyididentification_01 = "5412345123453";
            nadLoop2.NAD.PARTYIDENTIFICATIONDETAILS_02.Codelistresponsibleagencycoded_03 = "9";

            //  End NAD Group 2
            result.NADLoop.Add(nadLoop2);

            //  Repeating CNI Groups
            result.CNILoop = new List();

            //  Begin CNI Group 1
            var cniLoop1 = new Loop_CNI_IFTSTA();

            //  First consignment number 4215A
            cniLoop1.CNI = new CNI();
            cniLoop1.CNI.Consolidationitemnumber_01 = "1";
            cniLoop1.CNI.DOCUMENTMESSAGEDETAILS_02 = new C503();
            cniLoop1.CNI.DOCUMENTMESSAGEDETAILS_02.Documentmessagenumber_01 = "4215A";

            //  Repeating STS Groups
            cniLoop1.STSLoop = new List();

            //  Begin STS Group
            var stsCni1 = new Loop_STS_IFTSTA();

            //  Status of the consignment: ‘delivered’
            stsCni1.STS = new STS();
            stsCni1.STS.STATUSTYPE_01 = new C601();
            stsCni1.STS.STATUSTYPE_01.Statustypecoded_01 = "1";
            stsCni1.STS.STATUSEVENT_02 = new C555();
            stsCni1.STS.STATUSEVENT_02.Statuseventcoded_01 = "21";

            //  Repeating RFF
            stsCni1.RFF = new List();

            //  Reference is a delivery note number ‘5/2334'
            var rffSts1 = new RFF();
            rffSts1.REFERENCE_01 = new C506();
            rffSts1.REFERENCE_01.Referencequalifier_01 = "DQ";
            rffSts1.REFERENCE_01.Referencenumber_02 = "5/2334";
            stsCni1.RFF.Add(rffSts1);

            //  Repeating DTM
            stsCni1.DTM = new List();

            //  Date/time of the status change 1st February 2002 at 14:50
            var dtmSts1 = new DTM();
            dtmSts1.DATETIMEPERIOD_01 = new C507();
            dtmSts1.DATETIMEPERIOD_01.Datetimeperiodqualifier_01 = "334";
            dtmSts1.DATETIMEPERIOD_01.Datetimeperiod_02 = "200202011450";
            dtmSts1.DATETIMEPERIOD_01.Datetimeperiodformatqualifier_03 = "203";
            stsCni1.DTM.Add(dtmSts1);

            //  Repeating NAD
            stsCni1.NAD = new List();

            //  Delivery party identified with GLN 5411111123451
            var nadSts1 = new NAD();
            nadSts1.Partyqualifier_01 = "DP";
            nadSts1.PARTYIDENTIFICATIONDETAILS_02 = new C082();
            nadSts1.PARTYIDENTIFICATIONDETAILS_02.Partyididentification_01 = "5411111123451";
            nadSts1.PARTYIDENTIFICATIONDETAILS_02.Codelistresponsibleagencycoded_03 = "9";
            stsCni1.NAD.Add(nadSts1);

            //  End STS Group
            cniLoop1.STSLoop.Add(stsCni1);

            //  End CNI Group 1
            result.CNILoop.Add(cniLoop1);

            //  Begin CNI Group 2
            var cniLoop2 = new Loop_CNI_IFTSTA();

            //  Second consignment number 5122C
            cniLoop2.CNI = new CNI();
            cniLoop2.CNI.Consolidationitemnumber_01 = "2";
            cniLoop2.CNI.DOCUMENTMESSAGEDETAILS_02 = new C503();
            cniLoop2.CNI.DOCUMENTMESSAGEDETAILS_02.Documentmessagenumber_01 = "5122C";

            //  Repeating STS Groups
            cniLoop2.STSLoop = new List();

            //  Begin STS Group
            var stsCni2 = new Loop_STS_IFTSTA();

            //  Status of the consignment: ‘Goods on their way’
            stsCni2.STS = new STS();
            stsCni2.STS.STATUSTYPE_01 = new C601();
            stsCni2.STS.STATUSTYPE_01.Statustypecoded_01 = "1";
            stsCni2.STS.STATUSEVENT_02 = new C555();
            stsCni2.STS.STATUSEVENT_02.Statuseventcoded_01 = "31";

            //  Repeating DTM
            stsCni2.DTM = new List();

            //  Date/time of the next status 7th February 2002
            var dtmSts2 = new DTM();
            dtmSts2.DATETIMEPERIOD_01 = new C507();
            dtmSts2.DATETIMEPERIOD_01.Datetimeperiodqualifier_01 = "40E";
            dtmSts2.DATETIMEPERIOD_01.Datetimeperiod_02 = "20020207";
            dtmSts2.DATETIMEPERIOD_01.Datetimeperiodformatqualifier_03 = "102";
            stsCni2.DTM.Add(dtmSts2);

            //  End STS Group
            cniLoop2.STSLoop.Add(stsCni2);

            //  End CNI Group 2
            result.CNILoop.Add(cniLoop2);

            //  Begin CNI Group 3
            var cniLoop3 = new Loop_CNI_IFTSTA();

            //  Third consignment number 5145E
            cniLoop3.CNI = new CNI();
            cniLoop3.CNI.Consolidationitemnumber_01 = "3";
            cniLoop3.CNI.DOCUMENTMESSAGEDETAILS_02 = new C503();
            cniLoop3.CNI.DOCUMENTMESSAGEDETAILS_02.Documentmessagenumber_01 = "5145E";

            //  Repeating STS Groups
            cniLoop3.STSLoop = new List();

            //  Begin STS Group
            var stsCni3 = new Loop_STS_IFTSTA();

            //  The consignment was customs refused and no recipient contact information
            stsCni3.STS = new STS();
            stsCni3.STS.STATUSTYPE_01 = new C601();
            stsCni3.STS.STATUSTYPE_01.Statustypecoded_01 = "1";
            stsCni3.STS.STATUSEVENT_02 = new C555();
            stsCni3.STS.STATUSEVENT_02.Statuseventcoded_01 = "17";
            stsCni3.STS.STATUSREASON_03 = new C556();
            stsCni3.STS.STATUSREASON_03.Statusreasoncoded_01 = "39";

            //  Repeating DTM
            stsCni3.DTM = new List();

            //  The refusal took place 15th January 2002
            var dtmSts3 = new DTM();
            dtmSts3.DATETIMEPERIOD_01 = new C507();
            dtmSts3.DATETIMEPERIOD_01.Datetimeperiodqualifier_01 = "334";
            dtmSts3.DATETIMEPERIOD_01.Datetimeperiod_02 = "20020115";
            dtmSts3.DATETIMEPERIOD_01.Datetimeperiodformatqualifier_03 = "102";
            stsCni3.DTM.Add(dtmSts3);

            //  Identify customs in Heathrow airport as the location of the status
            stsCni3.LOC = new LOC();
            stsCni3.LOC.Placelocationqualifier_01 = "16E";
            stsCni3.LOC.LOCATIONIDENTIFICATION_02 = new C517();
            stsCni3.LOC.LOCATIONIDENTIFICATION_02.Placelocation_04 = "H.MCUSTOMS AND EXCISE LONDON HEATHROW AIRPORT";

            //  End STS Group
            cniLoop3.STSLoop.Add(stsCni3);

            //  End CNI Group 3
            result.CNILoop.Add(cniLoop3);

            //  Begin CNI Group 4
            var cniLoop4 = new Loop_CNI_IFTSTA();

            //  Fourth consignment number 7655S
            cniLoop4.CNI = new CNI();
            cniLoop4.CNI.Consolidationitemnumber_01 = "4";
            cniLoop4.CNI.DOCUMENTMESSAGEDETAILS_02 = new C503();
            cniLoop4.CNI.DOCUMENTMESSAGEDETAILS_02.Documentmessagenumber_01 = "7655S";

            //  Repeating STS Groups
            cniLoop4.STSLoop = new List();

            //  Begin STS Group 1
            var stsCni4 = new Loop_STS_IFTSTA();

            //  The following goods item are lost
            stsCni4.STS = new STS();
            stsCni4.STS.STATUSTYPE_01 = new C601();
            stsCni4.STS.STATUSTYPE_01.Statustypecoded_01 = "1";
            stsCni4.STS.STATUSEVENT_02 = new C555();
            stsCni4.STS.STATUSEVENT_02.Statuseventcoded_01 = "49";

            //  Repeating DTM
            stsCni4.DTM = new List();

            //  Date/time reported lost 28th January 2002
            var dtmSts4 = new DTM();
            dtmSts4.DATETIMEPERIOD_01 = new C507();
            dtmSts4.DATETIMEPERIOD_01.Datetimeperiodqualifier_01 = "334";
            dtmSts4.DATETIMEPERIOD_01.Datetimeperiod_02 = "20020148";
            dtmSts4.DATETIMEPERIOD_01.Datetimeperiodformatqualifier_03 = "102";
            stsCni4.DTM.Add(dtmSts4);

            //  Repeating GID Groups
            stsCni4.GIDLoop = new List();

            //  Begin GID STS Group
            var gidSts1 = new Loop_GID_IFTSTA();

            //  One carton box, first goods item
            gidSts1.GID = new GID();
            gidSts1.GID.Goodsitemnumber_01 = "1";
            gidSts1.GID.NUMBERANDTYPEOFPACKAGES_02 = new C213();
            gidSts1.GID.NUMBERANDTYPEOFPACKAGES_02.Numberofpackages_01 = "1";
            gidSts1.GID.NUMBERANDTYPEOFPACKAGES_02.Typeofpackagesidentification_02 = "CT";

            //  Repeating PCI GID Groups
            gidSts1.PCILoop = new List();

            //  Begin PCI GID Group
            var pciGid1 = new Loop_PCI_IFTSTA();

            //  EAN.UCC SSCC
            pciGid1.PCI = new PCI();
            pciGid1.PCI.Markinginstructionscoded_01 = "33E";

            //  Repeating GIN
            pciGid1.GIN = new List();

            //  354107380000001068
            var ginPci1 = new GIN();
            ginPci1.Identitynumberqualifier_01 = "BJ";
            ginPci1.IDENTITYNUMBERRANGE_02 = new C208();
            ginPci1.IDENTITYNUMBERRANGE_02.Identitynumber_01 = "354107380000001068";
            pciGid1.GIN.Add(ginPci1);

            //  End PCI GID Group
            gidSts1.PCILoop.Add(pciGid1);

            //  End GID STS Group
            stsCni4.GIDLoop.Add(gidSts1);

            //  End STS Group 1
            cniLoop4.STSLoop.Add(stsCni4);

            //  Begin STS Group 2
            var stsCni5 = new Loop_STS_IFTSTA();

            //  The following goods items have been delivered
            stsCni5.STS = new STS();
            stsCni5.STS.STATUSTYPE_01 = new C601();
            stsCni5.STS.STATUSTYPE_01.Statustypecoded_01 = "1";
            stsCni5.STS.STATUSEVENT_02 = new C555();
            stsCni5.STS.STATUSEVENT_02.Statuseventcoded_01 = "21";

            //  Repeating DTM
            stsCni5.DTM = new List();

            //  Delivered 28th January 2002
            var dtmSts5 = new DTM();
            dtmSts5.DATETIMEPERIOD_01 = new C507();
            dtmSts5.DATETIMEPERIOD_01.Datetimeperiodqualifier_01 = "334";
            dtmSts5.DATETIMEPERIOD_01.Datetimeperiod_02 = "20020148";
            dtmSts5.DATETIMEPERIOD_01.Datetimeperiodformatqualifier_03 = "102";
            stsCni5.DTM.Add(dtmSts5);

            //  Repeating GID Groups
            stsCni5.GIDLoop = new List();

            //  Begin GID STS Group
            var gidSts2 = new Loop_GID_IFTSTA();

            //  One cardboard box, second goods item
            gidSts2.GID = new GID();
            gidSts2.GID.Goodsitemnumber_01 = "2";
            gidSts2.GID.NUMBERANDTYPEOFPACKAGES_02 = new C213();
            gidSts2.GID.NUMBERANDTYPEOFPACKAGES_02.Numberofpackages_01 = "1";
            gidSts2.GID.NUMBERANDTYPEOFPACKAGES_02.Typeofpackagesidentification_02 = "CT";

            //  Repeating PCI GID Groups
            gidSts2.PCILoop = new List();

            //  Begin PCI GID Group
            var pciGid2 = new Loop_PCI_IFTSTA();

            //  Box marked with EAN.UCC SSCC
            pciGid2.PCI = new PCI();
            pciGid2.PCI.Markinginstructionscoded_01 = "33E";

            //  Repeating GIN
            pciGid2.GIN = new List();

            //  EAN.UCC SSCC 354107380000001051
            var ginPci2 = new GIN();
            ginPci2.Identitynumberqualifier_01 = "BJ";
            ginPci2.IDENTITYNUMBERRANGE_02 = new C208();
            ginPci2.IDENTITYNUMBERRANGE_02.Identitynumber_01 = "354107380000001051";
            pciGid2.GIN.Add(ginPci2);

            //  End PCI GID Group
            gidSts2.PCILoop.Add(pciGid2);

            //  End GID STS Group
            stsCni5.GIDLoop.Add(gidSts2);

            //  End STS Group 2
            cniLoop4.STSLoop.Add(stsCni5);

            //  Begin STS Group 3
            var stsCni6 = new Loop_STS_IFTSTA();

            //  Consignment delivered
            stsCni6.STS = new STS();
            stsCni6.STS.STATUSTYPE_01 = new C601();
            stsCni6.STS.STATUSTYPE_01.Statustypecoded_01 = "1";
            stsCni6.STS.STATUSEVENT_02 = new C555();
            stsCni6.STS.STATUSEVENT_02.Statuseventcoded_01 = "21";

            //  Repeating DTM
            stsCni6.DTM = new List();

            //  Delivered 28th January 2002
            var dtmSts6 = new DTM();
            dtmSts6.DATETIMEPERIOD_01 = new C507();
            dtmSts6.DATETIMEPERIOD_01.Datetimeperiodqualifier_01 = "334";
            dtmSts6.DATETIMEPERIOD_01.Datetimeperiod_02 = "20020148";
            dtmSts6.DATETIMEPERIOD_01.Datetimeperiodformatqualifier_03 = "102";
            stsCni6.DTM.Add(dtmSts6);

            //  Repeating GID Groups
            stsCni6.GIDLoop = new List();

            //  Begin GID STS Group
            var gidSts3 = new Loop_GID_IFTSTA();

            //  One returnable pallet, third goods item
            gidSts3.GID = new GID();
            gidSts3.GID.Goodsitemnumber_01 = "3";
            gidSts3.GID.NUMBERANDTYPEOFPACKAGES_02 = new C213();
            gidSts3.GID.NUMBERANDTYPEOFPACKAGES_02.Numberofpackages_01 = "1";
            gidSts3.GID.NUMBERANDTYPEOFPACKAGES_02.Typeofpackagesidentification_02 = "09";
            gidSts3.GID.NUMBERANDTYPEOFPACKAGES_02.Codelistresponsibleagencycoded_04 = "9";

            //  Repeating PCI GID Groups
            gidSts3.PCILoop = new List();

            //  Begin PCI GID Group
            var pciGid3 = new Loop_PCI_IFTSTA();

            //  Pallet marked with EAN.UCC SSCC
            pciGid3.PCI = new PCI();
            pciGid3.PCI.Markinginstructionscoded_01 = "33E";

            //  Repeating GIN
            pciGid3.GIN = new List();

            //  EAN.UCC SSCC 354123451234567892
            var ginPci3 = new GIN();
            ginPci3.Identitynumberqualifier_01 = "BJ";
            ginPci3.IDENTITYNUMBERRANGE_02 = new C208();
            ginPci3.IDENTITYNUMBERRANGE_02.Identitynumber_01 = "354123451234567892";
            pciGid3.GIN.Add(ginPci3);

            //  End PCI GID Group
            gidSts3.PCILoop.Add(pciGid3);

            //  End GID STS Group
            stsCni6.GIDLoop.Add(gidSts3);

            //  End STS Group 3
            cniLoop4.STSLoop.Add(stsCni6);

            //  End CNI Group 4
            result.CNILoop.Add(cniLoop4);

            return result;
        }
    }
}

More operations in ediFabric .NET

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.

Resources

Parse your first EANCOM IFTSTA 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