Reserved Testdata API
The Reserved Testdata API (RT API) makes it possible for consumers to create static test persons in the Person API's test environment. Using the API, a consumer can reserve identification numbers (fødsels- eller d-nummer), and create and update person documents for these reserved persons. When a person is created or updated in the RT API, the updated person document will shortly after be available in the Person API.
The RT API is secured with HelseID in the same way as the Person API, and uses information in the token (organization number) to associate a reserved test person with a specific owner. Only the owner of a test person will be able to submit updates with the RT API.
The API "fakes" input from the National Population Register ("Folkeregisteret/FREG") to the Person API, so the data model for the RT API corresponds to the FREG data model.
Send feedback and questions to utvikling-persontjenesten@nhn.no
Synthetic identification numbers
Test persons have synthetic identification numbers (NINs) to avoid colliding with identification numbers for real people in the National Population Register (FREG). The consumer reserves NINs through the ReservedNin API endpoints. When doing so, the RT API generates a NIN using the following rules:
- National identity number (fødselsnummer)
- +65 is added to the birth month
- D-number:
- +65 is added to the birth month
- +4 is added to the first digit of the birth date
OpenAPI specification
Versioning
This API uses URL-versioning, with major versions containing breaking changes getting a new URL. An example route would look like this: api/v2/{endpoint}
Not specifying a version in the url like this api/{endpoint}
defaults to v1 for backwards-compatability reasons.
Minor versions, which are non-breaking changes, do not get a new url. To see changes in minor versions, look at the API-changelog
To learn more about Major-Minor-versioning in general, have a look at this page
Changelog
See Changelog
Authentication and authorization
V1 - Bearer Token
This API uses HelseID for authentication and authorization. To use the API you will need to have a valid HelseID token with the
scope nhn:persontjenesten-reservert-testdata/tilgang
.
Access to the Reserved Testdata API can be requested in the HelseID self service portal.
V2 - DPoP Token
This API uses HelseID for authentication and authorization. To use the API you will need to have a valid HelseID DPoP token with the
scope nhn:persontjenesten-reservert-testdata/tilgang-dpop
.
Access to the Reserved Testdata API can be requested in the HelseID self service portal.
For more documentation on the use of DPoP-tokens, see the Documentation from HelseID