SDK
import { createVoyantDataClient } from "@voyant-travel/data-sdk";
const data = createVoyantDataClient({ apiKey: process.env.VOYANT_API_KEY });
const result = await data.geo.places.resolve({
"items": [
{
"label": "<string>",
"providerCode": "<string>",
"countryHint": "<string>",
"typeHint": "region",
"previousPlaceId": "<string>"
}
]
});curl --request POST \
--url https://api.voyant.travel/data/geo/v1/places/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"items": [
{
"label": "<string>",
"providerCode": "<string>",
"countryHint": "<string>",
"typeHint": "region",
"previousPlaceId": "<string>"
}
]
}'const response = await fetch("https://api.voyant.travel/data/geo/v1/places/resolve", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <token>"
},
body: JSON.stringify({
"items": [
{
"label": "<string>",
"providerCode": "<string>",
"countryHint": "<string>",
"typeHint": "region",
"previousPlaceId": "<string>"
}
]
}),
});
const data = await response.json();import requests
response = requests.post(
"https://api.voyant.travel/data/geo/v1/places/resolve",
headers={
"Authorization": "Bearer <token>"
},
json={
"items": [
{
"label": "<string>",
"providerCode": "<string>",
"countryHint": "<string>",
"typeHint": "region",
"previousPlaceId": "<string>"
}
]
}
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.voyant.travel/data/geo/v1/places/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'label' => '<string>',
'providerCode' => '<string>',
'countryHint' => '<string>',
'previousPlaceId' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.voyant.travel/data/geo/v1/places/resolve"
payload := strings.NewReader("{\n \"items\": [\n {\n \"label\": \"<string>\",\n \"providerCode\": \"<string>\",\n \"countryHint\": \"<string>\",\n \"previousPlaceId\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.voyant.travel/data/geo/v1/places/resolve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"label\": \"<string>\",\n \"providerCode\": \"<string>\",\n \"countryHint\": \"<string>\",\n \"previousPlaceId\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voyant.travel/data/geo/v1/places/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"label\": \"<string>\",\n \"providerCode\": \"<string>\",\n \"countryHint\": \"<string>\",\n \"previousPlaceId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"place": {
"id": "<string>",
"type": "region",
"unlocode": "<string>",
"countryIso2": "<string>",
"parentId": "<string>",
"coordinates": {
"lat": 123,
"lng": 123
},
"name": "<string>",
"nameLang": "<string>",
"names": {},
"aliases": [
"<string>"
],
"attributes": {}
},
"confidence": 123,
"method": "code",
"atSea": true
}
]
}{
"code": "NOT_FOUND",
"message": "<string>"
}{
"code": "NOT_FOUND",
"message": "<string>"
}{
"code": "NOT_FOUND",
"message": "<string>"
}Geo
Resolve provider labels to canonical places
Resolve a batch of provider labels/codes to canonical places (code/exact/alias/fuzzy/ai matching). Requires scope data:geo:read.
POST
/
data
/
geo
/
v1
/
places
/
resolve
SDK
import { createVoyantDataClient } from "@voyant-travel/data-sdk";
const data = createVoyantDataClient({ apiKey: process.env.VOYANT_API_KEY });
const result = await data.geo.places.resolve({
"items": [
{
"label": "<string>",
"providerCode": "<string>",
"countryHint": "<string>",
"typeHint": "region",
"previousPlaceId": "<string>"
}
]
});curl --request POST \
--url https://api.voyant.travel/data/geo/v1/places/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"items": [
{
"label": "<string>",
"providerCode": "<string>",
"countryHint": "<string>",
"typeHint": "region",
"previousPlaceId": "<string>"
}
]
}'const response = await fetch("https://api.voyant.travel/data/geo/v1/places/resolve", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <token>"
},
body: JSON.stringify({
"items": [
{
"label": "<string>",
"providerCode": "<string>",
"countryHint": "<string>",
"typeHint": "region",
"previousPlaceId": "<string>"
}
]
}),
});
const data = await response.json();import requests
response = requests.post(
"https://api.voyant.travel/data/geo/v1/places/resolve",
headers={
"Authorization": "Bearer <token>"
},
json={
"items": [
{
"label": "<string>",
"providerCode": "<string>",
"countryHint": "<string>",
"typeHint": "region",
"previousPlaceId": "<string>"
}
]
}
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.voyant.travel/data/geo/v1/places/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'label' => '<string>',
'providerCode' => '<string>',
'countryHint' => '<string>',
'previousPlaceId' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.voyant.travel/data/geo/v1/places/resolve"
payload := strings.NewReader("{\n \"items\": [\n {\n \"label\": \"<string>\",\n \"providerCode\": \"<string>\",\n \"countryHint\": \"<string>\",\n \"previousPlaceId\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.voyant.travel/data/geo/v1/places/resolve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"label\": \"<string>\",\n \"providerCode\": \"<string>\",\n \"countryHint\": \"<string>\",\n \"previousPlaceId\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voyant.travel/data/geo/v1/places/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"label\": \"<string>\",\n \"providerCode\": \"<string>\",\n \"countryHint\": \"<string>\",\n \"previousPlaceId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"place": {
"id": "<string>",
"type": "region",
"unlocode": "<string>",
"countryIso2": "<string>",
"parentId": "<string>",
"coordinates": {
"lat": 123,
"lng": 123
},
"name": "<string>",
"nameLang": "<string>",
"names": {},
"aliases": [
"<string>"
],
"attributes": {}
},
"confidence": 123,
"method": "code",
"atSea": true
}
]
}{
"code": "NOT_FOUND",
"message": "<string>"
}{
"code": "NOT_FOUND",
"message": "<string>"
}{
"code": "NOT_FOUND",
"message": "<string>"
}⌘I