CVR API REST API

Getting started

CVR API is build on the REST principles which means to GET objects, you need to make a GET-request. Furthermore the API will produce a meaningful HTTP response code whether an object was found or not.

This API is only for paying customers.



API endpoint

CVR API only operate with one endpoint:

https://rest.cvrapi.dk/



Authentication

As previously mentioned it is not a requirement to authenticate to use the API, but you may be subject to throttling. To circumvent throttling you can authenticate via HTTP basic. curl --user 'token:' https://rest.cvrapi.dk


If you for some reason should provide an invalid token the response will be: HTTP/1.1 401 Not Authorized



Response format

All responses will be delivered in JSON. You can request the API to return XML. format=xml


The following headers will be available. Content-Type: application/json
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, PUT, DELETE


The API will return an HTTP response code you can act on. 200 OK
201 Created
400 Bad Request
401 Unauthorized
404 Not Found
5xx Server Error



Errormessages

When you are using the API, it would be a good idea to always check for erorr messages. You can check, if the response object contains the attribute 'error'.


QUOTA_EXCEEDED
Your IP-address or IP-range is being denied access for a limitied timeperiod - typically until the next day. Stop making lookups. You have 50 free lookups per day. Please reach out, if you are in need of more lookups.

BANNED
Your IP-address or IP-range has been banned. Stop making lookups.

INTERNAL_ERROR
An error has occurred. Please reach out.



Examples


Retrieve company

You can retrieve a company object via a simple HTTP GET:

curl https://rest.cvrapi.dk/v1/dk/company/10150817


Example response:



Retrieve subsidiary

You can retrieve a subsidiary object via a simple HTTP GET:

curl https://rest.cvrapi.dk/v1/dk/subsidiary/1003407806


Example response:



Retrieve participant

You can retrieve a participant object via a simple HTTP GET:

curl https://rest.cvrapi.dk/v1/dk/participant/4004213460


Example response:



Suggest companies

You can retrieve a list of suggestions for company objects via a simple HTTP GET:

curl https://rest.cvrapi.dk/v1/dk/suggestions/company/erhvervsstyrelsen


Example response:



Suggest subsidiaries

You can retrieve a list of suggestions for subsidiary objects via a simple HTTP GET:

curl https://rest.cvrapi.dk/v1/dk/suggestions/subsidiary/erhvervsstyrelsen


Example response:



Suggest participants

You can retrieve a list of suggestions for participant objects via a simple HTTP GET:

curl https://rest.cvrapi.dk/v1/dk/suggestions/participant/DEN%20DANSKE%20STAT


Example response:



Get last changed companies

You will be supplied with a list of recently changed companies, from the timestamp you enter. The timestamp can not exceed 7 days in the past - also applies to the time. You get the information via a simple HTTP GET: curl https://rest.cvrapi.dk/v1/dk/changed/company/2016-06-09T11:31:00


Example response: