Payway address service

Target Audience: Users, Stakeholders, Developers

Introduction

This document describes how you can integrate with the Payway Address Service.
The integration is primarily intended towards a Finnish and Swedish market but can also be leveraged by others.
Some features are entirely targeted to a Finnish audience, while others to a Swedish.

Requirements

  • Credentials provided by Adeprimo
  • HTTPS

Endpoints

Ssn lookup

Looks up information based on a specific ssn. Information is based on the national registry.

Attention

Only works with Swedish ssn's.

Request

1
2
3
curl --request GET \
  --url 'https://payway-address-service-stage.azurewebsites.net/ssnlookup?ssn=YYYYMMDD1234' \
  --header 'authorization: Basic <credentials>' \

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{
  "status": "OK",
  "message": null,
  "result": {
    "firstName": "Kalle",
    "lastName": "Anka",
    "streetName": null,
    "streetNumber": null,
    "city": "Ankeborg",
    "zipCode": "12345",
    "country": "SE",
    "streetAddress": "Paradisäppelvägen 111",
    "standardAddressString": "Paradisäppelvägen 111, 12345 Ankeborg, SE"
  }
}

Address auto-complete

Search for street addresses. Used for auto-completion in the PPF.
Information is based on https://www.posti.fi/fi/asiakastuki/postinumerotiedostot and updated once a week.

Attention

Only works with Finnish street names. Parameters however can be defined in Swedish or Finnish.

Request

1
2
3
curl --request GET \
  --url 'https://payway-address-service-stage.azurewebsites.net/addressautocomplete?zipCode=65100&query=Strandgatan' \
  --header 'authorization: Basic <credentials>' \  

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
  "status": "OK",
  "message": null,
  "result": [
    "Strandgatan",
    "Strandgatan 10",
    "Strandgatan 11",
    "Strandgatan 12",
    "Strandgatan 13",
    "Strandgatan 14",
    "Strandgatan 15",
    "Strandgatan 16",
    "Strandgatan 17",
    "Strandgatan 18",
    "Strandgatan 19",
    "Strandgatan 2",
    "Strandgatan 20",
    "Strandgatan 21",
    "Strandgatan 22",
    "Strandgatan 23",
    "Strandgatan 24",
    "Strandgatan 25",
    "Strandgatan 26",
    "Strandgatan 27",
    "Strandgatan 28",
    "Strandgatan 29",
    "Strandgatan 3",
    "Strandgatan 30",
    "Strandgatan 4",
    "Strandgatan 5",
    "Strandgatan 6",
    "Strandgatan 7",
    "Strandgatan 8",
    "Strandgatan 9"
  ]
}

Location lookup

Lookup information for a specific zip code.

Attention

Only works with Finnish zip codes.

Request

1
2
3
curl --request GET \
  --url 'https://payway-address-service-stage.azurewebsites.net/locationlookup?zipCode=65100&languageCode=fi' \
  --header 'authorization: Basic <credentials>' \  

Response

1
2
3
4
5
6
7
8
9
{
  "status": "OK",
  "message": null,
  "result": {
    "zipCode": "65100",
    "city": "VAASA",
    "country": "FI"
  }
}

Parse address

Parse an address to be compliant with the Payway address format.

Request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
curl --request POST \
  --url https://payway-address-service-stage.azurewebsites.net/parse \
  --header 'authorization: Basic <credentials>' \
  --header 'content-type: application/json' \  
  --data '{
    "FirstName" : "firstname",
    "LastName" : "lastname",
    "StreetAddress" : "Streetname 97a A52",
    "City" : "vaasa",
    "ZipCode" : "00 100",
    "Country" : "fi",
    "Dropbox": "PL 123"
}'

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
{
  "status": "OK",
  "message": null,
  "result": {
    "firstName": "Firstname",
    "lastName": "Lastname",
    "street": "Streetname",
    "building": "97a",
    "staircase": "A",
    "apartmentNumber": "52",
    "zipCode": "00100",
    "city": "Vaasa",
    "countryCode": "FI",
    "dropBox": "PL 123",
    "isValid": true
  }
}

Errors

All errors returned conform to the same format.

Format

1
2
3
4
5
{
  "status": "FAILED",
  "message": "Internal server error",
  "result": null
}