ExoLink.TraceabilityHub.Client
1.0.0
dotnet add package ExoLink.TraceabilityHub.Client --version 1.0.0
NuGet\Install-Package ExoLink.TraceabilityHub.Client -Version 1.0.0
<PackageReference Include="ExoLink.TraceabilityHub.Client" Version="1.0.0" />
<PackageVersion Include="ExoLink.TraceabilityHub.Client" Version="1.0.0" />
<PackageReference Include="ExoLink.TraceabilityHub.Client" />
paket add ExoLink.TraceabilityHub.Client --version 1.0.0
#r "nuget: ExoLink.TraceabilityHub.Client, 1.0.0"
#:package ExoLink.TraceabilityHub.Client@1.0.0
#addin nuget:?package=ExoLink.TraceabilityHub.Client&version=1.0.0
#tool nuget:?package=ExoLink.TraceabilityHub.Client&version=1.0.0
ExoLink.TraceabilityHub.Client
Typed HTTP client for the ExoLink TraceabilityHub API — a platform that facilitates the exchange of lot traceability data between Traceability App Providers (TAPs).
For full ASP.NET Core integration (DI registration, OIDC authentication, and hub callback endpoints) see the ExoLink.TraceabilityHub.AspNetCore package.
Targets net9.0 and net10.0.
Installation
dotnet add package ExoLink.TraceabilityHub.Client
When using the ExoLink.TraceabilityHub.AspNetCore package, TraceabilityHubApiClient is registered and configured automatically — no manual setup is needed.
For standalone use, register the client manually and configure its base address and any authentication handler:
builder.Services.AddHttpClient<TraceabilityHubApiClient>(client =>
{
client.BaseAddress = new Uri("https://traceability-hub.exolink.app");
});
Working with articles
// List all articles supported by the hub.
List<Article> articles = await client.GetArticlesAsync();
// Get a specific article by its ID.
Article? article = await client.GetArticleAsync(articleId);
Creating lots
CreateLotRequest[] requests =
[
new CreateLotRequest
{
LotId = "MY-LOT-001",
Recipient = "RECIPIENT-CODE",
Expiration = DateTime.UtcNow.AddDays(30),
},
];
CreateLotResponse[] responses = await client.CreateLotsAsync(requests);
foreach (CreateLotResponse response in responses)
{
if (response.Status == CreateLotResult.Created)
{
Console.WriteLine($"Lot created. TraceabilityId: {response.NationalTraceabilityId}");
}
else
{
Console.WriteLine($"Failed to create lot '{response.LotId}': {response.Status}");
}
}
Fetching lots
// Fetch a specific lot from another TAP using its exchange ID.
FetchLotResponse lot = await client.FetchLotAsync(exchangeId);
if (lot.Result == FetchLotResult.Success)
{
foreach (LotPayload transaction in lot.Transactions!)
{
Console.WriteLine($"Article: {transaction.Article}, Quantity: {transaction.Quantity}");
}
// Notify the hub that the lot has been imported.
await client.NotifyLotImportedAsync(lot.ExchangeId!);
}
Retrieving assigned lots
// Get all lots assigned to the current client.
List<FetchLotResponse> assignedLots = await client.GetAssignedLotsAsync();
// Optionally filter by recipient code.
List<FetchLotResponse> filtered = await client.GetAssignedLotsAsync(recipient: "RECIPIENT-CODE");
Deleting a lot
bool deleted = await client.DeleteLotAsync("MY-LOT-001");
License
Copyright © 2026 ExoLink B.V. — MIT License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ExoLink.TraceabilityHub.Client:
| Package | Downloads |
|---|---|
|
ExoLink.TraceabilityHub.AspNetCore
ASP.NET Core integration for ExoLink TraceabilityHub. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 127 | 5/22/2026 |