Introduction
This article will guide you through the best way to use the real-time RideStyler API to display stock imagery for vehicles on your website. It is recommended that you have a basic understanding of the RideStyler API and how to make requests. You can find information in our Developer Documentation.
Anytime you wish to show an image of a vehicle, whether it is a stock image or a composite image (with wheels and tires), you will be using the Vehicle/Render endpoint. To do this, you need to have a RideStyler VehicleConfigurationID to use for our requests. There are two ways to get this ID.
- If you are using RideStyler for your vehicle lists (using the Vehicle/Select endpoint or others) you should already be receiving a
ConfigurationID(e.g. RideStyler VehicleConfigurationID) as part of the data in your requests. You can use this ID when making a render request so you can skip to Requesting Images from RideStyler. - If you are using a third party vehicle library, you will want to look up the equivalent RideStyler vehicle. To do this, you will want to perform a search using as detailed description of the vehicle as possible. Please see the Mapping to RideStyler Vehicles section below.
Mapping to RideStyler Vehicles
If you are using a third party database for your existing vehicle lookup it is necessary to first map the selected vehicle to the equivalent RideStyler vehicle. The RideStyler API includes a smart vehicle search feature which makes this process easy.
First, you need to assemble a detailed vehicle description from your existing vehicle. This should include as much information about the vehicle as possible. For example: 2015 Honda Civic SE 4DR
Now you are ready to make a request to the Vehicle/GetDescriptions endpoint. The sample payload below demonstrates a simple request. You will notice that we include the HasImage parameter as well because we only want to find vehicles which have available images.
{
"Count": 1,
"Search": "2015 Honda Civic SE 4DR",
"HasImage": true
}
The RideStyler API will attempt to find a matching RideStyler vehicle using the description you provided. Keep in mind that the more detailed this description is, the more accurate the match will be on the RideStyler side. Below is a sample response.
{
"Descriptions": [
{
"Weight": 0.0,
"LugTypeID": 2,
"LugType": "Nut",
"LugThreadID": 4,
"LugThread": "12mm x 1.50",
"LastUpdated": "2020-02-18T13:51:42.367",
"HasSideImage": true,
"SideImage": "eadcea44-0e41-4c87-ba18-460f3cc5d97f",
"HasAngledImage": true,
"AngledImage": "e06b94de-4ae9-4c3d-8fb5-51c691056d94",
"ConfigurationID": "2240f834-a2da-4062-9d8d-3d3f52f5258e",
"ModelID": "1e9a45aa-705d-45d5-8f4f-76f8846c9e74",
"MakeID": "9e09f7cb-8b3f-41da-a49d-014e89b00419",
"MakeName": "Honda",
"ModelName": "Civic",
"TrimName": "SE",
"Year": 2015,
"DoorTypeID": 4,
"BedLengthID": 1,
"BedTypeID": 1,
"CabTypeID": 1,
"StyleDescriptionID": 2,
"StyleTypeID": 1,
"DriveTypeID": 1,
"DriveType": "2WD",
"DoorType": "4DR",
"StyleType": "Car",
"StyleDescription": "Sedan",
"VehicleClass": 1,
"CabType": "N/A",
"CabTypeClass": "None",
"BedType": "N/A",
"BedLength": "N/A",
"FullDescription": "2015 Honda Civic SE 4DR",
"TrimDescription": "SE 4DR",
"Dually": false,
"HasTPMS": false,
"HasRunFlat": false,
"IsApproved": null,
"SearchConfidence": 0.5,
"DataStatus": 1,
"Regions": null
}
],
"Success": true,
"Code": 0,
"Message": ""
}
There is a lot of information returned to describe the vehicle but the most important data point is the ConfigurationID. This is the RideStyler ID that uniquely identifies this vehicle and will be used for subsequent requests to the API.
Also, please note that each vehicle record includes a HasSideImage and HasAngledImage attribute which will indicate the images available for the specific vehicle. This should be considered before attempting to request an image for the vehicle.
Requesting Images from RideStyler
Once you have collected the required vehicle information you are ready to make a request to the API for a rendered image. As mentioned previously, this request will be made through the Vehicle/Render endpoint. The URL below illustrates a simple render request that can be used a just like a normal image URL.
<a href="https://api.ridestyler.net/Vehicle/Render?key={YourAPIKey}&vehicleconfiguration=2240f834-a2da-4062-9d8d-3d3f52f5258e&type=Angle&paintcolor=%23E6E6E6&width=400&height=200" >
You will notice that we specify the width and height of the image we are requesting. This allows us to easily request thumbnails or full resolution previews directly from the API without need to pregenerate the various image resolutions.
From here, you can review the Vehicle/Render documentation and see the other properties which can be used to customize the resulting images. This include suspension adjustments, paint, wheels and tires.