HaulTech.Public.CSP
1.0.13572
dotnet add package HaulTech.Public.CSP --version 1.0.13572
NuGet\Install-Package HaulTech.Public.CSP -Version 1.0.13572
<PackageReference Include="HaulTech.Public.CSP" Version="1.0.13572" />
<PackageVersion Include="HaulTech.Public.CSP" Version="1.0.13572" />
<PackageReference Include="HaulTech.Public.CSP" />
paket add HaulTech.Public.CSP --version 1.0.13572
#r "nuget: HaulTech.Public.CSP, 1.0.13572"
#:package HaulTech.Public.CSP@1.0.13572
#addin nuget:?package=HaulTech.Public.CSP&version=1.0.13572
#tool nuget:?package=HaulTech.Public.CSP&version=1.0.13572
HaulTech CSP
Welcome to HaulTech's Customer Service Portal (CSP) NuGet package. Use this package to integrate with a CSP instance, exposing the following capabilities:
- Resolve Accounts
- Resolve the Collection and Delivery Matrix
- Create Jobs
- Confirm Jobs
- Search for Jobs
All activity is derived from System.Net.Http.HttpClient to handle HTTP requests and responses.
The following HttpClient implementations are defined in this package:
| HttpClient | Purpose |
|---|---|
| AuthClient | Responsible for requesting a Bearer token |
| AccountClient | Responsible for resolving Accounts |
| ServiceClient | Responsible for resolveing the Collection and Delivery Matrix |
| JobClient | Responsible for the creation, confirming, and searching Jobs |
Pre-Requisites
In order to consume the HaulTech CSP package, an integrator needs three things from their CSP provider:
- Credentials - these are represented by a username and password
- API URL - this is the endpoint used to interact with CSP features
- Authorisation URL - this is the endpoint used to request OAuth tokens
Note: Each HaulTech customer who subscribes to the CSP solution has their own dedicated instance. As such, they are considered the CSP provider, not HaulTech.
Package Flow

Getting Started
- Install the NuGet package, for example:
Install-Package HaulTech.Public.CSP
dotnet add package HaulTech.Public.CSP
- Tip: Don't forget to add the using statement
using HaulTech.Public.CSP;
using HaulTech.Public.CSP.Models;
- Create a Customer Service Portal Client :
var cspClient = new CustomerServicePortalClient("username", "password", "baseUrl", "apiUrl");
- Finally, we can make our first CSP API call:
var accounts = await cspClient.GetAccountsAsync();
var matrices = await cspClient.GetServiceMatricesAsync();
var collectionServiceMatrix = matrices.First(x => x.Type == CSPGoodsMovementType.Collection);
var deliveryServiceMatrix = matrices.First(x => x.Type == CSPGoodsMovementType.Delivery);
var collectionDate = DateTime.UtcNow;
var job = new CspPortalJob()
{
AccountId = accounts.First().AccountId,
ServiceLevelId = collectionServiceMatrix.ServiceLevelId,
CollectionDateTime = collectionDate,
DeliveryDateTime = await cspClient.GetNextValidDeliveryDateForServiceMatrixAsync(collectionDate, deliveryServiceMatrix.ServiceLevelId),
CollectionStartTime = collectionServiceMatrix.StartTime,
CollectionEndTime = collectionServiceMatrix.EndTime,
DeliveryStartTime = deliveryServiceMatrix.StartTime,
DeliveryEndTime = deliveryServiceMatrix.EndTime,
CollectionAddress1 = "CSP NuGet Demo Collection",
DeliveryAddress1 = "CSP NuGet Demo Delivery",
Weight = 1,
DeliveryServiceLevelTimeId = deliveryServiceMatrix.ServiceTimeId,
CollectionServiceLevelTimeId = collectionServiceMatrix.ServiceTimeId
};
var pendingJobId = await cspClient.AddJobAsync(job);
var confirmedJobId = await cspClient.ConfirmJobAsync(pendingJobId);
var search = await cspClient.SearchForJobsAsync(new CspSearch()
{
JobNo = jobApprovedId
});
Contribute
This package is closed to contributors.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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 was computed. 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. |
| .NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- FluentValidation (>= 10.4.0)
- System.Net.Http (>= 4.3.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.