Roadtrippers Developer Hub

Welcome to the Roadtrippers Developer Hub. You'll find comprehensive guides and documentation to help you start working with Roadtrippers as quickly as possible, as well as support if you get stuck. Let's jump right in!

Regions

Regions include cities, states, countries, tourist areas and more (essentially non-business​ venues).

Regions requests require basic auth.

/api/v2/regions/:id

Fetch region data selected by the id value.

Returns

status: 200

Example

{
  "data": {
    "id": 19641,
    "type": "regions",
    "name": "Cincinnati",
    "location": {
      "type": "Point",
      "coordinates": [
        -84.45689,
        39.162
      ]
    },
    "icon": "marker",
    "description": "Cincinnati is a city in the U.S. state of Ohio...",    
    "hierarchy": [
      {
        "id": 4,
        "type": "regions",
        "name": "North America"
      },
      {
        "id": 46,
        "type": "regions",
        "name": "United States of America"
      },
      {
        "id": 311,
        "type": "regions",
        "name": "Midwestern United States"
      },
      {
        "id": 1300,
        "type": "regions",
        "name": "Ohio"
      },
      {
        "id": 5127,
        "type": "regions",
        "name": "Cincinnati-Northern Kentucky metropolitan area"
      },
      {
        "id": 11273,
        "type": "regions",
        "name": "Hamilton County"
      }
    ],
    "sources": [
      {
        "name": "Wikidata",
        "url": "https://www.wikidata.org/wiki/Q43196"
      },
      {
        "name": "Geonames",
        "url": "http://sws.geonames.org/4508722"
      },
      {
        "name": "Wikipedia",
        "url": "https://en.wikipedia.org/wiki/Cincinnati"
      }
    ],
    "images": [
      {
        "id": 100,
        "image_url": "https://atlas-assets.roadtrippersdev.com/uploads/place_image/image/1164093/place_image-image-2224f0f6-a2b7-42d5-8eb4-b7bce33bdc14.jpg",
        "attribution_name": "",
        "attribution_url": "",
        "caption": "",
        "sizes": {
          "thumbnail": {
            "width": 150,
            "height": 150,
            "url": "https://atlas-assets.roadtrippersdev.com/uploads/place_image/image/1164093/-strip_-quality_60_-interlace_Plane_-resize_150x150_U__-gravity_center_-extent_150x150/place_image-image-2224f0f6-a2b7-42d5-8eb4-b7bce33bdc14.jpg"
          },
          "square": {
            "width": 320,
            "height": 320,
            "url": "https://atlas-assets.roadtrippersdev.com/uploads/place_image/image/1164093/-strip_-quality_60_-interlace_Plane_-resize_320x320_U__-gravity_center_-extent_320x320/place_image-image-2224f0f6-a2b7-42d5-8eb4-b7bce33bdc14.jpg"
          },
           "small": {
            "width": 320,
            "height": 240,
            "url": "https://atlas-assets.roadtrippersdev.com/uploads/place_image/image/1164093/-strip_-quality_60_-interlace_Plane_-resize_320x240_U__-gravity_center_-extent_320x240/place_image-image-2224f0f6-a2b7-42d5-8eb4-b7bce33bdc14.jpg"
          }          
        }
      }
    ]
  }
}

Response Details

FieldTypeDescription
typestringregions (distinguishes between places)
namestringFull name of region
descriptionstringText summary or introduction to the region
iconstringSee Icons.
locationobjectGeoJSON object representing the coordinates of this region. See location.
hierarchyarray <object>An array of region related data. See hierarchy.
sourcesarray <object>Sources to be listed for attribution. See sources.
imagesarray <object>Array of image objects. See images.

location (object, GeoJSON)

FieldTypeDescription
typestringGeoJSON "Point"
coordinatesstringFollows the GeoJSON spec (longitude, latitude).

hierarchy (array, object)

The hierarchy specifies the region's parents in order of most general to most specific. For example, the first item in the hierarchy will often be a country or continent since these contain all sub regions. The last item in the hierarchy array is the nearest parent of the requested region.

FieldTypeDescription
idintegerUnique region id.
typestringregions (distinguishes between places)
namestringFull name of region

sources (array, object)

FieldTypeDescription
nameintegerSource name
urlstringLink to source attribution

images (array, object)

FieldTypeDescription
idintegerUnique image id
image_urlstringImage URL
attribution_namestringName to use for attribution
attribution_urlstringLink to use for attribution
captionstringImage caption
sizeshash <object>Keys include thumbnail, square, small, medium, or large. Not all sizes are available for every image. For best results, pick the best size and dimensions to suit and gracefully degrade or fallback when none exist.

images[].sizes (object)

FieldTypeDescription
heightintegerImage height
widthintegerImage width
urlstringImage URL

Default height and width values:

Size NameWidthHeight
thumbnail150150
square320320
small320240
medium800600
large1024768

Updated about a year ago

Regions


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.