About Our Van Specifications API
Our Van Specifications API provides details of van specifications such as fuel economy, payload, dimensions, etc for around 6,000 new vans currently for sale in the UK.
Dataset
The dataset provides a list of the technical specifications for a selected van including the CAP-HPI technical code and description for the item (for additional referencing).
The content of the dataset is a mixture of integer, floating point, string and boolean values depending on the data type.
For easier display conversion the dataset also provides the type of data supplied:
- 'I' - Integer
- 'B' - Boolean
- 'F' - Float
- 'S' - String
Where the data item can be represented as more than one type both will be provided (e.g. integer and string).
Where only one data type is available (e.g. string) an empty field will not be provided for the alternative - the field will not appear in the table.
The dataset can be provided in 'JSON' or 'XML' format. 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 API delivers technical specifications for vans using XML.
To obtain a technical specifications list for a vehicle just choose a manufacturer, then a range and model from the list boxes below.
We will display the relative HTTPS {GET} requests for each stage of van selection; 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.
As each vehicle model selection is made the returned dataset in our demo also includes the vehicle derivative's CAP-HPI ID code ('CAPID'), manufacturer, range and model name for verification.
{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 van's technical specifications list only requires our standard security login/session token and the van's CAPID.
The manufacturer, range and model name are not required for the calculation, but these items will be returned as part of the dataset for verification purposes.
The CAPID must be for a vehicle currently for sale new in the UK - a CAPID for a discontinued model or retired derivative will not return a dataset.
A dataset will only be provided where CAP-HPI has published technical specifications for a vehicle - new vehicle model ranges/derivatives may not return a dataset.
Data Retrieval
Once you have selected a vehicle below click on the 'Specifications' button to see a returned dataset.
You will also see the entire {GET} request string as an example and the returned dataset structured as a typical online representation of XML for the van.
This will include the dataset XML node descriptions so that you can see the schema.
The returned dataset for technical specifications provides individual specification items as described by CAP-HPI.
Once you've gone through the selection process you can also see a sample implementation of the technical specifications list.
Click on the 'View Sample Implementation' button to open a new browser window with a sample web display page.
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)
v_type: as CAPIDs do not differentiate between cars and vans the vehicle type must be specified as 'LCV'
CAPID: valid CAPID for a van not discontinued