Universal.AustralianBusinessRegister
1.5.0
dotnet add package Universal.AustralianBusinessRegister --version 1.5.0
NuGet\Install-Package Universal.AustralianBusinessRegister -Version 1.5.0
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="Universal.AustralianBusinessRegister" Version="1.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Universal.AustralianBusinessRegister" Version="1.5.0" />
<PackageReference Include="Universal.AustralianBusinessRegister" />
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 Universal.AustralianBusinessRegister --version 1.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Universal.AustralianBusinessRegister, 1.5.0"
#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 Universal.AustralianBusinessRegister@1.5.0
#: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=Universal.AustralianBusinessRegister&version=1.5.0
#tool nuget:?package=Universal.AustralianBusinessRegister&version=1.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Universal.AustralianBusinessRegister
A .NET client library for interacting with the Australian Business Register (ABR) web services to search for Australian Business Numbers (ABN) and Australian Company Numbers (ACN).
Getting Started
Search by ABN
using Universal.AustralianBusinessRegister;
// Using default authentication GUID
using (var client = new AustralianBusinessRegisterClient())
{
var results = await client.SearchABNAsync("50616294781");
Console.WriteLine($"ABN: {results.Response.BusinessEntity.ABN.IdentifierValue}");
Console.WriteLine($"Name: {results.Response.BusinessEntity.MainNames[0].OrganisationName}");
}
// Using custom authentication GUID
using (var client = new AustralianBusinessRegisterClient("your-auth-guid-here"))
{
var results = await client.SearchABNAsync("50616294781");
// Process results...
}
Search by ACN
using (var client = new AustralianBusinessRegisterClient())
{
var results = await client.SearchACNAsync("010249966");
Console.WriteLine($"ACN: {results.Response.BusinessEntity.ASICNumber}");
Console.WriteLine($"Name: {results.Response.BusinessEntity.MainNames[0].OrganisationName}");
}
Search by Name
using (var client = new AustralianBusinessRegisterClient())
{
// Basic name search
var results = await client.SearchNameAsync("Commonwealth Bank");
// Advanced name search with options
var options = new NameSearchOptions
{
Postcode = "2000",
LegalName = true,
TradingName = true,
BusinessName = true,
ActiveABNsOnly = true,
NewSouthWales = true,
SearchWidth = NameSearchOptions.SearchWidths.Typical,
MinimumScore = 50,
MaximumSearchResults = 100
};
var results = await client.SearchNameAsync("Commonwealth Bank", options);
foreach (var entity in results.Response.BusinessEntity)
{
Console.WriteLine($"ABN: {entity.ABN.IdentifierValue}");
Console.WriteLine($"Name: {entity.MainNames[0].OrganisationName}");
}
}
Include Historical Details
// Include historical details (default: true)
var results = await client.SearchABNAsync("50616294781", includeHistoricalDetails: true);
// Exclude historical details
var results = await client.SearchABNAsync("50616294781", includeHistoricalDetails: false);
Working with ABN Bulk Extracts
Download Bulk Extract ZIP Archives
using (var client = new AustralianBusinessRegisterClient())
{
// Download as streams
await foreach (Stream zipStream in client.DownloadABNBulkExtractsAsync())
{
// Process each ZIP archive stream
}
// Save ZIP archives to disk
await client.SaveABNBulkExtractsAsync("C:\\ABN\\Downloads");
}
Download and Extract Individual Files
using (var client = new AustralianBusinessRegisterClient())
{
// Download and extract files as streams
await foreach (Stream fileStream in client.DownloadABNBulkExtractFilesAsync())
{
// Process each extracted XML file stream
}
// Save extracted files to disk
await client.SaveABNBulkExtractFilesAsync("C:\\ABN\\Extracts");
}
Parse Bulk Extract Files
using (var client = new AustralianBusinessRegisterClient())
{
// Parse a ZIP archive
using (FileStream zipStream = File.OpenRead("abn-bulk-extract.zip"))
{
foreach (Transfer transfer in client.ParseABNBulkExtractArchive(zipStream))
{
// Process transfer data
foreach (var abn in transfer.ABR)
{
Console.WriteLine($"ABN: {abn.ABN}");
}
}
}
// Parse an individual XML file
using (FileStream xmlStream = File.OpenRead("abn-extract.xml"))
{
Transfer transfer = client.ParseABNBulkExtractFile(xmlStream);
// Process transfer data
}
}
Exception Handling
using Universal.Common.Net.Http;
try
{
var results = await client.SearchABNAsync("50616294781");
}
catch (HttpException<ABRPayloadSearchResults.ExceptionSection> ex)
{
Console.WriteLine($"Error: {ex.Content.ExceptionDescription}");
}
| 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.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- Universal.Ckan.Client (>= 2.0.0)
- Universal.Common.Net.Http (>= 5.1.1)
- Universal.Common.Serialization (>= 2.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Updated to the latest dependencies and added a Markdown readme file.