Altinn.Register.Contracts 1.6.0

dotnet add package Altinn.Register.Contracts --version 1.6.0
                    
NuGet\Install-Package Altinn.Register.Contracts -Version 1.6.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="Altinn.Register.Contracts" Version="1.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Altinn.Register.Contracts" Version="1.6.0" />
                    
Directory.Packages.props
<PackageReference Include="Altinn.Register.Contracts" />
                    
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 Altinn.Register.Contracts --version 1.6.0
                    
#r "nuget: Altinn.Register.Contracts, 1.6.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 Altinn.Register.Contracts@1.6.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=Altinn.Register.Contracts&version=1.6.0
                    
Install as a Cake Addin
#tool nuget:?package=Altinn.Register.Contracts&version=1.6.0
                    
Install as a Cake Tool

Altinn.Register.Contracts

Altinn.Register.Contracts is a .NET class library that contains strongly-typed models used to serialize and deserialize data exchanged with the Altinn Register APIs. These models are intended to provide a stable and reusable contract layer for services integrating with Altinn's register endpoints.

Table of Contents

Overview

Altinn provides various APIs to retrieve information about organizations, persons, party relationships, and other entities. Altinn.Register.Contracts defines POCOs (Plain Old CLR Objects) to map these JSON responses, allowing easier integration and testing of your client code.

This project does not contain any business logic or HTTP client code. It only contains data models.

Features

  • Clean, documented C# models for use with JSON (de)serialization.
  • Compatible with System.Text.Json.
  • Follows Altinn's current API schemas.

Installation

You can install this library via NuGet:

dotnet add package Altinn.Register.Contracts

Or via the Package Manager Console:

Install-Package Altinn.Register.Contracts

Usage

Here's a basic example of how you might use this package with an HTTP client:

using System.Net.Http;
using System.Text.Json;
using Altinn.Register.Contracts;

using var client = new HttpClient();
client.BaseAddress = new Uri("BASE_ADDRESS");
using var req = new HttpRequestMessage(HttpMethod.Get, $"register/api/v2/parties/666f1fd3-ca28-467c-9cc1-807b51b7586f");
using var response = await client.SendAsync(req);
response.EnsureSuccessStatusCode();

var party = response.Content.ReadFromJsonAsync<Party>(JsonSerializerOptions.Web);

Console.WriteLine($"Organization: {party.DisplayName}");

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/your-feature.
  3. Make your changes and add unit tests if applicable.
  4. Open a pull request describing your changes.

License

This project is licensed under the MIT License.

Product 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 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. 
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
1.6.0 850 1/27/2026
1.5.0 304 1/20/2026
1.4.1 3,577 11/12/2025
1.4.0 3,456 11/5/2025
1.3.0 1,593 10/15/2025
1.2.0 244 10/8/2025
1.1.1 457 10/2/2025
1.1.0 311 9/22/2025
1.0.1 643 7/8/2025

# Changelog

## [1.6.0](https://github.com/Altinn/altinn-register/compare/Altinn.Register.Contracts-v1.5.0...Altinn.Register.Contracts-v1.6.0) (2026-01-27)


### Features

* add email to self-identified users ([#670](https://github.com/Altinn/altinn-register/issues/670)) ([e86a109](https://github.com/Altinn/altinn-register/commit/e86a109bc10f2a76284882a3885a72dc9764b777))
* add external-urn to party contracts ([#665](https://github.com/Altinn/altinn-register/issues/665)) ([e16b58b](https://github.com/Altinn/altinn-register/commit/e16b58b34e9b11113035c343c6d3432a25a0b007))


### Bug Fixes

* make json-converters public ([#676](https://github.com/Altinn/altinn-register/issues/676)) ([a2db0b3](https://github.com/Altinn/altinn-register/commit/a2db0b3603d8cf7eb24994ae8a59d50758f8d2d7))

## [1.5.0](https://github.com/Altinn/altinn-register/compare/Altinn.Register.Contracts-v1.4.1...Altinn.Register.Contracts-v1.5.0) (2026-01-16)


### Features

* add `ExternalRoleMetadata` to contracts ([#643](https://github.com/Altinn/altinn-register/issues/643)) ([afe351a](https://github.com/Altinn/altinn-register/commit/afe351ab4ade0a6f2061e970db5042d36cfea782))
* add external role definitions metadata api ([#645](https://github.com/Altinn/altinn-register/issues/645)) ([0c3fcfd](https://github.com/Altinn/altinn-register/commit/0c3fcfd9617d1c408f081952ef90198334a5f4b5))
* add IOwnedParty for parties with owners ([#649](https://github.com/Altinn/altinn-register/issues/649)) ([5414176](https://github.com/Altinn/altinn-register/commit/541417630f653250101978f7d96c839436d304e8))
* add self-identified user type ([#650](https://github.com/Altinn/altinn-register/issues/650)) ([caa5e53](https://github.com/Altinn/altinn-register/commit/caa5e532e766bc481f3b228150141ae2987bd338))

## [1.4.1](https://github.com/Altinn/altinn-register/compare/Altinn.Register.Contracts-v1.4.0...Altinn.Register.Contracts-v1.4.1) (2025-11-12)


### Bug Fixes

* support `urn:altinn:username` ([#610](https://github.com/Altinn/altinn-register/issues/610)) ([66707a5](https://github.com/Altinn/altinn-register/commit/66707a53ab87840acebbb8b658600fdd8bdcd8d5))

## [1.4.0](https://github.com/Altinn/altinn-register/compare/Altinn.Register.Contracts-v1.3.0...Altinn.Register.Contracts-v1.4.0) (2025-11-04)


### Features

* add username to `PartyUrn` ([#606](https://github.com/Altinn/altinn-register/issues/606)) ([295f16d](https://github.com/Altinn/altinn-register/commit/295f16d4a83a1d35a9363d3f89462665dc56d22f))

## [1.3.0](https://github.com/Altinn/altinn-register/compare/Altinn.Register.Contracts-v1.2.0...Altinn.Register.Contracts-v1.3.0) (2025-10-15)


### Features

* add deleted-at to party ([#593](https://github.com/Altinn/altinn-register/issues/593)) ([2d40332](https://github.com/Altinn/altinn-register/commit/2d403324f950a6df1166a974a8ea625ec02965ed))

## [1.2.0](https://github.com/Altinn/altinn-register/compare/Altinn.Register.Contracts-v1.1.1...Altinn.Register.Contracts-v1.2.0) (2025-10-03)


### Features

* add system-user type ([#586](https://github.com/Altinn/altinn-register/issues/586)) ([b036a4d](https://github.com/Altinn/altinn-register/commit/b036a4ddfda87269a990aef412c0b461493008b4))

## [1.1.1](https://github.com/Altinn/altinn-register/compare/Altinn.Register.Contracts-v1.1.0...Altinn.Register.Contracts-v1.1.1) (2025-10-02)


### Bug Fixes

* change PartyType to unsigned ([#583](https://github.com/Altinn/altinn-register/issues/583)) ([6e13977](https://github.com/Altinn/altinn-register/commit/6e13977208b14a2765ced410d4cf61b0ff94b70c))

## [1.1.0](https://github.com/Altinn/altinn-register/compare/Altinn.Register.Contracts-v1.0.1...Altinn.Register.Contracts-v1.1.0) (2025-09-22)


### Features

* add external role models ([#570](https://github.com/Altinn/altinn-register/issues/570)) ([65b4dad](https://github.com/Altinn/altinn-register/commit/65b4dadc659795ba47825743444d7cc1eede6bcc))
* add owner to contracts ([#547](https://github.com/Altinn/altinn-register/issues/547)) ([6b096f1](https://github.com/Altinn/altinn-register/commit/6b096f1e90638a7ec1f955be713a5ec4118b7d54))

## [1.0.1](https://github.com/Altinn/altinn-register/compare/Altinn.Register.Contracts-v1.0.0...Altinn.Register.Contracts-v1.0.1) (2025-07-08)


### Documentation

* update readme ([#507](https://github.com/Altinn/altinn-register/issues/507)) ([e1de383](https://github.com/Altinn/altinn-register/commit/e1de3834eeb65f6e548db8ae95325fb8b823411d))

## 1.0.0 (2025-07-08)


### Features

* new party model ([#499](https://github.com/Altinn/altinn-register/issues/499)) ([5ac32d9](https://github.com/Altinn/altinn-register/commit/5ac32d9948f9c8298ea1fd94dfc5345f8f48fbbd))