GET api/Weather/current?appKey={appKey}&postal={postal}&city={city}&state={state}&country={country}&locationKey={locationKey}&latitude={latitude}&longitude={longitude}&language={language}&deviceId={deviceId}&includeLocInfo={includeLocInfo}
Get weather details for a location. We can choose fields as per our necessity. 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/current?appKey,postal,country,language,deviceId,includeLocInfo ex 2: /api/Weather/current?appkey,country,city,language,deviceId,includeLocInfo ex 3: /api/Weather/current?appkey,latitude,longitude,language,deviceId,includeLocInfo
Request Information
Parameters
Type | Name | Description | Additional information |
---|---|---|---|
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
Status Code | Description |
---|---|
200 - OK | Successful. |
500 - InternalServerError |
When Unexpected Error Occurs:
|
400 - BadRequest | When input parameters are invalid |