<p align="center">
<img src="https://raw.githubusercontent.com/emuuu/Parcel.NET/main/parcelNET-logo.svg" alt="Parcel.NET" width="128" />
</p>
Parcel.NET.Dhl
Core DHL package for Parcel.NET — provides DhlOptions configuration, OAuth token management, and the fluent DhlBuilder used to register individual DHL service clients.

Installation
dotnet add package Parcel.NET.Dhl
Usage
builder.Services.AddDhl(options =>
{
options.ApiKey = "your-api-key";
options.ApiSecret = "your-api-secret";
options.Username = "your-username";
options.Password = "your-password";
options.UseSandbox = true;
})
.AddDhlShipping() // requires Parcel.NET.Dhl.Shipping
.AddDhlTracking() // requires Parcel.NET.Dhl.Tracking
.AddDhlUnifiedTracking()
.AddDhlPickup()
.AddDhlReturns()
.AddDhlInternetmarke()
.AddDhlLocationFinder();
AddDhl() returns a DhlBuilder that the individual service packages chain onto. Authentication (OAuth ROPC or API-key header) is handled automatically per service.
Configuration
| Property | Required | Description |
|---|
ApiKey | Yes | DHL API key (also used as OAuth client_id) |
ApiSecret | For Shipping/Pickup/Returns/Internetmarke | OAuth client_secret |
Username / Password | For Shipping/Pickup/Returns | ROPC credentials |
TrackingUsername / TrackingPassword | For Tracking (XML) |