CreateShipment

Creates a DHL Shipping Label.

The "shipService" parameter can be used to specify the shipping method. If no shipService is specified, the default is DHL package with value V01PAK.

According to the DHL documentation, the following options are currently available:

ProductDescriptionKey for API

DHL Paket

Package in national parcel delivery

V01PAK

DHL Paket Prio

Parcel with guaranteed delivery within of two days in national parcel shipment

V01PRIO

DHL Paket Taggleich

Package in national same day parcel delivery

VK06PAK

DHL Paket International

Business-to-consumer shipping worldwide

VK53WPAK

DHL Europaket

Business-to-business delivery; Terms for delivery to end-users are not permitted; mainly in EU countries using DHLown network

VK54EPAK

Warenpost

national dispatch of goods for small items in the german postal network

V62WP

Example Usages

let result = await app.businessFunction({
  functionName: "DhlShipping",
  methodName: "CreateShipment",
  weightInKG: "4",
  lengthInCM: "20",
  heightInCM: "20",
  widthInCM: "10",
  shipService: "V01PAK",
  recipientEmailAddress: "info@acme.com",
  senderAddress: {
    name1: app.getFieldValue("cordCompanyId.cusName"),
    streetName: app.getFieldValue("cordCompanyId.cusStreet"),
    streetNumber: app.getFieldValue("cordCompanyId.cusStreetNumber"),
    zip: app.getFieldValue("cordCompanyId.cusZip"),
    city: app.getFieldValue("cordCompanyId.cusCity"),
    countryCode: "DE",
  },
  receiverAddress: {
    name1: app.getFieldValue("cordCustomerId.cusName"),
    streetName: app.getFieldValue("cordCustomerId.cusStreet"),
    streetNumber: app.getFieldValue("cordCustomerId.cusStreetNumber"),
    zip: app.getFieldValue("cordCustomerId.cusZip"),
    city: app.getFieldValue("cordCustomerId.cusCity"),
    countryCode: "DE",
  },
});
console.log("Shipment Number: " + result.shipmentNumber);
window.open(result.labelUrl, "_blank");

Last updated