Skip to content

Lookup location

/v3/address/lookup_location

Target audience: Developers

Release version: 4.7.5

Lookup location

Introduction

This endpoint takes a zip-code and a language code. The Posti address register is used to return the city name for the zip-code as well as the country code.

URI

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

Requirements

Identity Scope
No /external/address/r

Parameters

Field Required Type Description
zip_code Required String The zip-code to fetch city name for.
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/lookup_location \
  --header 'accept: application/json' \
  --header 'authorization: Bearer token' \
  --header 'content-type: application/json' \
  --data '{
            "zip_code": "65100",
            "language_code": "FI"
          }'

Example Response

{
  "item": {
    "zip_code": "65100",
    "city": "Vaasa",
    "country_code": "FI"
  }
}   

A successful response item will contain the city name, zip-code and the country code. The city name is returned in the language specified by the supplied language code. Supported language codes are "SV" and "FI".

Errors

This API uses the common error conventions of the Payway API

See common error responses