HAALCENTRAAL BRP API
BRP API / Trying and Testing the API

Trying and Testing the API

You can try the API out and use it while developing and testing in our pilot environment. The API in this environment is reachable over the internet and requires neither DigiNetwerk nor a PKIoverheid certificate.

You can try out the functionality of the API, but the connection and authorizations may differ from production. The pilot environment is therefore intended as a first step in development.

Requesting access

The API in the pilot environment requires — as in production — that an OAuth token is sent along. For this you need client credentials. Request them by sending an email to [email protected]. State in that email which organization you want credentials for, and provide your contact details. We use these to inform you about important changes, planned maintenance and so on.

Trying the API out with Postman

We have prepared a Postman project so that you can get started quickly with the Personen API.

To make this work in the pilot environment, you must enter the following values under Variables in Postman:

The parameter name “tokerserviceurl” is spelled that way in the source.

How it works

To request a token in the pilot environment, send a request like this:

curl --location -–request POST 'https://probeerbrpapi.rvig.nl/realms/brp-api/protocol/openid-connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id={{client-id}}' \
--data-urlencode 'client_secret={{client-secret}}' \
--data-urlencode 'scope={{scope}}' \
--data-urlencode 'resourceServer=ResourceServer02'

Here you must replace everything between double braces with the credentials you have received.

You then receive an application/json message in reply that looks like this (but with a real access token instead of a row of Xs):

{
  "access_token": "XXXXXXX-XXX.XXX-XXX-XXXX-XXXX-XXXX.XXXXXXXX-XXXXXXXX-XXXXXXX-XXXXXX",
  "token_type": "bearer",
  "expires_in": 3599,
  "scope": "{{scope}}"
}

To send a request to the API in the pilot environment, send a request like this:

curl --location -–request POST 'https://probeerbrpapi.rvig.nl/api/brp/personen' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{Oauth token}} \
--data '{
  "fields": ["naam", "geboorte.datum", "geslacht", "adressering" ],
  "type": "RaadpleegMetBurgerservicenummer",
  "burgerservicenummer": ["999993483"]
}'

In it you enter the OAuth token (where {{Oauth token}} appears) with the value received from the token server in the access_token field.

Test persons

The test data in the pilot environment is in principle the same as the test data in the RvIG pilot environment. The test data in the pilot environment is not maintained, whereas the test data in the RvIG pilot environment does change regularly. For that reason the test data for some persons in the pilot environment can (and will) differ from the test set of the pilot environment.

Some examples you can use to try the API out: