> ## Documentation Index
> Fetch the complete documentation index at: https://voyant.travel/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 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`.



## OpenAPI

````yaml /api-specs/data.json post /data/geo/v1/places/resolve
openapi: 3.1.0
info:
  title: Voyant Data API
  version: 1.0.0
  description: >-
    Public REST API for the Voyant Data product. Voyant Data is a set of
    Cloudflare Workers served behind the public gateway at
    https://api.voyant.travel. Each sub-product worker mounts internally at
    /v1/... and is exposed publicly under /data/{product}/v1/*. Sub-products:
    geo, air, fx, reviews, hotels, restaurants, experiences. Authentication is a
    bearer API token scoped per sub-product (data:{product}:read). List/search
    endpoints return { data, totalCount, nextCursor? }; single-item endpoints
    return { data }. Error bodies carry a stable code (NOT_FOUND,
    INVALID_REQUEST, INVALID_CURSOR, UPSTREAM_FAILED, INTERNAL_AUTH_REQUIRED,
    RATE_LIMITED).
servers:
  - url: https://api.voyant.travel
    description: Voyant Data public gateway
security:
  - bearerAuth: []
tags:
  - name: Geo
    description: >-
      Canonical travel geography (countries, regions, cities, ports, waterways)
      plus language and timezone reference lookups. Scope: data:geo:read
  - name: Air
    description: >-
      Aviation reference data: airports, airlines, aircraft. Scope:
      data:air:read
  - name: FX
    description: >-
      Currency exchange (exchangerate-api.com white-label) plus the ISO 4217
      currency catalog. Scope: data:fx:read
  - name: Reviews
    description: >-
      Google Reviews / Extended Reviews / Q&A and Trustpilot. Scope:
      data:reviews:read
  - name: Hotels
    description: 'Google Hotels and TripAdvisor (hotel-scoped). Scope: data:hotels:read'
  - name: Restaurants
    description: 'TripAdvisor restaurants. Scope: data:restaurants:read'
  - name: Experiences
    description: 'TripAdvisor attractions / experiences. Scope: data:experiences:read'
paths:
  /data/geo/v1/places/resolve:
    post:
      tags:
        - Geo
      summary: Resolve provider labels to canonical places
      description: >-
        Resolve a batch of provider labels/codes to canonical places
        (code/exact/alias/fuzzy/ai matching). Requires scope `data:geo:read`.
      operationId: geoResolvePlaces
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlaceResolveRequest'
      responses:
        '200':
          description: Resolution results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaceResolveResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
      x-codeSamples:
        - lang: typescript
          label: SDK
          source: >-
            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>"
                }
              ]
            });
        - lang: bash
          label: cURL
          source: |-
            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>"
                }
              ]
            }'
        - lang: javascript
          label: Node
          source: >-
            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();
        - lang: python
          label: Python
          source: |-
            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()
components:
  schemas:
    PlaceResolveRequest:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PlaceResolveItem'
    PlaceResolveResult:
      type: object
      required:
        - results
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/PlaceResolveMatch'
    PlaceResolveItem:
      type: object
      required:
        - label
      properties:
        label:
          type: string
        providerCode:
          type: string
        countryHint:
          type: string
        typeHint:
          $ref: '#/components/schemas/CanonicalPlaceType'
        previousPlaceId:
          type: string
          description: >-
            Previously resolved place on the same route, for distance sanity
            checks.
    PlaceResolveMatch:
      type: object
      required:
        - place
        - confidence
        - method
      properties:
        place:
          oneOf:
            - $ref: '#/components/schemas/CanonicalPlace'
            - type: 'null'
        confidence:
          type: number
        method:
          type: string
          enum:
            - code
            - exact
            - alias
            - fuzzy
            - ai
            - none
        atSea:
          type: boolean
          description: True when the label is an at-sea / cruising entry, not a real place.
    Error:
      type: object
      required:
        - code
      properties:
        code:
          type: string
          enum:
            - NOT_FOUND
            - INVALID_REQUEST
            - INVALID_CURSOR
            - UPSTREAM_FAILED
            - INTERNAL_AUTH_REQUIRED
            - RATE_LIMITED
          description: Stable machine-readable error code.
        message:
          type: string
          description: Human-readable error detail.
    CanonicalPlaceType:
      type: string
      enum:
        - region
        - country
        - subdivision
        - city
        - port
        - river
        - sea
        - ocean
        - canal
        - lake
    CanonicalPlace:
      type: object
      required:
        - id
        - type
      properties:
        id:
          type: string
          description: >-
            Stable canonical id (ISO2 country, UN/LOCODE port, QID waterway,
            ...).
        type:
          $ref: '#/components/schemas/CanonicalPlaceType'
        unlocode:
          type: string
          description: UN/LOCODE if applicable (e.g. DEHAM); a ZZ prefix denotes at-sea.
        countryIso2:
          type: string
        parentId:
          type: string
        coordinates:
          $ref: '#/components/schemas/PlaceCoordinates'
        name:
          type: string
          description: Server-resolved display name for the requested language.
        nameLang:
          type: string
        names:
          type: object
          additionalProperties:
            type: string
          description: Locale -> display name map (omitted unless names=true).
        aliases:
          type: array
          items:
            type: string
        attributes:
          type: object
          additionalProperties: true
    PlaceCoordinates:
      type: object
      required:
        - lat
        - lng
      properties:
        lat:
          type: number
        lng:
          type: number
  responses:
    BadRequest:
      description: Invalid request (code INVALID_REQUEST or INVALID_CURSOR).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: >-
        Missing or invalid bearer token / insufficient scope (code
        INTERNAL_AUTH_REQUIRED).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Rate limit exceeded (code RATE_LIMITED).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Voyant Data API token, scoped per sub-product (data:{product}:read).
        Sent as `Authorization: Bearer <token>`.

````