GET api/weather/ForecastWithLocationInfo/{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. AppKey,intervelspec,units are mandatory. includeLocInfo, deviceId and language are optional. ex: /api/Weather/ForecastWithLocationInfo/daily/1day?appKey,postal,country,language,deviceId,includeLocInfo,state,city

Request Information

Parameters

TypeNameDescriptionAdditional information
string intervelspec
intervelspec is mandatory, it's value is daily/hourly

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, postal, country,city,state .

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 ForecastHourlyFullWeatherWithLocationResult or daily request.ForecastFullWeatherWithLocationResult
Status CodeDescription
200 - OKSuccessful.
500 - InternalServerError When Unexpected Error Occurs:
  • UnknownError
400 - BadRequestWhen input parameters are invalid