January 25, 2019 – v. 1.0.3
There is a newer version of the documentation available here.
Please contact us in the case of questions.
Click here for product information and pricing (in Norwegian). You can also order or try our API for free.
One can easily query a single Norwegian telephone number in our number information database.
The information is updated daily with the data supplied by the Norwegian telephone companies and is therefore always up to date.
https://api.nrop.no/nrop/:telephonenumber
:telephonenumber -> Norwegian telephone number E164 formatted (eg. +4798765432, note that the + sign must be URL-encoded as %2B).
Each query must employ HTTP basic authentication using an API key and password. The API key and password will be supplied by Front when your account is registered. Use these in a standard HTTP basic Authorization header. For example, if one has received the API key “Aladdin” and password “OpenSesame”, the value for the Authorization header should be the base 64 encoding of “Aladdin:OpenSesame” or QWxhZGRpbjpPcGVuU2VzYW1l.
Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l
The response will be a JSON document with the number information:
{ "href":"/nrop/%2B4798765432", "created":"2016-12-12T04:39:12.000Z", "updated":"2017-05-26T08:52:36.000Z", "phone":"+4798765432", "firstName":"Kari", "middleName":"", "lastName":"Nordmann", "companyName":"", "address":"Storgata 10", "postalCode":"0001", "city":"OSLO", "country":"NO", "phoneBook":true, "manualQuery":true, "electronicQuery":true }
If the number is registered as hidden from number information the response will not include any personal information:
{ "href":"/nrop/%2B4798765432", "created":"2016-12-12T04:39:12.000Z", "updated":"2017-05-26T08:52:36.000Z", "phone":"+4798765432", "firstName":"", "middleName":"", "lastName":"", "companyName":"", "address":"", "postalCode":"", "city":"", "country":"", "phoneBook":false, "manualQuery":false, "electronicQuery":false }
These fields have the following meaning:
phoneBook: Can publish in a phone book (paper version)
manualQuery: Can access information for a manual query (telephone)
electronicQuery: Can access information for an electronic query (API/SMS)
Note: Some telephone companies remove the number from number information when the customer registers to hide their information. In this case the response will be the same as if the number is not in use.
If a number is not found, the server will respond with HTTP status 404 and a JSON document with an error message is returned:
{ "code": "NotFoundError", "message": "Phone number not found" }
Code | HTTP Status | Description |
---|---|---|
InvalidCredentialsError | 401 | Invalid API key and/or password |
AccountDisabledError | 401 | Account disabled due to missing payment or misuse |
InvalidArgumentError | 409 | Invalid telephone number |
NotFoundError | 404 | Telephone number not found or hidden |
TooManyRequestsError | 429 | Quota for the number of queries in the period exceeded |
RequestThrottledError | 429 | Too many queries in a short period |
InternalError | 500 | Unexpected error occurred on the server |