Validate Multi Postcode

Endpoint for validating many postcodes in one request.

Endpoint URL

POST https://app-api.geposit.se/v2.0/validate/multi/postcode/{COUNTRY_CODE}

{COUNTRY_CODE} is se, no, dk, fi or ax. Authentication and response status are described in Valid Intro. Full reference: Validate Multi Postcode.

Each postcode is checked the same way as with Validate Postcode.

Request body

A JSON object with a queries array, one object per postcode:

{
  "queries": [
    { "postcode": "11121" },
    { "postcode": "1112" }
  ]
}

Send it with Content-Type: application/json. The administrative and coordinate options are not available for this endpoint.

A body that is not this shape (for example a bare array) is answered with HTTP 400 and an error text.

Response

KeyTypeDescription
versionStringAPI version
response_timeFloatProcessing time in seconds
resultArrayOne result per query, in the same order

Each result has the same fields as a Validate Postcode response: query, interpretation, is_valid, status, and match or suggestions.

Example

curl https://app-api.geposit.se/v2.0/validate/multi/postcode/se \
  -H "x-api-key: {API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"queries":[{"postcode":"11121"},{"postcode":"1112"}]}'
{
  "version": "2.0",
  "response_time": 0.0085,
  "result": [
    {
      "query": { "postcode": "11121", "locality": "" },
      "interpretation": { "postcode": "11121" },
      "is_valid": true,
      "status": 302,
      "match": [
        { "address_type": "NB", "postcode": "11121", "locality": "Stockholm" }
      ]
    },
    {
      "query": { "postcode": "1112", "locality": "" },
      "interpretation": { "postcode": "1112" },
      "is_valid": false,
      "status": 300,
      "suggestions": [
        { "address_type": "NB", "postcode": "11120", "locality": "Stockholm", "errors": [302] },
        { "address_type": "NB", "postcode": "11121", "locality": "Stockholm", "errors": [302] }
      ]
    }
  ]
}

(Shortened: the second result lists all postcodes that start with 1112.)


Did this page help you?