Search by ID
You may have noticed that every destination comes with an id field. This is a
unique ID for every address. You can also search by this. You could, for example,
keep a list of favourite addresses.
Request
JSON
POST https://api.naurt.net/final-destination/v1
Content-Type: application/json
Authorization: <API_KEY_HERE>
{
"id": Option<String>,
"country": Option<Enum<Country>>
}
Parameters
| Parameter | Type | Optional | Default | Description |
|---|---|---|---|---|
| id | String (UUID) | Yes | None | The unique address ID for direct lookup. |
| country | String | Yes | None | Optional but strongly suggested two digit country code which helps with performance. |
Currently supported country tags are
- AE: UAE (Preview)
- AT: Austria
- AU: Australia
- BE: Belgium (BETA)
- BR: Brazil (BETA)
- CA: Canada
- CH: Switzerland (BETA)
- CZ: Czechia (BETA)
- DE: Germany
- DK: Denmark
- EG: Egypt (Preview)
- ES: Spain
- FI: Finland
- FR: France (Please note that Naurt currently only covers Metropolitan France)
- GB: United Kingdom
- UK: United Kingdom (alternative ISO Country code)
- GG: Guernsey (British Crown Dependency)
- HK: Hong Kong (Preview)
- IE: Ireland
- IM: Isle of Man (British Crown Dependency)
- IT: Italy
- JE: Jersey (British Crown Dependency)
- JP: Japan (Preview)
- KR: South Korea (Preview)
- LU: Luxemboug (BETA)
- NL: Netherlands
- NO: Norway
- NZ: New Zealand
- PL: Poland (BETA)
- PT: Portugal
- TW: Taiwan (Preview)
- US: United States
- SA: Saudi Arabia (Preview)
- SE: Sweden
- SG: Singapore
- SI: Slovenia (BETA)
Example
CURL
curl -XPOST \
-H "Content-type: application/json" \
-H "Authorization: <API_KEY_HERE>" \
-d '{"id":"ca7e417f-d959-5f73-6d53-d9172593422b", "country": "UK"}' \
'https://api.naurt.net/final-destination/v1'
Response
Success
A 200 response code indicates a successful response with the format as follows.
JSON
{
"best_match": Option<Object<HitData>>,
"version": Option<String>
}
The best_match in this case will be the matching ID.
The HitData is
JSON
{
"id": String,
"address": String,
"geojson": Object<GeoJSON>
}
Failure
A response code other than 200 indicates a failure to retrieve the requested
destination. See this page for more information
on errors.
In the case that no matching ID can be found, the response JSON will not contain any results, but instead a "naurt_info" message.
JSON
{"naurt_info":"Successful request. No destinations match search conditions."}
Example
{
"additional_matches": null,
"best_match": {
"address": "The Martha Gunn, 100 Upper Lewes Road, Brighton & Hove, United Kingdom, BN2 3FE",
"geojson": {...}, // omitted for brevity
"id": "c56dbebb-c7ab-ede2-a7ac-f84e57d1878d"
},
"version": "1.3.0"
}
Search Restrictions
Destinations requested via the API are subject to some restrictions.
- No more than 300 requests per minute can be sent to this endpoint per API key. This limit can be adjusted by speaking to our support team.
- Currently there is a maximum return of 5 destinations per request.
Full Examples
POST https://api.naurt.net/final-destination/v1
Content-Type: application/json
Authorization: <API_KEY_HERE>
{
"id": "c56dbebb-c7ab-ede2-a7ac-f84e57d1878d",
"country": "UK"
}