Skip to content

Autocomplete

/v3/address/autocomplete

Target audience: Developers

Release version: 4.7.5

Autocomplete

Introduction

This endpoint takes a zip-code and the beginning of a street address and returns a array of possible street adresses based on the Finnish Posti address file.

URI

Environment URI
Stage https://payway-api.stage.adeprimo.se/external/api/v3/address/autocomplete
Production https://backend.worldoftulo.com/external/api/v3/address/autocomplete

Requirements

Identity Scope
No /external/address/r

Parameters

Field Required Type Description
street Required String The beginning of a street address, if less than 3 characters no results will be returned
zip_code Optional String The zip-code where the street is located, Required if no_street_number is false, otherwise not acquired.
no_street_number Optional Boolean Default set to false, a list of Streets with street numbers for the specific zip code is presented.
If set to true a list of streets, city and zip codes are presented.
language_code Optional String Language code for displaying the city name, Supported language codes are "SV" and "FI". Will default to the organisations language code if not supplied.

Curl Example

curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v3/address/autocomplete \
  --header 'accept: application/json' \
  --header 'authorization: Bearer token' \
  --header 'content-type: application/json' \
  --data '{
            "zip_code": "65100",
            "street": "Strand"
          }'

Example Response

"items": {
  ["Strandgatan 2, 65100 Vasa", "Strandgatan 4, 65100 Vasa", "..."]
}   

A successful response item will contain an array of possible street addresses including zip-code and city. Note that supplying a street value that is less than 3 characters will return no results, only a empty array.

Curl Example 2

curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v3/address/autocomplete \
  --header 'accept: application/json' \
  --header 'authorization: Bearer token' \
  --header 'content-type: application/json' \
  --data '{
            "street": "Strandg",
            "no_street_number": true,
            "language_code": "SV"
          }'

Example Response 2

"items": {
  ["Strandgatan, 64100 KRISTINESTAD", "Strandgatan, 65100 VASA", "..."]
}   

A successful response item will contain an array of possible street addresses including zip-code and city. Note that supplying a street value that is less than 3 characters will return no results, only a empty array.

Errors

This API uses the common error conventions of the Payway API

See common error responses