PrimeAML.ClientManagement.Client
1.0.1
dotnet add package PrimeAML.ClientManagement.Client --version 1.0.1
NuGet\Install-Package PrimeAML.ClientManagement.Client -Version 1.0.1
<PackageReference Include="PrimeAML.ClientManagement.Client" Version="1.0.1" />
<PackageVersion Include="PrimeAML.ClientManagement.Client" Version="1.0.1" />
<PackageReference Include="PrimeAML.ClientManagement.Client" />
paket add PrimeAML.ClientManagement.Client --version 1.0.1
#r "nuget: PrimeAML.ClientManagement.Client, 1.0.1"
#:package PrimeAML.ClientManagement.Client@1.0.1
#addin nuget:?package=PrimeAML.ClientManagement.Client&version=1.0.1
#tool nuget:?package=PrimeAML.ClientManagement.Client&version=1.0.1
PrimeAML.ClientManagement.Client - PrimeAML
Official .NET client library for the PrimeAML Client Management API.
Built for compliance-focused institutions, this package provides a fully typed, authenticated HTTP client covering the complete Client Management surface: onboarding, KYC/KYB, document workflows, risk evaluations, screening, and more.
Requirements
- .NET 9.0 or 10.0
- Credentials issued by PrimeAML (Client ID + Secret)
- Auth server: Any OIDC-compliant server (OAuth 2.0 Client Credentials flow, token endpoint discovered automatically)
Access is restricted to approved PrimeAML clients. Contact info@primeaml.com or visit https://www.primeaml.com to request credentials.
Installation
dotnet add package PrimeAML.ClientManagement.Client
All required types (Client, SearchClientsRequest, FileAttachment, enums, etc.)
are bundled inside the package — no additional dependencies required.
Quick Start
1 — Configuration (appsettings.json)
{
"ClientManagementClient": {
"BaseUrl": "https://api.your-primeaml-instance.com",
"TimeoutSeconds": 30,
"Authentication": {
"Authority": "https://auth.your-primeaml-instance.com/realms/AMS/",
"ClientId": "your-client-id",
"ClientSecret": "your-client-secret",
"Scopes": [ "client_management_api" ],
"ExpiryBufferSeconds": 30
}
}
}
2 — Register the client (ASP.NET Core / Generic Host)
builder.Services.AddClientManagementClient(options =>
builder.Configuration
.GetSection(ClientManagementClientOptions.SectionName)
.Bind(options));
3 — Inject and call
public class OnboardingService(IClientManagementClient api)
{
public async Task DemoAsync(CancellationToken ct)
{
// Search
var page = await api.SearchClientsAsync(
new SearchClientsRequest { PageNumber = 1, PageSize = 20 }, ct);
// Fetch detail
var detail = await api.GetClientAsync(page.Result[0].Id, ct);
// Upload a document (document type is specified by stable reference, not by internal id)
var fileBytes = await File.ReadAllBytesAsync("passport.pdf", ct).ConfigureAwait(false);
await api.CreateClientDocumentAsync(
detail.Id,
new CreateClientDocumentRequest
{
DocumentTypeReference = "PASSPORT",
Files =
[
new FileAttachment
{
FileName = "passport.pdf",
FileType = "application/pdf",
FileSize = fileBytes.Length,
FileData = fileBytes
}
]
},
ct).ConfigureAwait(false);
}
}
Client accounts and tax residency
Use IClientManagementClient for bank accounts and tax residency:
SaveClientAccountAsync, SearchClientAccountsAsync, DeleteClientAccountAsync,
SaveClientTaxResidencyAsync, SearchClientTaxResidenciesAsync,
DeleteClientTaxResidencyAsync, and MakeClientTaxResidencyPrimaryAsync.
Payloads and responses use stable codes (for example PaymentInstitutionCode, CountryCode) as defined in PrimeAML.ClientManagement.Contracts.
Token Management
OAuth 2.0 token acquisition and caching are fully transparent. A SemaphoreSlim
guard prevents thundering-herd re-fetches and tokens are refreshed automatically
before expiry (controlled by Authentication:ExpiryBufferSeconds).
The token endpoint is discovered automatically at startup via the OIDC
.well-known/openid-configuration document published by the authority in
Authentication:Authority. If the authority is unreachable at startup the
application fails fast with a clear error rather than failing on the first API call.
Error Handling
All API failures surface as ClientManagementException (inherits ExternalApiException):
try
{
var c = await _api.GetClientAsync(id, ct);
}
catch (ClientManagementException ex)
{
// ex.StatusCode — HTTP status code
// ex.Errors — validation / business error messages
logger.LogError("API error {Status}: {Errors}", ex.StatusCode,
string.Join(", ", ex.Errors));
}
About PrimeAML
PrimeAML is a next-generation AML compliance platform helping financial institutions meet regulatory obligations efficiently and accurately.
- Website: https://www.primeaml.com
- Support / onboarding: info@primeaml.com
License
This package is distributed under a commercial license and is intended
exclusively for approved PrimeAML clients. See LICENSE.txt in the package for full license terms.
© Prime CorTech Ltd. All rights reserved.
| 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
- IdentityModel (>= 7.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.5)
- Microsoft.Extensions.Http (>= 10.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
-
net9.0
- IdentityModel (>= 7.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.5)
- Microsoft.Extensions.Http (>= 10.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Major release: packages and namespaces rebranded from AMS.* to PrimeAML.*. Install PrimeAML.ClientManagement.Client 1.x and update using statements. Previous AMS.ClientManagement.* package ids are deprecated.