Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

DI offers a service to compliment and validate official and non official addresses in Nordic countries - making it easier and more efficient for the end-user and distribution to deliver products.
More information and examples can be found on the address helper webside → https://www.di.no/addresshelper/

...

Make sure you have the following information at hand before proceeding.

example

Comment

apiKey

wnfewnee(hw-ahoce

The key is provided when signing up for the service at DI Address Helper

customerSystem

STORE

Optional, used to receive possible distribution dates - this value is obtained from your contact person

product

PAKK

Optional, used to receive possible distribution dates - this value is obtained from your contact person

Info
Most clients can use our supplied frontend, you

You only need this if you want to create your own frontend-implementation.

See also SDK-documentation (Swagger)

Environments / Endpoints

TEST

Code Block
https://staging-ws.di.no/ws/json/addressHelper/v-2

PRODUCTION

Code Block
https://ws.di.no/ws/json/addressHelper/v-2

Authentication

For this API the combination of referer and apiKey is used as authentication.
The apiKey provided when signing up for the service at DI Address Helper. The e-mail registered when signing up is responsible for approving domains used as referer.

...

Note
  • Remember to URI Encode. All requests MUST be in UTF-8 (not ISO-8859-1). Scandinavian characters must be encoded, e.g. æ → %c3%a6. Otherwise there will be no results when searching for a street name with these characters.

  • Beware that every request MUST contain a "referer"-header. The refererer must be a full URL (with schema), and the API-account will get an approval email each time a new domain is used.

Request Headers

Key

Value example

Comment

referer

https://www.di.no

The value should specify the address/URI of the webpage that linked to the resource being requested. Mandatory.

NOTE: Must include schema (http/https)

Request body

Take a look at the examples to see how the requests and responses may look.

...

Step 1 - Get Street Collections

Status
colourBlue
titleGET

Code Block
/{countryCode}/streetSearch/{streetName}

Returns a list of the streets that matches the streetName and countryCode. Note: street names may be filtered by city. Separate street name and city by a comma, i.e. "streetName,city"

...

Step 2 - Get Street Numbers for Collection

Status
colourBlue
titleGET

Code Block
/{countryCode}/streetNumberSearch/{streetIds}

Returns the street numbers that are related to the streetIds provided in the request (ids are comma-delimited). The query parameter, streetNumber, can be used to filter the street numbers.

Expand
titleDetails

Request

Query Parameters

Parameter

Type

Example

Description

apiKey

string

myapikey

Please contact us if you don't know your API key.

streetNumber

whole number

10

Filter results by street number

limitToOfficial

boolean

true

If you want to limit the results to official Norwegian addresses (will eliminate duplicates). Default is false

limit

int

100

If you want to override the number of records to return. Default is 30, and max is 300.

Response

Status
colourGreen
titleSTATUS 200
 - application/JSON

Code Block
languagejs
{
    "streetNumbers": [
		{
            "streetNo": Integer,
            "addressId": Integer,
            "entrance": String,						// Present if a building has several entrances, where the value is the entrance name
            "houseType": String, 					// See the following examples 
            "deliveryPointId": Integer,
            "postalCode": String,
            "duplicateNumberAndEntrance": Boolean,  // Some streets have several entrances on the same street number. When duplicateNumberAndAddress is true, the houseType should be used to separate them
            "latitude": Number, 
            "longitude": Number,
			"showHouseholds": Boolean 			    // True if households exists on houseType block
        },
		...
	]
}

House types:

(E)nebolig     - detached house
(R)ekkehus   - row house
(B)lokk          - apartment building 
(F)orretning  - business
(H)ytte          - holiday house
(A)nnet         - other

Example address with duplicateNumberAndEntrance: Akersgata 45 (houseType B and F)


Step 3 - Get Floors

Status
colourBlue
titleGET

Code Block
/{countryCode}/address/{deliveryPointId}/floors

Returns the floors available at a deliveryPointId

...

Step 4 - Get Households on Floor

Status
colourBlue
titleGET

Code Block
/{countryCode}/address/{deliveryPointId}/floor/{floorType}-{floorNo}/households

Returns the households on a given address and floor number.

...

Note
  • This functionality is deprecated and not maintained

  • You may experience deviation in results from this service and other coverage and address check services

Status
colourBlue
titleGET

Code Block
/{countryCode}/address/{deliveryPointId}/distributionSupport/{customerSystem}-{productName}

Used to determine the distribution support for a given delivery point.

...

Step 6 - Distribution Dates

Note
  • This functionality is deprecated and not maintained

  • You may experience deviation in results from this service and other coverage and address check services

Status
colourBlue
titleGET

Code Block
/{countryCode}/distributionDates/{customerSystem}-{productName}/{fromDate}/{toDate}

Gives a list of available distribution dates, independent of address. Note: if the date and delivery address (deliveryPointId) is determined, the distribution support should be used to confirm the date. 

...

Expand
titleDistributions Response
Code Block
languagebash
{
    "product": "PROD",
    "distributions": [
        "2017-12-14",
        "2017-12-15",
        "2017-12-16",
        "2017-12-17",
        "2017-12-18",
        "2017-12-19",
        "2017-12-20",
        "2017-12-21",
        "2017-12-22",
        "2017-12-23"
    ]
}


Error response

errorKey

Solution

Unknown/blocked domain for given API-key. Get a key at https://www.di.no/addresshelper/

Approve domain from link sent to email registered for API Key