Alternate Identification Number API
The Alternate Identification Number API is used to reserve and update national alternate identification numbers (AINs), also known as common national helper numbers in the Norwegian health sector.
The purpose of the AIN API is to support secure, traceable and standardized handling of common national helper numbers when a physical person cannot be identified with a Norwegian identification number (NIN: national identity number or D-number), or when it is unknown whether the person has one. An AIN must only be used when it is necessary to perform tasks that the health and care services or the health and care administration are required to perform by law or regulation.
Typical examples are tourists, foreign workers and emergency preparedness situations where the person cannot be identified with a NIN at the time the health sector needs to identify the person.
Consumers can reserve AINs and update the supported personal information registered on them. AINs and related data are available for lookup and search in the Person API.
Send feedback and questions to utvikling-persontjenesten@nhn.no
Purpose and permitted use
Use the AIN API only when all of the following apply:
- The person cannot be identified with a NIN, or it is unknown whether the person has one.
- The AIN is needed to solve a task in the health and care services or the health and care administration.
- The task is required by law or regulation.
AINs may be used for emergency preparedness when the same conditions apply.
AINs must not be used for:
- Anonymization or pseudonymization.
- Creating an alias for a known NIN.
- Creating a duplicate identifier for a person who is already safely identified.
- Testing in production.
- Modelling family relations or other administrative relationships outside the purpose of the API.
- Fetal sample handling, research or other special-purpose workflows that require different validation rules, unless the use has been legally assessed and explicitly included in the agreement with NHN.
The number series is limited. Consumers must avoid unnecessary reservations and must not test AIN creation in production. NHN may follow up usage, and access can be removed if the API is used outside the documented purpose or the consumer's agreement.
Information registered on an AIN
The following information can be registered together with an AIN:
- Name
- Gender
- Date of birth
- Present address
Register only the information that is necessary to identify the person for the relevant health sector task. AIN is a shared national identifier, not a consumer-owned record. Any authorized consumer with write access can update supported information on an existing AIN, and updates are visible through the Person API.
The API does not currently support person status, AIN status, country information, family relations or a link between an AIN and a NIN. If a person is already identified with a NIN, use that identifier instead of creating or updating an AIN as an alias.
Address information
Address information registered through the AIN API is exposed as PresentAddress in the Person API. The address model
follows the Person API and National Population Register present-address structure where applicable.
Address validation currently works as follows:
- Postal code is validated as 4 digits.
- Street address is not validated against an official street address register.
- City name is returned as part of the address data when available, but consumers should not rely on a separate city-name validation rule unless it is documented in the OpenAPI specification.
- Country information is not supported.
Alternate identification number specification
The alternate identification number series has the OID (Object Identifier) 2.16.578.1.12.4.1.4.3.
AINs consist of two parts. The first part is a nine-digit number from the configured range for the environment. Digits 10 and 11 are control digits, calculated the same way as for Norwegian identification numbers. The number carries no additional information, such as date of birth or gender, and must only be used for identification.
For an overview of OID number series used in the health sector, see: OID identifier series for health and care services
Alternate identification numbers in the Person API
Reserved AINs are available for lookup and search in the Person API. Existing legacy AINs from the former PREG number
series are also still available for lookup and search in the Person API. The get-by-nin endpoint can be used directly with an AIN to
look up the information registered on the number. Search endpoints include AIN results only when the relevant
IncludeAINs or IncludeAINResults parameter is used.
In the Person API, the AIN itself is represented in NorwegianIdentificationNumber with
identificationNumberType set to AlternateIdentificationNumber. Only the following Person API information parts should
be expected for a person registered with an AIN:
NorwegianIdentificationNumberBirthGenderNamePresentAddress
JSON example: AIN person in Person API
{
"id": "ed608abe-bfe6-4a16-a062-bb3553f0ad4e",
"sequenceNumber": 12408795,
"falseIdentity": null,
"norwegianIdentificationNumber": [
{
"status": "InUse",
"identificationNumber": "80500066532",
"identificationNumberType": "AlternateIdentificationNumber",
"registeredAt": null,
"isValid": true,
"source": null,
"reason": null,
"validFrom": null,
"validTo": null
}
],
"identityVerification": [],
"residuaryEstateContactInformation": [],
"identificationDocument": [],
"status": [],
"immigrationAuthoritiesIdentificationNumber": [],
"foreignPersonIdentificationNumber": [],
"sharedResidence": [],
"gender": [
{
"gender": "Female",
"registeredAt": null,
"isValid": true,
"source": null,
"reason": null,
"validFrom": null,
"validTo": null
}
],
"birth": [
{
"birthDate": "1992-11-25T00:00:00Z",
"birthYear": null,
"birthPlace": null,
"birthMunicipalityNumber": null,
"birthMunicipalityName": null,
"birthCountyNumber": null,
"birthCountyName": null,
"birthCountry": null,
"registeredAt": null,
"isValid": true,
"source": null,
"reason": null,
"validFrom": null,
"validTo": null
}
],
"birthInNorway": [],
"familyRelation": [],
"maritalStatus": [],
"death": null,
"name": [
{
"givenName": "Uendelig",
"middleName": "Lyspære",
"familyName": "Trombone",
"shortName": null,
"originalName": null,
"registeredAt": null,
"isValid": true,
"source": null,
"reason": null,
"validFrom": null,
"validTo": null
}
],
"addressProtection": [],
"residentialAddress": [],
"presentAddress": [
{
"foreignAddress": null,
"isAddressUnknown": null,
"streetAddress": {
"separatelyOccupiedUnitNumber": null,
"separatelyOccupiedUnitType": null,
"addressName": "Klovne Bilens veg 76 B",
"addressNumber": null,
"addressCode": null,
"addressAdditionalName": null,
"city": {
"cityName": null,
"postalCode": "7053"
},
"coAddressName": null,
"municipalityNumber": "5001",
"municipalityName": "Trondheim - Tråante",
"countyNumber": "50",
"countyName": "Trøndelag - Trööndelage"
},
"coordinate": {
"epsgCode": 25833,
"north": 7273600,
"east": 454000
},
"cadastralAddress": null,
"cadastralIdentifier": null,
"addressConfidentiality": "Unclassified",
"presentAddressDate": null,
"stayElsewhere": null,
"urbanDistrictCode": null,
"urbanDistrictName": null,
"geographicalUrbanDistrictCode": null,
"geographicalUrbanDistrictName": null,
"basicStatisticalUnit": null,
"fullBasicStatisticalUnitNumber": null,
"basicStatisticalUnitName": null,
"registeredAt": null,
"isValid": true,
"source": null,
"reason": null,
"validFrom": null,
"validTo": null
}
],
"immigrationToNorway": [],
"emigrationFromNorway": [],
"useOfSamiLanguage": [],
"samiParliamentElectoralRegistryStatus": [],
"postalAddress": [],
"foreignPostalAddress": [],
"parentalResponsibility": [],
"citizenship": [],
"citizenshipRetention": [],
"residencePermit": [],
"stayOnSvalbard": [],
"guardianshipOrFuturePowerOfAttorney": [],
"legalAuthority": [],
"commonContactRegisterInformation": null
}
Number ranges in use
The range of available numbers for reservation is pre-generated in each environment. The production number series is limited, so production numbers must only be reserved for real production use.
New AIN reservations use the following ranges:
| Environment | Number range (first nine digits) |
|---|---|
| Test | 720.000.000 - 799.999.999 |
| Production | 805.000.000 - 999.999.999 |
Legacy AINs from the former PREG number series still exist in the API. These numbers use the following ranges in the AIN API:
| Environment | Legacy number range (first nine digits) |
|---|---|
| Test | 800.000.000 - 803.999.999 |
| Production | 800.000.000 - 803.999.999 |
Validation errors
Some legacy alternate identification numbers from the former PREG number series may not validate correctly with the current control-digit validation rules. These numbers cannot be changed. Contact NHN if you are uncertain whether an existing number is valid for use.
OpenAPI specification
See Alternate Identification Number API
Versioning
See Versioning
Authentication and authorization
This API uses HelseID for authentication and authorization. To use
the API, you need a valid HelseID token with a valid scope. The available scope for the Alternate Identification Number
API is nhn:persontjenesten-felles-hjelpenummer/tilgang-dpop.
The API is available to consumers of the Persontjenesten Person API with a valid service offer and agreement.