Update an existing Vehicle
curl --request PATCH \
--url https://commerce.driv.ly/api/vehicles/{vin} \
--header 'Content-Type: application/json' \
--data '
{
"vin": "1C4HJXEN5MW592818",
"year": 2021,
"make": "Jeep",
"trim": "Sport",
"spec": "vs_4jf8x9jv5c0b",
"model": "Wrangler",
"engine": "3.6L V6",
"seatCount": 5,
"doorCount": 4,
"bodyStyle": "SUV",
"drivetrain": "4WD",
"transmission": "Automatic",
"interiorColor": "Black",
"exteriorColor": "Red"
}
'import requests
url = "https://commerce.driv.ly/api/vehicles/{vin}"
payload = {
"vin": "1C4HJXEN5MW592818",
"year": 2021,
"make": "Jeep",
"trim": "Sport",
"spec": "vs_4jf8x9jv5c0b",
"model": "Wrangler",
"engine": "3.6L V6",
"seatCount": 5,
"doorCount": 4,
"bodyStyle": "SUV",
"drivetrain": "4WD",
"transmission": "Automatic",
"interiorColor": "Black",
"exteriorColor": "Red"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
vin: '1C4HJXEN5MW592818',
year: 2021,
make: 'Jeep',
trim: 'Sport',
spec: 'vs_4jf8x9jv5c0b',
model: 'Wrangler',
engine: '3.6L V6',
seatCount: 5,
doorCount: 4,
bodyStyle: 'SUV',
drivetrain: '4WD',
transmission: 'Automatic',
interiorColor: 'Black',
exteriorColor: 'Red'
})
};
fetch('https://commerce.driv.ly/api/vehicles/{vin}', 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://commerce.driv.ly/api/vehicles/{vin}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'vin' => '1C4HJXEN5MW592818',
'year' => 2021,
'make' => 'Jeep',
'trim' => 'Sport',
'spec' => 'vs_4jf8x9jv5c0b',
'model' => 'Wrangler',
'engine' => '3.6L V6',
'seatCount' => 5,
'doorCount' => 4,
'bodyStyle' => 'SUV',
'drivetrain' => '4WD',
'transmission' => 'Automatic',
'interiorColor' => 'Black',
'exteriorColor' => 'Red'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://commerce.driv.ly/api/vehicles/{vin}"
payload := strings.NewReader("{\n \"vin\": \"1C4HJXEN5MW592818\",\n \"year\": 2021,\n \"make\": \"Jeep\",\n \"trim\": \"Sport\",\n \"spec\": \"vs_4jf8x9jv5c0b\",\n \"model\": \"Wrangler\",\n \"engine\": \"3.6L V6\",\n \"seatCount\": 5,\n \"doorCount\": 4,\n \"bodyStyle\": \"SUV\",\n \"drivetrain\": \"4WD\",\n \"transmission\": \"Automatic\",\n \"interiorColor\": \"Black\",\n \"exteriorColor\": \"Red\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://commerce.driv.ly/api/vehicles/{vin}")
.header("Content-Type", "application/json")
.body("{\n \"vin\": \"1C4HJXEN5MW592818\",\n \"year\": 2021,\n \"make\": \"Jeep\",\n \"trim\": \"Sport\",\n \"spec\": \"vs_4jf8x9jv5c0b\",\n \"model\": \"Wrangler\",\n \"engine\": \"3.6L V6\",\n \"seatCount\": 5,\n \"doorCount\": 4,\n \"bodyStyle\": \"SUV\",\n \"drivetrain\": \"4WD\",\n \"transmission\": \"Automatic\",\n \"interiorColor\": \"Black\",\n \"exteriorColor\": \"Red\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerce.driv.ly/api/vehicles/{vin}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"vin\": \"1C4HJXEN5MW592818\",\n \"year\": 2021,\n \"make\": \"Jeep\",\n \"trim\": \"Sport\",\n \"spec\": \"vs_4jf8x9jv5c0b\",\n \"model\": \"Wrangler\",\n \"engine\": \"3.6L V6\",\n \"seatCount\": 5,\n \"doorCount\": 4,\n \"bodyStyle\": \"SUV\",\n \"drivetrain\": \"4WD\",\n \"transmission\": \"Automatic\",\n \"interiorColor\": \"Black\",\n \"exteriorColor\": \"Red\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"vin": "1C4HJXEN5MW592818",
"year": 2021,
"make": "Jeep",
"trim": "Sport",
"spec": "vs_4jf8x9jv5c0b",
"model": "Wrangler",
"engine": "3.6L V6",
"seatCount": 5,
"doorCount": 4,
"bodyStyle": "SUV",
"drivetrain": "4WD",
"transmission": "Automatic",
"interiorColor": "Black",
"exteriorColor": "Red"
},
"success": true
}{
"error": {
"code": 401,
"message": "Unauthorized"
},
"success": false
}{
"error": {
"code": 404,
"message": "Vehicle Not Found"
},
"success": false
}{
"error": {
"code": 429,
"message": "Too Many Requests"
},
"success": false
}Vehicles
Update an existing Vehicle
PATCH
/
vehicles
/
{vin}
Update an existing Vehicle
curl --request PATCH \
--url https://commerce.driv.ly/api/vehicles/{vin} \
--header 'Content-Type: application/json' \
--data '
{
"vin": "1C4HJXEN5MW592818",
"year": 2021,
"make": "Jeep",
"trim": "Sport",
"spec": "vs_4jf8x9jv5c0b",
"model": "Wrangler",
"engine": "3.6L V6",
"seatCount": 5,
"doorCount": 4,
"bodyStyle": "SUV",
"drivetrain": "4WD",
"transmission": "Automatic",
"interiorColor": "Black",
"exteriorColor": "Red"
}
'import requests
url = "https://commerce.driv.ly/api/vehicles/{vin}"
payload = {
"vin": "1C4HJXEN5MW592818",
"year": 2021,
"make": "Jeep",
"trim": "Sport",
"spec": "vs_4jf8x9jv5c0b",
"model": "Wrangler",
"engine": "3.6L V6",
"seatCount": 5,
"doorCount": 4,
"bodyStyle": "SUV",
"drivetrain": "4WD",
"transmission": "Automatic",
"interiorColor": "Black",
"exteriorColor": "Red"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
vin: '1C4HJXEN5MW592818',
year: 2021,
make: 'Jeep',
trim: 'Sport',
spec: 'vs_4jf8x9jv5c0b',
model: 'Wrangler',
engine: '3.6L V6',
seatCount: 5,
doorCount: 4,
bodyStyle: 'SUV',
drivetrain: '4WD',
transmission: 'Automatic',
interiorColor: 'Black',
exteriorColor: 'Red'
})
};
fetch('https://commerce.driv.ly/api/vehicles/{vin}', 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://commerce.driv.ly/api/vehicles/{vin}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'vin' => '1C4HJXEN5MW592818',
'year' => 2021,
'make' => 'Jeep',
'trim' => 'Sport',
'spec' => 'vs_4jf8x9jv5c0b',
'model' => 'Wrangler',
'engine' => '3.6L V6',
'seatCount' => 5,
'doorCount' => 4,
'bodyStyle' => 'SUV',
'drivetrain' => '4WD',
'transmission' => 'Automatic',
'interiorColor' => 'Black',
'exteriorColor' => 'Red'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://commerce.driv.ly/api/vehicles/{vin}"
payload := strings.NewReader("{\n \"vin\": \"1C4HJXEN5MW592818\",\n \"year\": 2021,\n \"make\": \"Jeep\",\n \"trim\": \"Sport\",\n \"spec\": \"vs_4jf8x9jv5c0b\",\n \"model\": \"Wrangler\",\n \"engine\": \"3.6L V6\",\n \"seatCount\": 5,\n \"doorCount\": 4,\n \"bodyStyle\": \"SUV\",\n \"drivetrain\": \"4WD\",\n \"transmission\": \"Automatic\",\n \"interiorColor\": \"Black\",\n \"exteriorColor\": \"Red\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://commerce.driv.ly/api/vehicles/{vin}")
.header("Content-Type", "application/json")
.body("{\n \"vin\": \"1C4HJXEN5MW592818\",\n \"year\": 2021,\n \"make\": \"Jeep\",\n \"trim\": \"Sport\",\n \"spec\": \"vs_4jf8x9jv5c0b\",\n \"model\": \"Wrangler\",\n \"engine\": \"3.6L V6\",\n \"seatCount\": 5,\n \"doorCount\": 4,\n \"bodyStyle\": \"SUV\",\n \"drivetrain\": \"4WD\",\n \"transmission\": \"Automatic\",\n \"interiorColor\": \"Black\",\n \"exteriorColor\": \"Red\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerce.driv.ly/api/vehicles/{vin}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"vin\": \"1C4HJXEN5MW592818\",\n \"year\": 2021,\n \"make\": \"Jeep\",\n \"trim\": \"Sport\",\n \"spec\": \"vs_4jf8x9jv5c0b\",\n \"model\": \"Wrangler\",\n \"engine\": \"3.6L V6\",\n \"seatCount\": 5,\n \"doorCount\": 4,\n \"bodyStyle\": \"SUV\",\n \"drivetrain\": \"4WD\",\n \"transmission\": \"Automatic\",\n \"interiorColor\": \"Black\",\n \"exteriorColor\": \"Red\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"vin": "1C4HJXEN5MW592818",
"year": 2021,
"make": "Jeep",
"trim": "Sport",
"spec": "vs_4jf8x9jv5c0b",
"model": "Wrangler",
"engine": "3.6L V6",
"seatCount": 5,
"doorCount": 4,
"bodyStyle": "SUV",
"drivetrain": "4WD",
"transmission": "Automatic",
"interiorColor": "Black",
"exteriorColor": "Red"
},
"success": true
}{
"error": {
"code": 401,
"message": "Unauthorized"
},
"success": false
}{
"error": {
"code": 404,
"message": "Vehicle Not Found"
},
"success": false
}{
"error": {
"code": 429,
"message": "Too Many Requests"
},
"success": false
}Path Parameters
Vehicle is uniquely identified by vin
Query Parameters
The number of levels of related objects to include in the response
Body
application/json
Vehicle is uniquely identified by vin
Vehicle has Seat Count
Required range:
x >= 0Vehicle has Door Count
Required range:
x >= 0Vehicle was manufactured with Interior Color
Vehicle was manufactured with Exterior Color
Vehicle was manufactured in Year
Vehicle is of Make
Vehicle has Trim level
Vehicle has Transmission
Vehicle has Engine specification
Vehicle has Vehicle Spec
Vehicle has Drivetrain
Vehicle has Model
Vehicle has Body Style
Response
Vehicle Updated
Show child attributes
Show child attributes
Example:
{
"vin": "1C4HJXEN5MW592818",
"year": 2021,
"make": "Jeep",
"trim": "Sport",
"spec": "vs_4jf8x9jv5c0b",
"model": "Wrangler",
"engine": "3.6L V6",
"seatCount": 5,
"doorCount": 4,
"bodyStyle": "SUV",
"drivetrain": "4WD",
"transmission": "Automatic",
"interiorColor": "Black",
"exteriorColor": "Red"
}