DHL Express Shipping - DHL REST API Integration

Modern DHL REST API integration for global express shipping

The DHL Express Shipping module integrates with DHL REST API to automatically calculate shipping rates based on weight and address, create DHL shipments directly from delivery orders, print shipping labels in PDF or thermal format, track shipment status via tracking number, and generate return labels for customers.

The module supports customs declaration for international goods, automatic shipping insurance calculation, and various DHL Express products.

REST API
Express Worldwide
Auto Rate Calculation
Thermal Labels
Real-time Tracking
International Customs
Shipping Insurance
Return Labels

Key Features

Key points

  • Modern DHL REST API integration with high performance

  • Automatic shipping rate calculation based on weight and address

  • Create DHL shipments directly from delivery orders

  • Print shipping labels in PDF or thermal format (8x4, 6x4)

  • Track shipment status via tracking number

  • Generate return labels for customers (automatic or manual)

  • Support customs declaration for international goods

  • Automatic shipping insurance calculation


User Groups

User Permissions

GroupMain Role
Warehouse StaffCreate shipping labels, print labels, pack goods
Sales StaffCalculate rates, add shipping fees to orders
Logistics ManagerConfigure shipping methods, manage DHL account

EN/VI Terminology Reference

FieldsTrường dữ liệuDescription
DHL API KeyMã khóa API DHLAPI key from DHL Developer Portal
DHL API SecretMã bí mật API DHLSecret from DHL Developer Portal
DHL Account NumberSố tài khoản DHLDHL Express account number
RegionKhu vựcAsia Pacific, America, Europe
DHL ProductSản phẩm DHLD - Express Worldwide, P - Express Worldwide, U - Express Worldwide
DHLxw Package TypeLoại kiện hàng DHLxwDHL Box, Customer Provided
Unit SystemHệ thống đơn vịMetric (kg, cm) or Imperial (lb, in)
Label Image FormatĐịnh dạng hình ảnh nhãnPDF, ZPL, EPL
Label TemplateNhãn mẫu8X4_A4_PDF, 6X4_A4_PDF, thermal
Dutiable MaterialNguyên liệu tính thuếTaxable goods
Duties paid byNgười trả thuế quanSender, Recipient, Carrier
Tracking NumberSố theo dõiDHL tracking code

Configure DHL Shipping Method

Detailed configuration steps:

Steps

  • 1. Go to Inventory → Configuration → Delivery → Shipping Methods

  • 2. Click New and fill: Shipping Method (name), Provider (DHL), Delivery Product

  • 3. DHL Configuration tab - Authentication: DHL API Key, DHL API Secret, DHL Account Number

  • 4. Configure region: Region (AP for Vietnam, AM for Americas, EU for Europe)

  • 5. Select DHL Product: D - Express Worldwide (most common)

  • 6. Configure package: DHLxw Package Type (DHL Box), Unit System (Metric for kg/cm)

  • 7. Configure labels: Label Image Format (PDF), Label Template (8X4_A4_PDF)

  • 8. Options: Dutiable Material (international goods), Duties paid by, Return label on delivery


Calculate Shipping Rates

Process for calculating rates from order:

Key points

  • Factors affecting rate: Total weight, sender/receiver address, DHL product type, customs declaration, insurance

  • Note: Products must have weight > 0, complete address (street, city, zip, country, phone)

Steps

  • 1. Create new order: Sales → Orders → New

  • 2. Add products to order

  • 3. Select delivery address (Delivery Address)

  • 4. Click Add Shipping

  • 5. Select DHL method

  • 6. Click Get Rate → system automatically calculates rate


Create DHL Shipment

Shipment creation process:

Key points

  • Info sent to DHL: Sender (warehouse), receiver (customer), package list, weight/dimensions, goods value, customs declaration

  • Result: Tracking number, shipping label PDF, customs documents (if applicable)

Steps

  • 1. Confirm order → creates delivery order (Delivery Order)

  • 2. Open delivery order

  • 3. Check: Complete delivery address, accurate weight, Carrier = DHL

  • 4. Click Validate to confirm shipment

  • 5. System automatically: Calls DHL API, creates tracking number, downloads label, attaches to chatter


Print Shipping Label

Steps to print label:

Steps

  • 1. Open validated delivery order

  • 2. Go to Chatter tab (below form)

  • 3. Find attachment: LabelShipping-DHL-[tracking_number].pdf

  • 4. Click file to view or download

  • 5. Print label on A4 paper or thermal printer

Label Formats

TemplateSizeUse For
8X4_A4_PDF8x4 inch on A4Laser/inkjet printer
8X4_thermal8x4 inchThermal printer
6X4_A4_PDF6x4 inch on A4Laser/inkjet printer
6X4_thermal6x4 inchThermal printer

Track Shipment

Tracking number and DHL tracking:

Key points

  • View tracking: Tracking Reference field on Delivery Order, Delivery tab of Sales Order

  • Track online: Click Tracking button or visit http://www.dhl.com/en/express/tracking.html?AWB=[tracking_number]

  • Status: Shipment information received, Picked up, In transit, Out for delivery, Delivered, Exception


Create Return Label

Two ways to create return labels:

Key points

  • Automatic: Enable Return label on delivery in configuration, label auto-created when validating delivery order

  • Manual: Create return picking from order, select DHL as carrier, validate return picking

  • Label file: LabelReturn-DHL-[tracking_number].pdf

  • Note: Return label has service code PV (Proof of Value), no automatic pickup, customer brings to DHL location


Cancel Shipment

Limitations and handling:

Key points

  • DHL REST API does not support complete shipment cancellation

  • When clicking Cancel: Tracking number removed from Odoo, carrier price reset to 0

  • How to handle: Contact DHL directly via hotline/portal, provide tracking number, request cancel pickup/void shipment

  • After DHL confirms, remove tracking number in Odoo


Practical Tips

Key points

  • Preparation: Check accurate weight, update package type dimensions, complete address, contact phone

  • Cost optimization: Choose correct DHL product (Express 12:00 cheaper than Express 9:00), pack compactly, appropriate package type, insurance only for high-value goods

  • International goods: Enable Dutiable Material, fill complete HS Code, choose appropriate Incoterm, check customs documents

  • Label management: Save template suitable for printer, test print before actual shipping, backup PDF files, thermal printer for high volume


Common Error Handling

Errors and Solutions

ErrorCauseSolution
DHL API key is missingAPI not configuredFill complete API Key, API Secret, Account Number
Address missing or wrongMissing address infoCheck Street, City, ZIP, Country, Phone
Weight is missingProduct has no weightUpdate Weight in Product → General Information
Total weight is 0.0Total weight = 0Check weight of each product or enter in package
Insurance not availableInsurance not supportedDisable shipping insurance or choose different DHL product
Planned date must be futureScheduled Date in pastChange Scheduled Date to future date
No price availableDHL does not support routeTry different DHL product or check address