EDIFACT PAXLST Passenger List

PAXLST is the UN/EDIFACT passenger list message used for advance passenger information (API). Airlines and vessel operators send it to border authorities with passenger and crew details. This sample follows the US CBP APIS implementation of D03B.

The message identifies the carrier and the flight or voyage in TDT groups, then repeats a NAD group per traveller with name, nationality, date of birth and travel document details.

At a glance

Standard
EDIFACT
Version
D03B (US CBP APIS)
Sent by
Carrier to border authority
Responses
CUSRES or country-specific response
ediFabric .NET template
TSPAXLST in EdiFabric.Templates.Edifact
OpenEDI definition
View PAXLST in the spec library

PAXLST structure

The full EDIFACT PAXLST layout from its OpenEDI definition, the same model ediFabric uses to parse, validate and generate it: 7 loops and 37 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 messageOptional1
RFFReferenceOptional1
DTMDate/time/periodOptional>1
NAD loopName and addressOptional>1
NADName and addressOptional1
CTAContact informationOptional1
COMCommunication contactOptional>1
TDT loopDetails of transportOptional>1
TDTDetails of transportOptional1
DTMDate/time/periodOptional1
LOC loopPlace/location identificationOptional>1
LOCPlace/location identificationOptional1
DTMDate/time/periodOptional>1
NAD loopName and addressOptional>1
NADName and addressOptional1
ATTAttributeOptional>1
DTMDate/time/periodOptional>1
MEAMeasurementsOptional>1
GEIProcessing informationOptional>1
FTXFree textOptional>1
LOCPlace/location identificationOptional>1
COMCommunication contactOptional1
EMPEmployment detailsOptional>1
NATNationalityOptional>1
RFFReferenceOptional1
DOC loopDocument/message detailsOptional>1
DOCDocument/message detailsOptional1
DTMDate/time/periodOptional>1
GEIProcessing informationOptional>1
RFFReferenceOptional>1
LOCPlace/location identificationOptional>1
CPICharge payment instructionsOptional1
QTYQuantityOptional>1
GID loopGoods item detailsOptional>1
GIDGoods item detailsOptional1
FTXFree textOptional>1
QTYQuantityOptional>1
TDT loopDetails of transportOptional1
TDTDetails of transportOptional1
FTXFree textOptional1
CNTControl totalOptional1
AUTAuthentication resultOptional1
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 PAXLST file

A PAXLST passenger manifest for one flight. Paste it into EdiNation to see every element named and validated.

UNB+UNOA:4+LOCK:02+CBP-ACE-TEST:02+041013:1901+16++ACE'
UNG+PAXLST+LOCK:02+CBP-ACE-TEST:02+041013:1901+16+UN+D:03B:'
UNH+PAXLST16+PAXLST:D:03B:UN'
BGM+10+LOCKKH04103101+4'
RFF+RFA:03'
TDT+11++++LOCK:172'
DTM+132:20041230:102'
NAD+VW+0000041153:109++AOMAD:CHRIS::::1+11107 SUNSET HILLS ROAD+RESTON+VA:163:5+20190'
ATT+2++M*M*M*M*M'
DTM+329:19350919:102'
EMP+4+++1++8'
NAT+2+US::5'
DOC+5K+P100971204141'
LOC+91+VA:163'
LOC+91+US:162'
DOC+39+15504141'
LOC+91+US:162'
UNT+16+PAXLST16'
UNE+1+16'
UNZ+1+16'

The same PAXLST 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": "PAXLST16",
    "MessageIdentifier_02": {
      "MessageType_01": "PAXLST",
      "MessageVersionNumber_02": "D",
      "MessageReleaseNumber_03": "03B",
      "ControllingAgencyCoded_04": "UN"
    }
  },
  "BGM": {
    "DOCUMENTMESSAGENAME_01": {
      "Documentnamecode_01": "10"
    },
    "DOCUMENTMESSAGEIDENTIFICATION_02": {
      "Documentidentifier_01": "LOCKKH04103101"
    },
    "Messagefunctioncode_03": "4"
  },
  "RFF": {
    "REFERENCE_01": {
      "Referencecodequalifier_01": "RFA",
      "Referenceidentifier_02": "03"
    }
  },
  "TDTLoop": [
    {
      "TDT": {
        "Transportstagecodequalifier_01": "11",
        "CARRIER_05": {
          "Carrieridentifier_01": "LOCK",
          "Codelistidentificationcode_02": "172"
        }
      },
      "DTM": {
        "DATETIMEPERIOD_01": {
          "Dateortimeorperiodfunctioncodequalifier_01": "132",
          "Dateortimeorperiodtext_02": "20041230",
          "Dateortimeorperiodformatcode_03": "102"
        }
      }
    }
  ],
  "NADLoop2": [
    {
      "NAD": {
        "Partyfunctioncodequalifier_01": "VW",
        "PARTYIDENTIFICATIONDETAILS_02": {
          "Partyidentifier_01": "0000041153",
          "Codelistidentificationcode_02": "109"
        },
        "PARTYNAME_04": {
          "Partyname_01": "AOMAD",
          "Partyname_02": "CHRIS",
          "Partynameformatcode_06": "1"
        },
        "STREET_05": {
          "Streetandnumberorpostofficeboxidentifier_01": "11107 SUNSET HILLS ROAD"
        },
        "Cityname_06": "RESTON",
        "COUNTRYSUBENTITYDETAILS_07": {
          "Countrysubentitynamecode_01": "VA",
          "Codelistidentificationcode_02": "163",
          "Codelistresponsibleagencycode_03": "5"
        },
        "Postalidentificationcode_08": "20190"
      },
      "ATT": [
        {
          "Attributefunctioncodequalifier_01": "2",
          "ATTRIBUTEDETAIL_03": {
            "Attributedescriptioncode_01": "M*M*M*M*M"
          }
        }
      ],
      "DTM": [
        {
          "DATETIMEPERIOD_01": {
            "Dateortimeorperiodfunctioncodequalifier_01": "329",
            "Dateortimeorperiodtext_02": "19350919",
            "Dateortimeorperiodformatcode_03": "102"
          }
        }
      ],
      "EMP": [
        {
          "Employmentdetailscodequalifier_01": "4",
          "QUALIFICATIONCLASSIFICATION_04": {
            "Qualificationclassificationdescriptioncode_01": "1"
          },
          "Qualificationapplicationareacode_06": "8"
        }
      ],
      "NAT": [
        {
          "Nationalitycodequalifier_01": "2",
          "NATIONALITYDETAILS_02": {
            "Nationalitynamecode_01": "US",
            "Codelistresponsibleagencycode_03": "5"
          }
        }
      ],
      "DOCLoop": [
        {
          "DOC": {
            "DOCUMENTMESSAGENAME_01": {
              "Documentnamecode_01": "5K"
            },
            "DOCUMENTMESSAGEDETAILS_02": {
              "Documentidentifier_01": "P100971204141"
            }
          },
          "LOC": [
            {
              "Locationfunctioncodequalifier_01": "91",
              "LOCATIONIDENTIFICATION_02": {
                "Locationnamecode_01": "VA",
                "Codelistidentificationcode_02": "163"
              }
            },
            {
              "Locationfunctioncodequalifier_01": "91",
              "LOCATIONIDENTIFICATION_02": {
                "Locationnamecode_01": "US",
                "Codelistidentificationcode_02": "162"
              }
            }
          ]
        },
        {
          "DOC": {
            "DOCUMENTMESSAGENAME_01": {
              "Documentnamecode_01": "39"
            },
            "DOCUMENTMESSAGEDETAILS_02": {
              "Documentidentifier_01": "15504141"
            }
          },
          "LOC": [
            {
              "Locationfunctioncodequalifier_01": "91",
              "LOCATIONIDENTIFICATION_02": {
                "Locationnamecode_01": "US",
                "Codelistidentificationcode_02": "162"
              }
            }
          ]
        }
      ]
    }
  ],
  "UNT": {
    "NumberofSegmentsinaMessage_01": "16",
    "MessageReferenceNumber_02": "PAXLST16"
  }
}

Parse and validate a PAXLST 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.EdifactD03B;

License.SetSerial("YOUR_SERIAL_KEY");

using (var stream = File.OpenRead(@"C:\edi\PassengerList.txt"))
using (var reader = new EdifactReader(stream, (unb, ung, unh) => typeof(TSPAXLST).GetTypeInfo()))
{
    var items = await reader.ReadToEndAsync();
    foreach (var transaction in items.OfType<TSPAXLST>())
    {
        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 '@PassengerList.txt'

Generate a PAXLST file

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

using EdiFabric.Templates.EdifactD03B;

License.SetSerial("YOUR_SERIAL_KEY");

var transaction = new TSPAXLST();

//  Message header
transaction.UNH = new UNH();
transaction.UNH.MessageReferenceNumber_01 = "0001";
transaction.UNH.MessageIdentifier_02 = new S009();
transaction.UNH.MessageIdentifier_02.MessageType_01 = "PAXLST";
transaction.UNH.MessageIdentifier_02.MessageVersionNumber_02 = "D";
transaction.UNH.MessageIdentifier_02.MessageReleaseNumber_03 = "03B";
transaction.UNH.MessageIdentifier_02.ControllingAgencyCoded_04 = "UN";

transaction.BGM = new BGM();
transaction.BGM.DOCUMENTMESSAGENAME_01 = new C002();
transaction.BGM.DOCUMENTMESSAGENAME_01.Documentnamecode_01 = "10";
transaction.BGM.DOCUMENTMESSAGEIDENTIFICATION_02 = new C106();
transaction.BGM.DOCUMENTMESSAGEIDENTIFICATION_02.Documentidentifier_01 = "LOCKKH04103101";
transaction.BGM.Messagefunctioncode_03 = "4";            

transaction.RFF = new RFF();
transaction.RFF.REFERENCE_01 = new C506();
transaction.RFF.REFERENCE_01.Referencecodequalifier_01 = "RFA";
transaction.RFF.REFERENCE_01.Referenceidentifier_02 = "03";

// ... 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 '@PassengerList.json' \
-o 'PassengerList.txt'

PAXLST questions

What is API?

Advance passenger information: identity and travel document data collected at check-in and sent to the destination country before arrival.

Is PAXLST used for crew lists too?

Yes. The same message carries crew manifests, identified by the BGM document code.

How is PAXLST different from PNRGOV?

PAXLST carries identity and document data. PNRGOV carries reservation data from the airline's system.

How do I parse and generate EDIFACT PAXLST files in .NET?

In .NET, install EdiFabric and EdiFabric.Templates.Edifact, read the file with EdifactReader into TSPAXLST 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 EDIFACT.

Parse your first PAXLST in five minutes

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