Introduction

This API allows you to check whether there are any network disturbances for any address in the Netherlands.


API specification

Test the API on SwaggerHub


Base URL

https://api-prd.kpn.com/network/kpn/disturbance-check


Conceptual model

Conceptual model


API workflow

Sequence diagram


Getting started

Make sure you've read Getting Started for more info on how to register your application and start trying out our APIs.

Authentication

The API follows the KPN Store API Authentication Standard to secure the API. It includes the use of OAuth 2.0 client_id and client_secret to receive an access token.

Go to the Authentication tab on top of this page to find out how to:

  • Authenticate to an API using cURL.
  • Authenticate to an API on Swaggerhub.
  • Import Open API Specifications (OAS), also called Swagger files into Postman.


How to...

Check network disturbances for an address

SwaggerHub:

  1. Check disturbance GET /address.
  2. Click Try it out.
  3. Supply zip_code and house_number.
  4. Click Execute.
  5. Check the response code and message.

Postman:

  1. GET (CheckDisturbance).
  2. Supply zip_code and house_number.
  3. Click Send.
  4. Check the response code and message.

If it's a valid address, the result of the call will look like the following:

^^Response example^^

{
  "broadband": [],
  "fixed": [],
  "mobile": [],
  "generic": [
    {
      "id": 196,
      "affected_elements_count": 0,
      "affected_customers_count": 0,
      "communicated_customers_sms_count": 0,
      "communicated_customers_email_count": 0,
      "type": "generic",
      "cause": "disturbance",
      "source": "gui",
      "service": "I-TV",
      "state": "open",
      "start_date": "2017-10-03T15:42:51+02:00",
      "end_date": "2017-10-03T19:42:51+02:00",
      "region": null,
      "description": "Spamfilter does not work",
      "long_description": "<p>Problem with spam filter</p>",
      "info": null,
      "serviceguard_ticket_id": null,
      "created_at": "2017-10-03T15:43:25.217302+02:00",
      "communication_type": null,
      "sms_text": null,
      "user": null
    },
    {
      "id": 197,
      "affected_elements_count": 0,
      "affected_customers_count": 0,
      "communicated_customers_sms_count": 0,
      "communicated_customers_email_count": 0,
      "type": "generic",
      "cause": "disturbance",
      "source": "gui",
      "service": "Webmail",
      "state": "open",
      "start_date": "2017-10-03T15:44:11+02:00",
      "end_date": "2017-10-03T19:44:11+02:00",
      "region": null,
      "description": "Webmail login does not work",
      "long_description": null,
      "info": null,
      "serviceguard_ticket_id": null,
      "created_at": "2017-10-03T15:44:32.038553+02:00",
      "communication_type": null,
      "sms_text": null,
      "user": null
    },


Return codes

Code Description
200 Success.
201 Created.
202 Accepted.
302 Found. Link in location header.
400 Bad request.
401 Unauthorized.
403 Forbidden.
404 Not found.
405 Method not allowed.
412 Precondition failed.
429 Too many requests.
500 Internal server error.
502 Bad gateway.
503 Service unavailable.


HTTP response headers

The following tables display the standard response headers that are returned with each API response:

Standard response field name Description
sunset This field will be populated with the deprecation details. By default the value is n/a.
api-version Indicates the API version you have used.
quota-interval Used to specify an integer (for example, 1, 2, 5, 60, and so on) that will be paired with the quota-time-unit you specify (minute, hour, day, week, or month) to determine a time period during which the quota use is calculated.
For example, an interval of 24 with a quota-time-unit of hour means that the quota will be calculated over the course of 24 hours.
quota-limit Number of API calls an user can make within a given time period.
If this limit is exceeded, the user will be throttled and API requests will fail.
quota-reset-UTC All quota times are set to the Coordinated Universal Time (UTC) time zone.
quota-time-unit Used to specify the unit of time applicable to the quota.
For example, an interval of 24 with a quota-time-unit of hour means that the quota will be calculated over the course of 24 hours.
quota-used Number of API calls made within the quota.
strict-transport-security The HTTP Strict-Transport-Security (HSTS) response header lets a web site tell browsers that it should only be accessed using HTTPS, instead of using HTTP. All present and future subdomains will be HTTPS for a maximum of 1 year and access is blocked to pages or sub domains that can only be served over HTTP including HSTS preload lists of web browsers.
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload.
Access control field name Description
access-control-allow-credentials Tells browsers whether to expose the response to frontend JavaScript samp when the request's credentials mode (Request.credentials) is include.
When a request's credentials mode (Request.credentials) is include, browsers will only expose the response to frontend JavaScript samp if the Access-Control-Allow-Credentials value is true. Boolean.
access-control-allow-origin Indicates whether the response can be shared with requesting samp from the given origin.
access-control-allow-headers Used in response to a pre-flight request which includes the Access-Control-Request-Headers to indicate which HTTP headers can be used during the actual request.
access-control-max-age Indicates how long the results of a pre-flight request (that is the information contained in the Access-Control-Allow-Methods and Access-Control-Allow-Headers headers) can be cached.
access-control-allow-methods Indicates which HTTP methods are allowed on a particular endpoint for cross-origin requests.
For example: GET, PUT, POST, DELETE.
content-length The Content-Length entity header indicates the size of the entity-body, in bytes, sent to the recipient.
content-type The Content-Type entity header the client what the content type of the returned content actually is.

Mopinion feedback