TAAPAC.Client 0.1.1

dotnet add package TAAPAC.Client --version 0.1.1
                    
NuGet\Install-Package TAAPAC.Client -Version 0.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TAAPAC.Client" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TAAPAC.Client" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="TAAPAC.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TAAPAC.Client --version 0.1.1
                    
#r "nuget: TAAPAC.Client, 0.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TAAPAC.Client@0.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TAAPAC.Client&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=TAAPAC.Client&version=0.1.1
                    
Install as a Cake Tool

TAAPAC.Client

Customer-focused .NET SDK for TecAlliance APAC automotive data APIs. The SDK provides stable workflows for catalogue reference data, vehicle and article search, VIN lookup, assembly groups, and Product Groups without requiring customers to build Pegasus request envelopes themselves.

Requirements

  • .NET 10 or later
  • A valid API credential for each TecAlliance service you use

Install

dotnet add package TAAPAC.Client

The package contains the client, contracts, and dependency-injection extensions. No additional TAAPAC package is required.

Quick start

Register the SDK in Program.cs:

using Microsoft.Extensions.DependencyInjection;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddTecAllianceApacClient(options =>
{
    options.Pegasus.ApiKey = builder.Configuration["TecAlliance:Pegasus:ApiKey"];
    options.Pegasus.ProviderId = 0; // Optional when the API key resolves the provider
    options.Pegasus.CountryCode = "TH";
    options.Pegasus.LanguageCode = "en";
});

Store credentials in user secrets, environment variables, or a secret manager. Never commit an API key to source control.

Inject ITecAllianceClient into your application service:

using TecAlliance.Apac.Client.Abstractions;

public sealed class CatalogueService(ITecAllianceClient client)
{
    public async Task<string?> GetCatalogueVersionAsync(
        CancellationToken cancellationToken)
    {
        var result = await client.GetCatalogueVersionAsync(cancellationToken);

        return result.IsSuccess
            ? result.Value.SupplierDataVersion
            : null;
    }
}

Handle results and errors

Every workflow returns ApiResult<T>. Check IsSuccess before reading Value or Error:

var result = await client.GetBrandsAsync(cancellationToken);

if (!result.IsSuccess)
{
    logger.LogWarning(
        "TecAlliance request failed: {Code} {Message} ({StatusCode})",
        result.Error.Code,
        result.Error.Message,
        result.Error.StatusCode);

    return;
}

foreach (var brand in result.Value)
{
    Console.WriteLine($"{brand.DataSupplierId}: {brand.Name}");
}

Common error codes include invalid_request, invalid_pagination, authentication_failed, provider_timeout, provider_unavailable, too_many_matches, transport_error, and invalid_json. A caller-requested cancellation is propagated as OperationCanceledException.

Product Groups filtered by vehicle type

TecAlliance Generic Articles are exposed as Product Groups. The SDK fetches the master list and returns it pre-filtered for each physical vehicle type. Customers do not need a separate database or their own mapping configuration.

using TecAlliance.Apac.Client.Contracts.ProductGroups;

var result = await client.GetProductGroupsAsync(cancellationToken);

if (result.IsSuccess)
{
    var motorcycleGroups = result.Value.Motorcycles.ProductGroups;
    var passengerCarGroups = result.Value.PassengerCars.ProductGroups;
    var lcvGroups = result.Value.LightCommercialVehicles.ProductGroups;
    var commercialVehicleGroups = result.Value.CommercialVehicles.ProductGroups;
    var tractorGroups = result.Value.Tractors.ProductGroups;

    var engineGroups = result.Value.ByType[ProductGroupType.Engine].ProductGroups;

    Console.WriteLine($"Rules: {result.Value.RuleSetVersion}");
    Console.WriteLine($"Motorcycle groups: {motorcycleGroups.Count}");
}

The motorcycle bucket excludes non-motorcycle groups such as Air Conditioning. A Product Group may appear in more than one valid vehicle-type bucket. Unknown assembly groups are excluded rather than guessed; use ExcludedProductGroupCount to monitor them.

Supported Product Group types are:

  • Passenger Car
  • Motorcycle
  • Light Commercial Vehicle
  • Commercial Vehicle
  • Tractor
  • Engine
  • Axle
  • Commercial Vehicle Body
  • Heavy Machinery Vehicle
  • Vehicle Model Series

Search vehicles and articles

Search for a linkage target, then pass the selected target directly into the article search:

using TecAlliance.Apac.Client.Contracts.Catalogue;

var vehicleResult = await client.SearchVehiclesAsync(
    new VehicleSearchQuery(
        Query: "Honda CB500",
        Type: LinkageTargetType.Motorcycle,
        Page: 1,
        PerPage: 20),
    cancellationToken);

if (vehicleResult.IsSuccess && vehicleResult.Value.Vehicles.Count > 0)
{
    var target = vehicleResult.Value.Vehicles[0].Target;

    var articleResult = await client.SearchArticlesAsync(
        new ArticleSearchQuery(
            Query: "brake pad",
            Target: target,
            GenericArticleIds: [402],
            Page: 1,
            PerPage: 20,
            IncludeImages: true,
            IncludeCriteria: true),
        cancellationToken);

    if (articleResult.IsSuccess)
    {
        foreach (var article in articleResult.Value.Articles)
        {
            Console.WriteLine($"{article.ManufacturerName} {article.ArticleNumber}");
        }
    }
}

Page must be greater than zero. PerPage must be between 1 and 100.

Resolve a VIN

var result = await client.ResolveVehicleAsync(
    "WVWZZZ1JZXW000001",
    cancellationToken);

if (result.IsSuccess)
{
    Console.WriteLine($"Matches: {result.Value.TotalMatches}");
    Console.WriteLine($"Ambiguous: {result.Value.IsAmbiguous}");

    foreach (var vehicle in result.Value.Vehicles)
    {
        Console.WriteLine($"{vehicle.Id}: {vehicle.Name}");
    }
}

A VIN must contain exactly 17 letters or digits and cannot contain I, O, or Q. The SDK normalizes valid VIN input before sending it to the provider.

Get OE articles from a VIN

using TecAlliance.Apac.Client.Contracts.Catalogue;

var result = await client.GetOeArticlesByVinAsync(
    new OeArticleSearchQuery(
        Vin: "WVWZZZ1JZXW000001",
        GenericArticleIds: null,
        Page: 1,
        PerPage: 20,
        IncludeAftermarketMatches: true),
    cancellationToken);

if (result.IsSuccess)
{
    foreach (var article in result.Value.Articles)
    {
        Console.WriteLine(
            $"{article.ManufacturerName} {article.ArticleNumber} " +
            $"({article.AftermarketMatchCount} aftermarket matches)");
    }
}

Browse assembly groups

Browse the root assembly tree:

using TecAlliance.Apac.Client.Contracts.Catalogue;

var rootResult = await client.BrowseAssemblyGroupsAsync(
    new AssemblyGroupQuery(),
    cancellationToken);

Browse children linked to a selected vehicle:

var selectedTarget = new LinkageTargetReference(
    Id: 123456,
    Type: LinkageTargetType.PassengerCar);

var result = await client.BrowseAssemblyGroupsAsync(
    new AssemblyGroupQuery(
        Target: selectedTarget,
        ParentNodeId: 100019,
        LinkedOnly: true),
    cancellationToken);

if (result.IsSuccess)
{
    foreach (var node in result.Value)
    {
        Console.WriteLine($"{node.Id}: {node.Name} (children: {node.HasChildren})");
    }
}

Reference data

var version = await client.GetCatalogueVersionAsync(cancellationToken);
var languages = await client.GetLanguagesAsync(cancellationToken);
var countries = await client.GetCountriesAsync(cancellationToken);
var brands = await client.GetBrandsAsync(cancellationToken);

Use the catalogue version to invalidate cached catalogue data when the upstream supplier or reference-data version changes.

Available customer workflows

Method Purpose
GetCatalogueVersionAsync Get live supplier/reference-data versions
GetLanguagesAsync Get supported catalogue languages
GetCountriesAsync Get supported catalogue countries
GetBrandsAsync Get brands and data suppliers
SearchVehiclesAsync Search vehicles and linkage targets
SearchArticlesAsync Search aftermarket articles
GetOeArticlesByVinAsync Find OE articles from a VIN
BrowseAssemblyGroupsAsync Browse root or vehicle-linked assembly groups
GetProductGroupsAsync Get Product Groups already filtered by vehicle type
ResolveVehicleAsync Resolve a VIN into stable vehicle matches

Configuration

Pegasus uses the official endpoint and the X-API-Key header by default:

Option Default Notes
Pegasus.BaseAddress Official Pegasus 3.0 endpoint Must be an absolute HTTP(S) URL ending in /
Pegasus.ApiKey None Store outside source control
Pegasus.ProviderId 0 Optional when the API key resolves the provider
Pegasus.CountryCode TH Article/linkage country sent to supported operations
Pegasus.LanguageCode en Response language sent to supported operations
Pegasus.Timeout 30 seconds Must be greater than zero and finite
Pegasus.DefaultHeaders Empty Extra headers applied to every Pegasus request

Configure VIN Db only when your application uses it:

using TecAlliance.Apac.Client.Contracts.Configuration;

builder.Services.AddTecAllianceApacClient(options =>
{
    options.Pegasus.ApiKey = builder.Configuration["TecAlliance:Pegasus:ApiKey"];

    options.VinDb.BaseAddress = new Uri("https://your-vindb-endpoint.example/api/");
    options.VinDb.Authentication.Type = ApiAuthenticationType.ApiKeyHeader;
    options.VinDb.Authentication.HeaderName = "X-Api-Key";
    options.VinDb.Authentication.Credential =
        builder.Configuration["TecAlliance:VinDb:ApiKey"];
});

Supported authentication modes are None, BearerToken, ApiKeyHeader, and Basic. Either provider can be omitted when it is not used.

Advanced Pegasus compatibility

Normal applications should use ITecAllianceClient. If a published Pegasus operation does not yet have a customer workflow, inject IPegasusOperationsClient and execute its PegasusOperation explicitly. The result preserves the complete JSON payload so the application can deserialize it into its own DTO.

using TecAlliance.Apac.Client.Abstractions;
using TecAlliance.Apac.Client.Contracts.Pegasus.Operations;

public sealed class AdvancedCatalogueService(IPegasusOperationsClient operations)
{
    public async Task<string?> GetRawVersionAsync(CancellationToken cancellationToken)
    {
        var result = await operations.ExecuteAsync(
            PegasusOperation.GetVersion,
            cancellationToken: cancellationToken);

        return result.IsSuccess ? result.Value.Payload.GetRawText() : null;
    }
}

Use the advanced client only for operations you explicitly intend to call, especially provider administration or mutation operations.

License

This package is proprietary and licensed for authorized use in unmodified binary form. Modification, derivative works, repackaging, redistribution, sublicensing, and transfer are prohibited. Access to TecAlliance APIs and data is governed by separate agreements and terms of service. See LICENSE.md in the package.

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.1 134 7/14/2026
0.1.0 125 7/14/2026