Updates, examples and tips from the inside.

Aeris API 1.0.5 Update

by lhuffman on Jan 27, 2012

We released version 1.0.5 of the Aeris Weather API which provides support for Canadian postal codes and several bug fixes. Review the version history for a complete list of changes.

Canadian Postal Codes
With this release, Canadian postal codes have been added to our supported place formats. When using postal codes, the space that occurs within the middle is optional, making "M3C 4H9" and "M3C4H9" equivalent.

An example of finding the place information for a postal code:

An example of finding the closest observation for a postal code:

We have introduced the concept of request warnings with this update. Request warnings will be issued in special cases, such as when a parameter is being used improperly or your request includes deprecated functionality or properties. In such cases, the API will still provide a successful response with data, but the error object will include a warning message.

For example, if you query the places endpoint with a coordinate that also includes a limit value greater than 1:

The response would look similar to:

    success: true,
    error: {
        code: "warn_invalid_param",
        description: "The id action enforces a limit of 1"
    response: {
        loc: {
            lat: 44.97997,
            long: -93.26384
        place: {
            name: "Minneapolis",
            state: "MN",
            stateFull: "Minnesota",
            country: "US",
            countryFull: "United States",
            region: "usnc",
            regionFull: "North Central",
            continent: "nam",
            continentFull: "North America"
        profile: {
            elevM: 253,
            elevFT: 830,
            pop: 382578,
            tz: "America/Chicago",
            tzname: "CST",
            tzoffset: -21600,
            isDST: false
        relativeTo: {
            lat: 44.97,
            long: -93.27,
            bearing: 24,
            bearingENG: "NNE",
            distanceKM: 1.21,
            distanceMI: 0.752

In this example, we were attempting to find the 10 closest locations to coordinate 44.97,-93.27 but with the id action. However, we should have used the closest action instead to take advantage of the limit parameter:

posted in Aeris API, General, News

Submit a comment

Commenting is not available in this channel entry.


  • There are no comments for this entry.