Each of our APIs is explained on its own web page with working sample code.
Each page covers the nature of the API, what it delivers and how to implement it.
To test an API you just copy and paste the sample code into a browser address bar and press the 'Enter' key.
The sample code is similar to a web address you would type into a browser address bar.
For example, to go to the Google search site you would type 'https://www.google.com' into your browser address bar to go the Google's search home page.
If you followed our example above, what you typed into your browser address bar is sometimes known as a 'query string' - is a string of characters that queries the web about reaching the home page for Google.
With our APIs you type a similar query string, but add some additional code (known as 'parameters') to specify what you want to do.
For example, to get a list of car manufacturers you would type: 'https://api.drivesmart.uk//CarManufacturers?d_Type=xml'
In the above example the query string is comprised of three parts;
When you type the complete query string into a browser you'll get back an xml or json formatted set of data.
You can test this by copying the 'https://api.drivesmart.uk//CarManufacturers?d_Type=xml' query string to your browser.
If you change the 'd_type' from '=xml' to '=json' you'll get back a json formatted list rather than an xml set of data.
This principle applies to all our APIs - type our API site web address, the query you want and the type of data you want back.
Often you will need more than one query string to do everything you need to do.
When you use the 'CarManufacturers' query string you will probably want to follow through by getting a list of model ranges and individual vehicle models.
To do this you'll need to follow up with a second query string for the manufacturer's model range and then for the derivatives for each range.
You can see an example of the sequence of query strings to use in our Car Selector API.
You'll probably be familiar with cookies, small files that are stored on your computer to tell a web site something about you.
We use cookies in our APIs to validate that you are authorised to use it and to set up a link between query strings and the data sets which are sent back and forth between your browser and the API site.
These cookies exist only for the duration of your interaction with the API site and are deleted once you leave our site (subject to your browser).
The cookie typically contains an ID unique to your session with the site and sustains continuity between your intial query string and subsequent query string requests during the same browser session.
Once you're a subscriber to our API site the cookie will also contain some security information to verify that you are entitled to use the particular API.
You'll set this part of the cookie when you send your initial query string - it should include your login ID and password.
As mentioned ablve, you'll need an ID and password to reach the API site apart from the demo facilities.
Our API site only operates through secure connections between your browser and our site (using the 'HTTPS' protocol).
This means you won't get a response from the site if you try to connect with an insecure 'HTTP' connection.
If you don't include your login details you'll also be restricted in the APIs you can access and how long a connection can be maintained.
Try our APIs.
You can go straight to our demos for cars, vans and special tools.
Unless you are a subscriber you can only use them for test purposes - if we think you're doing more than that we may cut off your access to the site without warning and deny you further access.
And if you like our APIs and want them in your web site then get in touch.
We'd love your feedback!