Retrieve Historical Photo
curl --request GET \
--url https://historical.photos.vin/{vin}-{index}.jpgimport requests
url = "https://historical.photos.vin/{vin}-{index}.jpg"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://historical.photos.vin/{vin}-{index}.jpg', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://historical.photos.vin/{vin}-{index}.jpg",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://historical.photos.vin/{vin}-{index}.jpg"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://historical.photos.vin/{vin}-{index}.jpg")
.asString();require 'uri'
require 'net/http'
url = URI("https://historical.photos.vin/{vin}-{index}.jpg")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyHistorical Photos
Retrieve Historical Photo
Retrieving a Specific Photo
GET
/
{vin}
-
{index}
.jpg
Retrieve Historical Photo
curl --request GET \
--url https://historical.photos.vin/{vin}-{index}.jpgimport requests
url = "https://historical.photos.vin/{vin}-{index}.jpg"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://historical.photos.vin/{vin}-{index}.jpg', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://historical.photos.vin/{vin}-{index}.jpg",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://historical.photos.vin/{vin}-{index}.jpg"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://historical.photos.vin/{vin}-{index}.jpg")
.asString();require 'uri'
require 'net/http'
url = URI("https://historical.photos.vin/{vin}-{index}.jpg")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyDescription:
Retrieves a single historical photo by its index. The
Successful Response:
If the requested image doesn’t exist, a
Retrieves a single historical photo by its index. The
index is typically a numeric identifier (e.g., 1, 2) corresponding to the order in which images were returned for that VIN.
Example Request:
GET https://historical.photos.vin/1HGCM82633A004352-1.jpg
- Returns the requested image file (e.g., JPEG).
- Response includes
Content-Type: image/jpeg. - May include caching headers such as
Cache-Controlto improve performance.
If the requested image doesn’t exist, a
404 Not Found response is returned. Ensure your integration handles such cases gracefully.
Workflow Summary
- List Available Images: Fetch the VIN endpoint to get a list of image URLs.
- Fetch a Specific Image: Use one of the returned URLs to retrieve the actual image file.
Getting Started
- Integration: To integrate with your frontend, fetch and cache images from a server-side service using your Drivly credentials.
- Authentication: If you do not have Drivly credentials, please reach out to our team.
- Caching: Leverage caching headers to reduce load times and bandwidth usage.
- Error Handling: Implement robust error handling for non-existent VINs or indices.