All NHVR APIs use the REST API (Representational state transfer) an API that uses HTTP requests for communication with web services.

To use the REST API through Python, you will need to connect a library to send HTTP requests. The requests library is the de facto standard for making HTTP requests in Python. To install run the following command.

pip install requests

All API calls require the endpoint URL and a set of headers. Some API calls will also require parameters (GET or DELETE requests) or data (POST or PUT requests.

Login API calls should include the following headers:






All calls are made using JSON data structures


Your subscription key for the NHVR Portal API

The subscription key uniquely identifies you to the NHVR Portal API

The login endpoint uses the POST method and because the subscription key automatically populates your email and password the data body should contain an empty object.

import requests

url = ""

headers = {
'Content-Type': 'application/json',
'Ocp-Apim-Subscription-Key': 'xxxxxxxxxxxxxxxxxxxxxxx',

data = '{}'

response =, headers = headers, data = data)


Did this answer your question?