The Total Cash Price is the vehicle’s True Market Value® (TMV®) price plus typically equipped options, destination charge, base tax and fees assessed by your state, and, if applicable, gas guzzler tax; less any widely available manufacturer-to-customer cash rebates. (However, we do not account for other types of cash rebates or incentives because of the variability of those offers and their eligibility requirements.) Make sure to see the Special Requirements for displaying the Edmunds True Market Value®.
https://api.edmunds.com/v1/api/tco/newtotalcashpricebystyleidandzip/{style ID}/{zipcode}?fmt=json&api_key={api key}
You need the Javascript SDK to run this example.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<title>Edmunds API Example</title>
</head>
<body>
<div id="results-body"></div>
<script>
window.sdkAsyncInit = function() {
// Instantiate the SDK
var res = new EDMUNDSAPI('YOUR API KEY');
// Optional parameters
var options = {};
// Callback function to be called when the API response is returned
function success(res) {
var body = document.getElementById('results-body');
body.innerHTML = "The Total Cash Price is: " + res.value;
}
// Oops, Houston we have a problem!
function fail(data) {
console.log(data);
}
// Fire the API call
res.api('/v1/api/tco/newtotalcashpricebystyleidandzip/101426944/90019', options, success, fail);
// Additional initialization code such as adding Event Listeners goes here
};
// Load the SDK asynchronously
(function(d, s, id){
var js, sdkjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "path/to/sdk/file";
sdkjs.parentNode.insertBefore(js, sdkjs);
}(document, 'script', 'edmunds-jssdk'));
</script>
</body>
</html>