Getting started

Welcome to the developer documentation for the FoRe-service.

Testing the API

Our API is available in two environments; test and production. The test instance will not contain any sensitive data and you or your system should never send sensitive data to it.

Test environment

The test environment is available on Helsenettet at https://api.test.fore.nhn.no.
And the regular Internet at https://api-internett.test.fore.nhn.no

Production environment

The production environment is available at https://api.fore.nhn.no.

This environment is only available from Helsenettet and not on the regular Internet.

HelseID / OAuth

Before you can start testing and using our API you need to register as a client of our service with HelseID using their self-service registration. They have their own documentation on how to proceed.

  • For a Machine-to-Machine approach utilize the ClientCredentials flow. Register your client with the followng details:

    • API-Access: Formål og reservasjon
    • Audience: nhn:fore
    • Scope: nhn:fore/api (Currently default in selvbetjening)

    Example project for Machine-to-Machine approach

    Note: Use this method only if token exchange is not posible.

This API requires DPoP and does not support standard bearer tokens. For more information, please refer to the HelseID DPoP documentation helseId DPoP documentation

API Specification and Documentation

The inner details on our API is documented using OpenAPI specification. The details are available in our user interface representation of the specification here.

Manipulate patient privacy access restriction-data

Examples on how to call the different endpoints to manipulate patient privacy access restrictions.

Add requisition

Endpoint: HTTP POST /api/requisitions

{
    "servReqId": "39912c6c-4fdf-493f-8050-fe12926b5032",
    "servProvId": "REQ-143",
    "purpose": "HHJ",
    "reservation": "R"
}

Get requisitions by servReqId / servProvId

Endpoint: HTTP GET /api/requisitions

Query string parameters:

  • servReqId
  • servProvId

Get requisitions by id

Endpoint: HTTP GET /api/requisitions/

Replace with a valid id as returned by add requsition endpoint.