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:
Product
Description
Ship Service
DHL Paket
Package in national parcel delivery
V01PAK
DHL Paket International
Business-to-consumer shipping worldwide
V53WPAK
DHL Europaket
Business-to-business delivery; Terms for delivery to end-users are not permitted; mainly in EU countries using DHL's own network
V54EPAK
Warenpost
National dispatch of goods for small items in the German postal network
V62KP
Warenpost International
International dispatch of goods for small items
V66WPI
Example Usages
DHL Paket
let result = await app.businessFunction({
functionName: "DhlShipping",
methodName: "CreateShipment",
billingNumber: "33333333330102",
weightInKG: "4",
lengthInCM: "20",
heightInCM: "20",
widthInCM: "10",
shipService: "V01PAK",
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: "DEU",
email: "sender@example.com",
},
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: "DEU",
email: "receiver@example.com",
},
});
console.log("Shipment Number: " + result.shipmentNumber);
app.showBlob("docLabel", result.LabelData);
DHL Paket International
let result = await app.businessFunction({
functionName: "DhlShipping",
methodName: "CreateShipment",
billingNumber: "33333333335301",
weightInKG: "1",
heightInCM: "15",
lengthInCM: "20",
widthInCM: "10",
shipService: "V53WPAK",
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: "DEU",
email: "sender@example.com",
},
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: "AUT",
email: "receiver@example.com",
},
customs: {
exportType: "COMMERCIAL_GOODS",
postalCharges: {
currency: "EUR",
value: 1
},
items: [
{
itemDescription: "item description",
packagedQuantity: 1,
hsCode: "123456",
countryOfOrigin: "DEU",
itemValue: {
currency: "EUR",
value: 17.95
},
itemWeight: {
uom: "g",
value: 400
}
}
]
}
});
console.log("Shipment Number: " + result.shipmentNumber);
app.showBlob("docLabel", result.LabelData);
Last updated
Was this helpful?