Step 2

​​In this step you learn how to create your own shipment zip file.

Understanding the shipment file

 zipfile1.png

 

«Visualisation of the shipment zip containing shipment info and one or more messages for distribution»

 

The shipment file is a zip file which has the following restrictions:

 

The name of the shipment zip must be "netsshare_*.zip"
Minimum of 2 files in the zip (always only one shipment.xml + one Message (PDF))

Subfolders in the zip are not allowed

Maximum of 10.000 files (one shipment.xml + 9.999 PDF's) [norm 1-200 Messages pr shipment]

Maximum 2 GB pr zip

                Maximum individual PDF size 10MB (keep as low as possible, price depends on PDF size)

                Maximum individual PDF for signing size 1MB (No active links allowed)

                Maximum attachments per Message is 8 besides the main PDF

Shipment examples

The XML format in Nets Share is under continuous development. Nets Share's goal is to be backwards compatible for up to three versions of the format.

Currently, Nets Share XML Versions 1.3 up to 1.6 are supported. The format version is part of the namespace indicated in the <shipment xmlns> element in the shipment.xml

The newest XSD's can be viewed/downloaded HERE​ Alternatively you may copy the below examples and manipulate the content as desired. Please note that the content in the shipment.xml is case sensitive and that it has to be encoded in UTF-8.

 

During your own tests the sender corporate identity is the company number, for the company you represent which you have filled out in the demo access form Request Demo access

 

During the test you will use e-Boks id 15723 and material id 163057 (normal documents) or material id 162812 (documents for signing in e-Boks) in the shipment.xml. You can send test shipments to personIdentityNumber (CPR-number) 2402911995 and 0411820680, which are registered demo users. Other random CPR numbers are also possible to use, but will in most cases return a "Code 50" rejection on each Message from e-Boks since the user has never been logged on.

 

Example #1  e-Boks alone

This example contains the e-Boks channel alone and is the easiest to use. I have also added optional fields these are inbetween the grey optional tags. There are two messages in the below shipment, message 1 is for a corporate receiver and message 2 is for a person. The first attachment tags which are before the message tags are global attachments which will be added to all below messages in addition to whatever individual attachments they have already. Whether or not a document is meant for signing in eBoks is defined by the documentType which is specially made by eBoks to match the eboksID and tells eboks what is required from the document. In message 2 the second social security number under the eboks:signers tag is for multi signing where a second or more persons are required to sign the document. The eboks:signers tag is removed if only one person is needed to sign who would be the main receiver in the eboks:receiver tag.

<?xml version="1.0" encoding="UTF-8"?>
<shipment xmlns="http://www.nets.eu/nets-share/1.6"
          xmlns:eboks="http://www.nets.eu/nets-share/1.6/eboks">
 
  <shipmentInfo>
    <shipmentId>shipmentWithEboks</shipmentId>
    <sender>
  <corporateIdentityNumber>12345678</corporateIdentityNumber>
      <country>DK</country>
    </sender>
  </shipmentInfo>
    <!-- optional below -->
    <attachments>
    <attachment path="attachment_001.pdf">
<eboks:attachmentDescription>folgebrev1</eboks:attachmentDescription>
</attachment>
  </attachments>
    <!-- optional above -->
  <messages>
    <message id="1">
      <sender>
        <eboks:eboksId>15723</eboks:eboksId>
      </sender>
      <eboks:receiver>
        <eboks:danishOrganisation cvr="12345678"></eboks:danishOrganisation>
        <eboks:country>DK</eboks:country>
      </eboks:receiver>
    <eboks:config>
        <eboks:description>subjectfield test</eboks:description>
        <!-- optional below -->
		<eboks:realTime>false</eboks:realTime>
		<eboks:signingDeadline>2019-07-28 22:25</eboks:signingDeadline>
        <eboks:publishDate>2019-07-25 08:00</eboks:publishDate>
        <!-- optional above -->
    </eboks:config>
      <document>
<documentType>163057</documentType>
        <filepath>document1.pdf</filepath>
         <!-- optional below -->
          <attachment path="attachment_002.pdf">
<eboks:attachmentDescription>folgebrev2</eboks:attachmentDescription>
</attachment>
         <!-- optional above -->
      </document>
    </message>
 
    <message id="2">
      <sender>
<eboks:eboksId>15723</eboks:eboksId>
        </sender>
      <eboks:receiver>
        <eboks:personIdentityNumber>1234567890</eboks:personIdentityNumber>
        <eboks:country>DK</eboks:country>
      </eboks:receiver>
      <eboks:config>
          <eboks:description>subjectfield test</eboks:description>
          <!-- optional below -->
		  <eboks:realTime>true</eboks:realTime>
		  <eboks:signingDeadline>2019-07-28 22:28</eboks:signingDeadline>
          <eboks:publishDate>2019-07-25 08:00</eboks:publishDate>
        <eboks:signers>
          <eboks:danishSigner>
            <eboks:danishOrganisation cvr="12345678"/>
          </eboks:danishSigner>
          <eboks:danishSigner>
            <eboks:personIdentityNumber>1234567890</eboks:personIdentityNumber>
          </eboks:danishSigner>
        </eboks:signers>
          <!-- optional above -->
      </eboks:config>
      <document>
<documentType>162812</documentType>       
<filepath>document3.pdf</filepath>
      </document>
    </message>
  </messages>
</shipment>

​​

 

Example #2  e-Boks + Print

This example contains the e-Boks and Print channel, here we will attempt to deliver to e-Boks but if that fails we will print the document instead. I have added optional fields these are inbetween the grey optional tags. In the same way as in example #1 the personIdentityNumber tag can be swapped for the corporateIdentityNumber if the message is meant for a company rather than a person. Global attachments can also be added below if wanted like in example #1.

 


<?xml version="1.0" encoding="UTF-8"?>
<shipment xmlns="http://www.nets.eu/nets-share/1.6"
          xmlns:eboks="http://www.nets.eu/nets-share/1.6/eboks"
          xmlns:print="http://www.nets.eu/nets-share/1.6/print"
          xmlns:print-nordic="http://www.nets.eu/nets-share/1.6/print-nordic">
  <shipmentInfo>
    <shipmentId>shipmentWithEboksAndPrint</shipmentId>
    <sender>
  <corporateIdentityNumber>12345678</corporateIdentityNumber>
      <country>DK</country>
    </sender>
  </shipmentInfo>
<messages>
     <message id="1">
      <sender>
          <eboks:eboksId>12345</eboks:eboksId>
        <print-nordic:returnAddress>
          <print-nordic:name>Company or Person X</print-nordic:name>
          <print-nordic:addressline1>Strandvejen 1</print-nordic:addressline1>
           <!-- optional below -->
            <print-nordic:addressline2>Espegarde</print-nordic:addressline2>
           <!-- optional above -->
          <print-nordic:postalCode>1234</print-nordic:postalCode>
          <print-nordic:city>Copenhagen</print-nordic:city>
          <print-nordic:country>DK</print-nordic:country>
        </print-nordic:returnAddress>
      </sender>
      <eboks:receiver>
        <eboks:personIdentityNumber>1234567890</eboks:personIdentityNumber>
        <eboks:country>DK</eboks:country>
      </eboks:receiver>
      <print-nordic:receiver>
        <print-nordic:name>Nets A/S</print-nordic:name>
        <print-nordic:addressline1>Att: PFWIL</print-nordic:addressline1>
        <print-nordic:addressline2>Lautrupbjerg 10</print-nordic:addressline2>
        <print-nordic:postalCode>2450</print-nordic:postalCode>
        <print-nordic:city>Ballerup</print-nordic:city>
        <print-nordic:country>DK</print-nordic:country>
      </print-nordic:receiver>
       <eboks:config>
        <eboks:description>subjectfield test</eboks:description>
		<!-- below must be false to allow fall-back to print if rejected by eboks -->
		<eboks:realTime>false<eboks:realTime>
		<!-- above must be false to allow fall-back to print if rejected by eboks -->
       </eboks:config>
      <document>
 <documentType>123456</documentType>       
      <filepath>document2.pdf</filepath>
      </document>
    </message>
  </messages>
</shipment>

​ 

Print alone?

It is possible to make a shipment.xml with print info alone, this is available in the full documentation example package. Alternatively you can add a routing override, skipping the e-Boks channel, the below tags are to be added to each message as desired after the document tag.
Please note that the final channel is to always be "retur".

 ​

      <routing>
        <channel priority="0">
          <destination>print_nordic</destination>
        </channel>
        <channel priority="1">
          <destination>retur</destination>
        </channel>
      </routing>

Whats next?

Now that you have been familiarized with how to create your own shipment zip. The next step is to fill out a registration form for a test User and SFTP access (if you havnt already done this), and to learn how to connect to the SFTP.  Step 3 connecting to the SFTP and sending the first file - Click here ​