About The Price Car Search API
Our search APIs allow users to look for cars meeting criteria such as:
- Price: Including manufacturer's List Price and On-The-Road Price;
- Company Cars: Including P11D value, CO2 output, annual or monthly benefit and tax;
- Performance: Including top speed, acceleration, BHP and engine configuration;
- Equipment & Features: Including factors such as standard equipment and zero cost options;
- Body Style: Including factors such as fuel type, seats, gearbox and fuel type.
- Monthly Payment: Including factors such as the finance type, term and annual mileage;
- Electric Cars: Including factors such as battery range and recharge time;
The APIs can be combined to produce searches by factors such as company car tax and body style or battery range.
The price search API can operate from either:
- the manufacturer's list price; or
- a table of discounted prices according to terms for each manufacturer/model, etc
The latter approach requires an additional database of vehicle purchase terms, so for simplicity in the demo we have used the full manufacturer's list price.
In the demo API below we use the manufacturers' published List Price, delivery charges, vehicle excise duty and first registration fee at the time of use.
A custom dataset can also be delivered using a date sensitive price to take account of manufacturers' impending price changes.
Dataset
Data can be provided as 'JSON' or 'XML' datasets and you can choose the type of data returned in your HTTPS request by declaring 'json' or 'xml' in the 'd_Type' element of the request string.
JSON is the default type for the dataset if no 'd_Type' is set.
Our Demo
Our demonstrator provides an illustration of how the car price search API works using XML.
Set the criteria for the search (type of price/minimum/maximum) to see a list of cars matching the requirements.
We have set out our demo with a structured approach to each phase of the search request, adding criteria likely to be dependent on each preceding selection.
We also provide a notification of the number of cars found by using a count of the number of rows in the returned dataset.
The HTTPS {GET} request is given below including all selected criteria.
You can copy and paste the sample request strings into a browser address bar to see the raw XML data returned for the request (right click on the browser page displayed and you will see the XML dataset).
You can also substitute XML for JSON when you perform the 'copy|paste' exercise.
For our returned datasets we have provided:
- a table formatted to provide a display similar to a typical end-user experience
- an unformatted table to display the dataset results
- an unformatted table to display the dataset results
- a sample XML dataset for the table
Within each returned dataset we include all the price related information so that the end-user can further refine the search.
The dataset also includes the CAPID of each vehicle which then allows a link to data on individual vehicles from other APIs.
{GET} Requirements
The {GET} request follows standard HTTPS key:value pair protocols. No response will be given for an HTTP request.
The {GET} request for a search requires only our standard security login/session token and search parameters according to the pair:value keys below.
All of the keys set out below are independent and can be used individually or in conjunction with other keys to build selection criteria for a car which meet the user's requirements.
The keys from each search can also be combined to create more sophisticated searches, e.g. body style by monthly payment, performance by body style, etc.
Security
A session token is created on initial login and must be included as a cookie with all HTTPS requests or the request will fail.
If the user's browser does not allow functional cookies then the {GET} request will become orphaned and the request cannot be linked to any other requests in the same session.
If the session token is not included then the session will be terminated, any data created in the session may be erased at the server and the user may need to re-authenticate with a new session.
For security reasons the HTTPS protocol must be used for all {GET} requests so that all data passed between the browser and the server is encrypted, including the session token.
Pair:Value Summary
d_type: xml or json for the required return data type (json if not specified)
f_price: A string type variable representing the type of price to target, either "L" for manufacturer's list price or "O" for On-The-Road Price
f_min: An integer type variable representing the minimum target price
f_max: An integer type variable representing the maximum target price
Details of other possible key:value pairs for the price search are available on request.
Custom pairs can also be created.