Skip to main content

Shipment

The shipment element defines the shipment itself and its presence is mandatory. Sender, receiver, delivery terms, service type and addons are defined in this element. The shipment element consists of <shipment orderno="..."> where ... is to be replaced with an attribute value of your choice with any data type and length. This attribute is not printed on shipment documents, it's unique for every shipment in a file and is searchable in nShift Delivery.

The information about the sender and receiver is supplied as <val n="from">...</val> and <val n="to">...</val>. These values refer to the sender's sndid and the receiver's rcvid attributes as mentioned in our examples earlier. Remember that sender information can also be predefined in nShift Delivery which makes the sender element obsolete. If this is the case, the value from should refer to the sender's quick ID in nShift Delivery.

Additional values are supplied as <val n="value name">...</val>. An index of valid values can be found in the Value reference guide. The element must end with </shipment>.

Prepared shipments, which are shipments originating from nShift Checkout, can be completed by using XML-file. In that case, the shipment element must contain the prepareid attribute, <shipment orderno="..." prepareid=”...”>. Once a shipment is completed, the prepare ID is deleted. However, if there is a need to keep the prepare ID for later use, it can be done by using the keeppreparedshipment attribute, <shipment orderno="..." prepareid=”...” keeppreparedshipment=”yes”>.

Service

This element contains the carrier's service code and its presence is mandatory. It's supplied as a nested element under shipment as <service srvid="..." where ... corresponds to service code. An index of valid codes can be found in Help > Code lists > Service codes - Integration menu in nShift Delivery.

The element must end with </service>.

Addon services

As mentioned earlier, addon services such as Cash On Delivery and Receiver payment to name a few, can be supplied in this element. Addons are defined as nested elements to the service element as <addon adnid="..."> where ... corresponds to the addon code. An index of valid addon codes can be found in the Help > Code lists > Service codes - Integration menu in the system.

Addons may require additional information in order to be valid. For instance, Cash On Delivery requires an amount and a payment reference. An index of valid values can be found in Value reference guide. The element must end with </addon>.

Container

The container element defines contents of the shipment, for example, number of parcels, weight and volume. This element is also nested in the shipment element. Values are supplied as <val n="value name">...</val>. An index of valid values can be found in the Value reference guide.

Parcel information can be defined in several different ways:

<container type="parcel"> defines information for each parcel individually.

<container type="parcel" measure="totals" defines information for an entire row of parcels.

<container type="parcel" partorderno="..."> defines an order number for the parcel row. Any value.

<container type="totals" measure="totals"> defines information for the entire shipment.

Caution

Use only one parcel definition type per shipment.

Example - per parcel

<container type="parcel">
    <val n="copies">2</val>
    <val n="weight">10</val>
</container>

Shipment contains two parcels and the total weight is 20 kg (2 parcels x 10 kg).

Example - per parcel row

<container type="parcel" measure="totals">
    <val n="copies">2</val>
    <val n="weight">10</val>
</container>

Shipment contains two parcels and the total weight is 10 kg. The individual parcel weight is only assumed to be 5 kg each. Please note that the assumed individual parcel weight will not be printed on shipping documents.

Example - a shipment element

<shipment orderno="Ordernumber_1">
    <val n="from">1</val>
    <val n="to">    </val>
    <val n="reference">Shipment reference</val>
    <val n="freetext1">Text of your choice</val>
    <service srvid="P15">
    </service>
        <container type="parcel">
	    <val n="copies">1</val>
	    <val n="weight">10</val>
	    <val n="contents">Stuff</val>
	</container>
</shipment>

Customs declaration documents

This element contains information about customs declaration documents. It's supplied as a nested element under shipment as <customsdeclaration documents="..."> where ... corresponds to the document type.

If using multiple attribute values, separate them with a pipe character (|).

Valid attribute values

PROFORMA = Proforma / commercial invoice

EDOC = ED document

PROFORMAPLABEDI = Proforma / commercial invoice by EDI and a printed copy (PostNord Sweden only)

PROFORMATNT = Proforma / commercial invoice for TNT

NOTETNT = Note for TNT

PLT = Customs information via EDI only

PNLWAYBILLEDI = I will send a separate customs declaration (EDI) (Bring only)

BRINGEDI = I will send a separate customs declaration and VAT on e-commerce (EDI) (Bring only)

CN22 = CN22POSTNORD

CN22DKPBREVINC = CN22 for Postnord DK Tracked

CN22INC = CN22 for Deutsche Post, PostNord Brev and Direct Link

CN23 = CN23POSTNORD

CN23MULTPDK = CN23 for Postnord DK Tracked

CN23PDK = CN23 for PostNord DK EMS International Express

CN23ATTACHED = Commercial invoice attached for PostNord DK EMS International Express

CN22POSTI = CN22 for Posti

CN23POSTI = CN23 for Posti

PROFORMAUPS = Proforma / commercial invoice for UPS

FEDEXP = Commercial Invoice for FEDEX

TRADEINVOICEPDK = Customs declaration for PostNord Denmark

DHLROADSTD = DHL Customs Standard

DHLAIR = DHL Express

Additional values are supplied as <val n="value name">...</val>. An index of valid values can be found in the Value reference guide. The element must end with </customsdeclaration>.

Example - customs declaration

<customsdeclaration documents="|PROFORMA|">
      <val n="senderorgno">12121212</val>
      <val n="parcelcount">1</val>
      <val n="invoicetype">PROFORMA</val>
      <val n="customsunit">SEK</val>
      <val n="impexptype">OTHER</val>
      <line measure="totals">
        <val n="statno">12121212</val>
        <val n="customsvalue">111.0</val>
        <val n="contents">Things</val>
        <val n="quantity">1</val>
        <val n="sourcecountry">SE</val>
      </line>
</customsdeclaration>

Tip

You can generate a sample file from your shipment history. Please refer to Generate integration file from history