GET api/weather/forecasts/{intervelspec}/{units}?appKey={appKey}&postal={postal}&city={city}&state={state}&country={country}&locationKey={locationKey}&latitude={latitude}&longitude={longitude}&language={language}&deviceId={deviceId}&includeLocInfo={includeLocInfo}

Get forecast weather details for a location. We can choose fields as per our necessity. intervelspec,units,appKey and language are mandatory. includeLocInfo and deviceId are optional. The other parameters are in combinations of either (postal, country) or (city, country) or (latitude, longitude). ex 1: /api/weather/forecasts/intervelspec/units?appkey,postal,country,language,deviceId,includeLocInfo ex 2: /api/weather/forecasts/hourly/1?appkey,postal,country,language,deviceId,includeLocInfo ex 3: /api/weather/forecasts/hourly/1?appkey,city,country,language,deviceId,includeLocInfo ex 4: /api/weather/forecasts/daily/2?appkey,latitude,longitude,language,deviceId,includeLocInfo

Request Information

Parameters

TypeNameDescriptionAdditional information
string intervelspec
intervelspec is mandatory, it's value can be either hourly or daily

Define this parameter in the request URI.

string units
No of hours or days(mandatory)

Define this parameter in the request URI.

weatherRequest weatherRequest
Appkey, language and combinations of either (postal, country) or (city, country) or (latitude, longitude).

Define this parameter in the request URI.

string deviceId
The Device Id. This is an optional parameter

Define this parameter in the request URI.

boolean includeLocInfo
The response should include Location Info.Optional parameter

Define this parameter in the request URI.

Response Information

Response depends if it's hourly ForecastHourlyWeatherWithLocationResult or daily request.ForecastWeatherWithLocationResult
Status CodeDescription
200 - OKSuccessful.
500 - InternalServerError When Unexpected Error Occurs:
  • UnknownError
400 - BadRequestWhen input parameters are invalid