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
<PackageReference Include="Altinn.Register.Contracts" Version="1.6.0" />
<PackageVersion Include="Altinn.Register.Contracts" Version="1.6.0" />
<PackageReference Include="Altinn.Register.Contracts" />
paket add Altinn.Register.Contracts --version 1.6.0
#r "nuget: Altinn.Register.Contracts, 1.6.0"
#:package Altinn.Register.Contracts@1.6.0
#addin nuget:?package=Altinn.Register.Contracts&version=1.6.0
#tool nuget:?package=Altinn.Register.Contracts&version=1.6.0
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:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature. - Make your changes and add unit tests if applicable.
- Open a pull request describing your changes.
License
This project is licensed under the MIT License.
| 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 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. |
-
net9.0
- Altinn.Authorization.ModelUtils (>= 3.3.0)
- Altinn.Swashbuckle.Abstractions (>= 3.1.0)
- Altinn.Urn (>= 4.1.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Text.Json (>= 9.0.11)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
# 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))