Current Weather API

The Current Weather API returns the current weather information for the location.

Format

Verb Request
GET https://host/weather/v1/current/{location}

Path Parameters

Key Description Required
location The airport IATA code. Yes

Request Query Parameters

Key Description Required
temperatureScale Temperature unit (C, F) to convert the response. Defaults to C. No
lengthUnit Distance unit (K, M) to convert the response. Defaults to K. No
callback Name of callback function (JSONP). No

Payload Example

Request

"https://host/weather/v1/current/BOS

Response


{
  "success": true,
  "version": "v1",
  "temperatureScale": "C",
  "lengthUnit": "K",
  "currentWeather": {
    "location": "BOS",
    "phrase": "Partly sunny",
    "temperature": "31",
    "heatIndex": "31",
    "windChill": "31",
    "relativeHumidity": "38",
    "relativeHumidityUnits": "%",
    "windDirection": "SSW",
    "windSpeed": "32,19",
    "pressure": "29.80",
    "pressureUnits": "in/Hg",
    "visibility": "16,09",
    "feelsLikeTemperature": "31",
    "timeStamp": "2015-08-03T17:49:50Z",
    "icon": "03"
  }
}
 

NOTE 1: Fields not available in the response will be omitted.

NOTE 2: The icon field maps to a URL which returns an icon corresponding to the weather. See Weather Icon List for a list of URL mappings.

Errors

HTTP Code Reason Payload
400 Auth failed

{
 "errors":
   {"error":[
     {"description":"authentication failed",
       "code":"9998"
     }
   ]
  },
  "success":false
}
400 Airport not Found

{
  "errors": {
     "error": [
        {
          "description": "Airport / Location not found",
          "code": "4001"
        }
     ]
    },
400 Invalid Temperature Scale

{
  "errors": {
     "error": [
        {
          "description": "Temperature Unit should be 'C' or
          'F'",
          "code": "4003"
        }
     ]
    },
    "success": false
}
400 Invalid Length Unit

{
  "errors": {
     "error": [
        {
          "description": "Length Unit should be 'K' or 'M'",
          "code": "4004"
        }
     ]
    },
    "success": false
}
404 No Service


  "errors": {
     "error": [
       {
         "description": "no service available",
         "code": "1003"
       }
      ]
   },
   "success": false
}
500 System Error

{
  "errors": {
     "error": [
       {
         "operation had partial failure. Memory operation 
         succeeded, persistence operation failed",
         "code": "9995"
       }
      ]
   },
   "success": false
}
500 System Error

{
  "errors": {
     "error": [
       {
         "A system error occurred. Contact Support",
         "code": "9999"
       }
      ]
   },
   "success": false
}