Api documentation

Api documentation

Get All TMV® Bands

Price: True Market Value
 
 
v2 v1
 
 

Description

Get All TMV® Bands. Make sure to see the Special Requirements for displaying the Edmunds True Market Value®.

URL

  1. https://api.edmunds.com/api/v2/usedtmv/getalltmvbands?styleid={style ID}&zip={zip code}&api_key={api key}

Code Example

You need the Javascript SDK to run this example.

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset=utf-8>
  5. <title>Edmunds API Example</title>
  6. </head>
  7. <body>
  8. <div id="results-body"></div>
  9. <script>
  10. window.sdkAsyncInit = function() {
  11. // Instantiate the SDK
  12. var res = new EDMUNDSAPI('YOUR API KEY');
  13. // Optional parameters
  14. var options = {
  15. "styleid": "200419751",
  16. "zip": 90019
  17. };
  18. // Callback function to be called when the API response is returned
  19. function success(res) {
  20. var body = document.getElementById('results-body');
  21. body.innerHTML = "The Used TMV® Band National Base Price is: " + res.tmvconditions.OUTSTANDING.Current.nationalBasePrice.usedTmvRetail;
  22. }
  23. // Oops, Houston we have a problem!
  24. function fail(data) {
  25. console.log(data);
  26. }
  27. // Fire the API call
  28. res.api('/api/v2/usedtmv/getalltmvbands', options, success, fail);
  29. // Additional initialization code such as adding Event Listeners goes here
  30. };
  31. // Load the SDK asynchronously
  32. (function(d, s, id){
  33. var js, sdkjs = d.getElementsByTagName(s)[0];
  34. if (d.getElementById(id)) {return;}
  35. js = d.createElement(s); js.id = id;
  36. js.src = "path/to/sdk/file";
  37. sdkjs.parentNode.insertBefore(js, sdkjs);
  38. }(document, 'script', 'edmunds-jssdk'));
  39. </script>
  40. </body>
  41. </html>