Developers

Welcome!

The Aerpro API is still quite new, and while designed for internal use, several of our customers thought they could get value from it, so we've opened it up a bit.

There are two main interfaces, the basic "jQuery plugin" interface, which is as simple to use as any other jQuery plugin, install into your page and tell where to output, it handles rendering the vehicle selectors and returns a JSON object to your function to do with as you need.
We ask that you leave the attribution intact.

To have more control over the data, there is also the v2 API. Which is basically GET URL's generated from the output of the plugin. Simply send the "id" attribute of a vehicle to request details, eg:

GET => https://aerpro.com/api/v2/vehicle/{id}

Or, if you just want info about a particular product, you can use:

GET => https://aerpro.com/api/v2/products/{sku}

This will return a JSON encoded representation of the product with SKU: AP10, it would be https://aerpro.com/api/v2/products/ap10

This one is special, if you require up to 20 products at once, you can request them with one call, simply CSV them, eg: https://aerpro.com/api/v2/products/ap10,ap11,ap12 will return all three.

Information about vehicles, headunits and the relationships between them are also available, however, to protect our IP they are not available as a dump. Please do not ask for this. We would rather your users request it directly from us via this API and their web-browsers.

Plugin: Easy Mode

The plugin system, is in use on our homepage, basically it listens for event: 'aerpro-status' and detects status: 'api-ready', then uses the data object attached. Obviously, aerpro.com doesn't actually need to make any API calls to generate a link to a vehicle, however, we plan on constructing a more dynamic page in future, so the groundwork has been laid.

You don't HAVE to register a function to use the plugin, Of course if you want more than simple redirection to our website for the vehicle, then you'll likely want to do something else.

Ideally, you'd integrate it with your own platform, so a successful selection could create something to add products to a cart, or helps comparing with other products, whatever you actually want the end user to do.

The minimum required to get a functioning vehicle selector:

  1. Load jQuery
    <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
  2. Load the plugin:
    <script src="https://aerpro.com/plugin.js"></script>
  3. Define a callback function to work with the results:
    <script>window.WhatDoWeDo = function(data){ 
    // Write whatever you like! 
    console.log(data);
    }></script>
  4. Create a place for the plugin to exist on the page:
    <div id="aerpro-selector-here"></div>
  5. Finally, tell the plugin to use the callback function on Model Select completion:
     $('#aerpro-selector-here').aerproVehicleSelector(WhatDoWeDo);

Essentially we load the script http://aerpro.com/plugin.js, then register a function to operate on the success of a users-selection. For a fully working version on a foreign site, check out tdj.com.au/demo

Alternately, we have hosted a copy on another server: Try the foreign server demo here.

Feedback extremely welcome, ideas/updates/changes etc, please feel free to help us make this service better!

Documentation for the old API

We no longer encourage use of the old "rest" api.. which, let's face it, was never a RESTful web-service at all, just putting the word "rest" in a URL does not a RESTful webservice make.