DataTransfer – Appendix 5

Language navigation

DataTransfer – Appendix 5

Close

    DataTransfer – Appendix 5

    Description of the DataTransfer interface

    EAD (Electronic Advance Data) submission for international letter mail containing goods

    1. Introduction

    1.1 Who is this guide written for?

    This Appendix contains the technical information relating to the electronic submission of EAD (Electronic Advance Data) to Swiss Post.

    1.2 What information will you receive about DataTransfer?

    DataTransfer Manual: Overview and functional descriptions for DataTransfer

    Brief description of DataTransfer services, letters with barcode (BMB) via DataTransfer, Letter ID, “Create a Dispatch List” via DataTransfer and Parcel Post easy via SFTP, an explanation of how DataTransfer works and an illustration of the registration and test procedure. This is aimed primarily at DataTransfer decision-makers.

    DataTransfer – Appendix 1: Description of DataTransfer customer interface: Parcels, Express, Solutions, letters with barcode (BMB) and Letter ID

    Description of the notification structure and data to be submitted for parcels, Express, Solutions, BMB, Letter ID plus technical specifications such as input file formats and naming conventions.

    DataTransfer – Appendix 2: Description of customer interface “Create a Dispatch List”

    Description of the data to be submitted for “Create a Dispatch List” and overview of “Create a Dispatch List” reports.

    DataTransfer – Appendix 3: Description of DataTransfer reports

    Description of the contents of reports for BMB, parcels and Swiss-Express, but excluding “Create a Dispatch List”.

    DataTransfer – Appendix 5: Description of the DataTransfer customer interface: EAD submission

    Description of the technical information for electronic data delivery of EAD (Electronic Advance Data) for international letter mail containing goods.

    1.3 Validity

    The manual is updated online. Changes are set out in section 5 in the release notes.

    The old PDFs will cease to be valid with the publication of the new instructions. This page shows the current version.

    1.4 Abbreviations and terms used

    Abbreviation Description
    BMB Letters with barcode
    DataTransfer Name of service for electronically transmitting data to Swiss Post
    KDP number
    Swiss Post customer identification number
    Letter ID Addressed and uniquely identified letters (with DMC) are delivered using the Letter ID provider
    LSO Delivery note for letters with barcode are used by the BMB provider when dispatching mailings
    Parcel Post easy  Parcel post without dispatch list
    PKZIP 2.0 Compression standard for reducing file size. Nowadays, almost all files with the extension .zip are in PKZIP 2.0 format
    XSD XML-diagram definition: for generating and verifying the XML file

    1.5 Support

    Post CH Ltd
    Support DataTransfer
    Wankdorfallee 4
    3030 Berne
    Switzerland

    E-mail: datatransfer@swisspost.ch

    2. Technical specification

    2.1 Data submission

    Data can be transmitted in the following ways:

    • As an e-mail attachment
    • Via a Swiss Post SFTP account
    • Via the Confederation’s sedex platform (XML only)

    Guidelines for preparing files can be found in Section 2.3

    2.1.1 E-mail

    To submit data via e-mail, you will need an e-mail account with which you can send e-mails of up to 2 MB. The e-mail attachment must be sent in base64 or unencoded format.

    Procedure for submitting data by e-mail

    Prepare the data in XML format and add the file to an e-mail as an attachment. The maximum file size for submitting data via e-mail is 2 MB per submission.

    So that the attached files can be uniquely identified when you submit data via e-mail, you must also specify a keyword in the body of the e-mail. If this keyword is incorrect, the e-mail (plus attachment) will be deleted. The keyword to bespecified in e-mails is:

    • In the test phase: T-770809dfu01input
    • In the productive phase: 770809dfu01input

    Note: the e-mail must only contain the keyword and the file.Any additional wording, such as automatic signatures, is not permitted.

    Send the e-mail to paketversand.dfu@swisspost.ch.

    2.1.2 SFTP

    To submit data via SFTP, you‘ll need a Swiss Post SFTP account. If you don’t have a Swiss Post SFTP account yet, one will be opened once you have registered.

    Instructions on importing data via SFTP can be found in this manual or obtained from DataTransfer Support. 

    2.1.3 sedex

    sedex subscribers of the eSchKG domain can exchange consignment data electronically using the Confederation’s sedex platform. The existing DataTransfer services were extended with an adapter.

    Registrations at the Swiss Federal Statistical Office are carried out by DataTransfer Support. 

    You will find instructions for transferring data via sedex at DataTransfer -> Letters with barcode.

    2.2 File formats 

    Files are accepted in XML (UTF-8) and ZIP (PKZIP 2.0) format. See Section 3.1.1 for the file structure.

    2.2.1 Special characters in XML format

    XML files must conform to XML standards in order for DataTransfer to process them. When submitting files, this means thatthe attribute values in XML files must not contain any unencoded special characters, such as pointed brackets (<>) or speech marks (“).

    In order to send these special characters, you need to encode them using special characters that HTML will recognize. These take the following format: &[Last name];

    The following example shows you how to encode the commercial “and” sign (“&”): REC_Name1=“Moser &amp; Cie.“

    Here is a list of special characters and the corresponding format in which they must be submitted:

    Special characters Coding
    & &amp;
    < &lt;
    > &gt;
    &quot;
    &apos;

    Normal umlauts may not be encoded as HTML.

    There’s an easy way to check whether your XML is well-formed and can be processed by DataTransfer: open the file in an browser (e.g. Internet Explorer or Mozilla Firefox). If the files are not well-formed, a corresponding error message appears.

    2.3 Naming conventions

    2.3.1 Input file names

    If you send files that do not conform to the naming convention shown below, these files will not be collected and will be automatically deleted after a specified period of time. For security reasons, you will not be notified of this. The following naming convention should therefore be strictly adhered to.

    Naming convention

    SenderID_EAD_INPUT_YYYYMMDD_HHMMSS_FileID.xml

    SenderID_EAD_RcptMsg_YYYYMMDD_HHMMSS_FileID.xml

    SenderID_EAD_ConfMsg_YYYYMMDD_HHMMSS_FileID.xml

    The FileID of the EAD INPUT message and the corresponding BMB input file must be identical. This is the only way to easily verify the completeness of your submissions.

    Tip

    And if you also add the FileID to the SendingID element in the BMB input file, the corresponding information will be included in all reports for all consignments on this LSO

    <SendingID>1</SendingID>

    Example

    829_EAD_RcptMsg_20190708_101305_447204.xml

    Maximum file size for files to be sent

    The delivery file must be a maximum of 6 MB. If the file exceeds this size it will not be processed and you will receive an error message (max. filesize exceeded).

    3. Data content of customer interface

    3.1 Data submission for international letter mail containing goods

    You will receive a receipt confirmation and a processing log for each file submitted. These will both be sent to you by SFTP.

    The receipt confirmation states whether the file has been successfully transmitted and could be recognized by DataT-ransfer. This involves validating the fields “FileID”, “SenderID” and “KDPNumber”. The file is tested for parsing capability and exact conformity with the interface schema (elements and attributes). Any errors are individually listed in the processing protocol. You can suppress receipt confirmation by specifying “SendOKMail = 1” in the file being submitted; however, if errors are identified in the file, the receipt confirmation will always be sent.

    The processing log indicates whether DataTransfer could pro-cess the data contained within the file. Any invalid records will be given an error code and an error description to help you identify the error. However, the processing log does not tell you anything about the quality of the address that has been submitted. By specifying “SendOKMail = 1” in the file, you can choose whether you want to receive the processing log if the data is OK; however, if errors are identified in the file, the log will always be sent.

    The overview table containing all error codes and their expla-nations can be found at Technical DataTransfer Support → Letters with barcode.

    <​Envelope>
    OriginVersion
    xmlns
    <​FileInfos>
    <​FileID/>
    <​FileDate/>
    <​FileTime/>
    <​/FileInfo>
    <​ItemInfo>
    <​InfoEvent>
    <​Date/>
    <​PostcodeUPU/>
    <​Source/>
    <​/InfoEvent>
    <​ItemInfoData>
    <​Barcode/>
    <​TotalValue/>
    <​TotalCurrency/>
    <​MailSourceExport/>
    <​PostagePrice/>
    <​PostageCurrency/>
    <​DeclaredGrossWeight/>
    <​NatureOfTransaction-Code/>
    <​AssociatedDocumentType/>
    <​AssociatedDocumentIdentifier/>
    <​DestinationCountryIso/>
    <​/InfoEvent>
    <​ItemInfoData>
    <​Name1/>
    <​Name2/>
    <​Name3/>
    <​Address1/>
    <​Address2/>
    <​Address3/>
    <​ZipCode/>
    <​City/>
    <​Region/>
    <​CountryIso/>
    <​Language/>
    <​Tel/>
    <​Email/>
    <​Vat/>
    <​Taxnumber/>
    <​Contact/>
    <​/Addressee>
    <​/Sender>
    <​Name1/>
    <​Name2/>
    <​Name3/>
    <​Address1/>
    <​Address2/>
    <​Address3/>
    <​ZipCode/>
    <​City/>
    <​CountryIso/>
    <​Contact/>
    <​Email/>
    <​Tel/>
    <​Reference/>
    <​Vat/>
    <​Taxnumber/>
    <​/Sender>
    <​ItemPosition>
    <​Position/>
    <​OriginLocation/>
    <​ProductDescription/>
    <​TariffHeading/>
    <​NetWeight/>
    <​Amount/>
    <​Value/>
    <​ValueCurrency/>
    <​/ItemPosition>
    <​/ItemInfo>
    <​/SendItemInfo>

    3.1.2 XML schema / XSD

    A schema is provided for creating and validating the XML interface. The schema is stored as an XSD (XML-Schema-Definition) and can be invoked from the following address, or directly incorporated into the XML: Technical Support DataTransfer

    3.1.3 Sample XML format for international letters containing goods

    You can find a sample XML for an input file for international letters containing goods at Technical DataTransfer Support.

    3.1.4 Example of an EAD DataTransfer file for EAD

    <?xml version="1.0" encoding="UTF-8"?>
    <SendItemInfo xmlns=http://www.post.ch/datatransfer/schemas/2019/02/ead OriginVersion="11">
           <FileInfo>
                 <FileID>8975</FileID>
                 <FileDate>20190619</FileDate>
                 <FileTime>100443</FileTime>
           </FileInfo>
           <ItemInfo>
                 <InfoEvent>
                        <Date>2019-06-19T10:04:43</Date>
                        <PostcodeUPU>CHZRHB</PostcodeUPU>
                        <Source>EXT</Source>
                 </InfoEvent>
                 <ItemInfoData>
                        <Barcode>RF115700015CH</Barcode>
                        <TotalValue>2250</TotalValue>
                        <TotalCurrency>CHF</TotalCurrency>
                        <MailSourceExport>AE</MailSourceExport>
                        <PostagePrice>36</PostagePrice>
                        <PostageCurrency>CHF</PostageCurrency>
                        <DeclaredGrossWeight>0.5</DeclaredGrossWeight>
                        <NatureOfTransactionCode>3</NatureOfTransactionCode>
                        <DestinationCountryIso>DE</DestinationCountryIso>
                 </ItemInfoData>
                 <Addressee>
                        <Name1>Max</Name1>
                        <Name2>Muster</Name2>
                        <Address1>rue dela vue Z2 0009</Address1>
                        <Address2>adresszusatz</Address2>
                        <Address3>p.b. 999</Address3>
                        <ZipCode>45678</ZipCode>
                        <City>aruba capitale</City>
                        <CountryIso>DE</CountryIso>
                        <Language>ENG</Language>
                        <Email>max.muster@gmx.ch</Email>
                 </Addressee>
                 <Sender>
                        <Name1>Daniela</Name1>
                        <Name2>Meier</Name2>
                        <Name3>Apotheke + Drogerie AG</Name3>
                        <Address1>Marktgasse 99</Address1>
                        <ZipCode>8600</ZipCode>
                        <City>Dübendorf</City>
                        <CountryIso>CH</CountryIso>
                        <Contact>Daniela Meier</Contact>
                        <Email>daniela.meier@apotheke.ch</Email>
                        <Tel>+31888777999</Tel>
                 </Sender>
                 <ItemPosition>
                        <Position>1</Position>
                        <OriginLocation>EG</OriginLocation>
                        <ProductDescription>Brillen &amp; Kontaktlinsen</ProductDescription>
                        <NetWeight>0.5</NetWeight>
                        <Amount>2250</Amount>
                        <Value>1</Value>
                        <ValueCurrency>CHF</ValueCurrency>
                 </ItemPosition>
           </ItemInfo>
    </SendItemInfo>

    3.2 Confirmations

    The content of these confirmations is always in English. The overview table containing all error codes and their explanations can be found at Technical DataTransfer Support.

    3.2.1 Confirmation message

    The confirmation message contains feedback on the content of the message.

    Sample confirmation message

    <?xml version="1.0" encoding="utf-8"?>
    <ns0:ConfMsg xmlns:ns0=http://www.post.ch/datatransfer/schemas/2019/02/ead>
           <ns0:FileID>200103</ns0:FileID>
           <ns0:FileDate>20200103</ns0:FileDate>
           <ns0:FileTime>100443</ns0:FileTime>
           <ns0:SenderID>982</ns0:SenderID>
           <ns0:ResponseStatus>OK</ns0:ResponseStatus>
           <ns0:ItemInfoStatus>
                 <ns0:Barcode>RO995078912CH</ns0:Barcode>
                 <ns0:Status>OK</ns0:Status>
                 <ns0:ErrorMessage>
                        <ns0:Type/>
                        <ns0:Code/>
                 </ns0:ErrorMessage>
           </ns0:ItemInfoStatus>
    </ns0:ConfMsg>

    3.2.2 Receipt message

    The receipt message is the confirmation of receipt. DT sends this in the event of a successful acceptance. If acceptance has been unsuccessful, no response to the sender will be generated. The receipt message contains no content information.

    Sample receipt message

    <?xml version="1.0" encoding="utf-8"?>
    <ns0:RcptMsg xmlns:ns0=http://www.post.ch/datatransfer/schemas/2019/02/ead>
           <ns0:FileID>200103</ns0:FileID>
           <ns0:FileDate>20200103</ns0:FileDate>
           <ns0:FileTime>100443</ns0:FileTime>
           <ns0:SenderID>982</ns0:SenderID>
    </ns0:RcptMsg>

    3.2.3 Error codes in the event of faulty data delivery

    An Excel list with all error codes, which may be listed in the processing protocol or in recipient confirmations, can be found at Technical DataTransfer Support.

    4. Additional publications

    5. Release Notes

    5.1 Changes

    • New document inserted
    • Implementation on microsite