GO! Express & Logistics Shipping (Realtime Order & Label) API client for Parcel.NET.
$ dotnet add package Parcel.NET.GoExpress.Shipping
GO! Express Shipping client for Parcel.NET — create and cancel shipments and generate labels.
dotnet add package Parcel.NET.GoExpress.Shipping
builder.Services.AddGoExpress(options =>
{
options.Username = "your-username";
options.Password = "your-password";
options.CustomerId = "1234567";
options.ResponsibleStation = "FRA";
})
.AddGoExpressShipping();
var client = serviceProvider.GetRequiredService<IGoExpressShippingClient>();
// Create a shipment
var response = await client.CreateShipmentAsync(request);
Console.WriteLine($"HWB: {response.ShipmentNumber}");
// Generate a label
var label = await client.GenerateLabelAsync(response.ShipmentNumber, GoExpressLabelFormat.PdfA4);
// Cancel a shipment
await client.CancelShipmentAsync(response.ShipmentNumber);
IGoExpressShippingClient extends IShipmentService, so you can also resolve it via the carrier-agnostic interface.