Combined Details Requests

This endpoint provides a single resource for being able to route, geocode, and forecast all with one request. Functionally, it serves as a combination of the Directions, Reverse Geocode, and Forecast Matrix endpoints. Those endpoints are provided as composable pieces for you to exercise more granular control, but if you prefer to simplify your API usage by making a single request, this endpoint achieves the same effect.
This endpoint does not support alternative routes. If you wish to generate forecasts for a set of alternate routes, please refer to the individual endpoint resources.
Examine the available geocode endpoints for more details about address-like representations or GPS coordinate representations for use as input in query parameters.
The results of this request will be similar to the usual Forecast Matrix response, but with the routing polyline also provided with the response, as well as optionally returning geocode information.
Use of this endpoint may be more limiting for long-running requests than the separate, individual resources. In particular, you may be more likely to experience timeouts for an excessively long-running request. If you experience this, you may have better luck with the individual resources.
That said, it is also quite likely that this endpoint will be more performant than using the individual resources, due to less time spent in the roundtrip between our servers and your systems.

Query Parameters

point

A series of locations that represent the desired trajectory of travel. These can be address-like representations or (lat,lng) GPS coordinates. Each specified point should generally be considered a milestone/waypoint in the trajectory, but can also be treated as intermediate waypoints used to guide the results to follow a particular route. For best results, URL-encode this parameter.
(required; at least 2)

speed

Expected average speed, in meters/hour. Selected forecast points will use this setting to estimate useful points for retrieving weather results. The forecast points may not precisely match this setting.
This parameter cannot be used if the num_forecast_points parameter is also set.
(optional; default=97000 meters/hour, or approximately 60 miles/hour)

num_forecast_points

The exact number of forecast points to return. These will be evenly distributed across the route.
This parameter cannot be used if the speed parameter is also set.
(optional; default=indeterminate)

mode

Desired mode of transit.
Available transit modes:
  • car - Default routing and weather responses
  • truck - Routing avoids small roads; weather results are sensitive to high winds
  • motorcycle - No impact on routing; weather results are sensitive to precipitation
  • bicycle - No impact on routing; weather results are sensitive to precipitation
(optional; default=car)

units

The preferred units of the response.
Available units:
  • imperial - Imperial units (Fahrenheit and/or miles)
  • metric - Metric units (Celsius and/or kilometers)
(optional; default=imperial)

max_days

The maximum number of days for which to aggregate the summary across (starting today).
(optional; default=all)

start_date

The date at which to start aggregating the details, in YYYY-mm-dd format. This parameter is used when you want to start aggregating the details starting at a future date (for example, getting the details starting 3 days from today).
Use of this parameter also requires use of the tz_offset parameter.
(optional; default=today)

tz_offset

The time zone offset from GMT for the requested date, offset in hours. Decimal values are allowed for time zone offsets that are not whole numbers.
Use of this parameter also requires use of the start_date parameter.
(optional; default=0)

geocode

A boolean value for whether to generate descriptive geocode information with the returned points. This is often used to provide more human-friendly descriptions of the locations.
(optional; default=false)

Cost

The cost of this request will vary, depending upon the number of forecast locations generated, as well as whether geocoding information is returned.
For examples of potential pricing, refer to the Pricing page.

Sample Query

GET https://api.weatherroute.io/v1/combined/details?point=Chicago,IL,United+States&point=37011&speed=97000&mode=car&geocode=true

Output

This request returns a CombinedDetails response object.

Sample output

{
  "route": {
    "distance": 722596.188,
    "time": 7.45,
    "polyline": [{ ... }],
    "forecastPoints": [{ ... }]
  },
  "forecasts": [
    {
      "latitude": 39.526,
      "longitude": -119.813,
      "hourly": [{ ... }],
      "daily": [{ ... }],
      "alerts": [{ ... }]
    },
    {
      "latitude": 39.526,
      "longitude": -120.513,
      "hourly": [{ ... }],
      "daily": [{ ... }],
      "alerts": [{ ... }]
    },
    ...
  ],
  "geocodes": [
    {
      "gps": "39.526,-119.813",
      "latitude": 39.5261206,
      "longitude": -119.8126581,
      "postalCode": null,
      "city": "Reno",
      "county": "Washoe County",
      "state": "Nevada",
      "country": "United States",
      "osmId": 170120,
      "longName": "Reno, Nevada, United States",
      "shortName": "Reno, NV, US"
    },
    ...
  ]
}