PHP code example of marketscan / mscan

1. Go to this page and download the library: Download marketscan/mscan library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

marketscan / mscan example snippets


$mscan = new \MarketScan\MScan(
  'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa',
  '000000',
  'http://integration.marketscan.com/mscanservice/rest/mscanservice.rst/?'
);

$mscan->GetVehiclesByVINParams('1G1YB2D73G5121725');

$mscan->GetVehiclesByVINParams([
  'Vin' => '1G1YB2D73G5',
  'IsNew' => true
]);

$mscan->GetMakes(true);
$mscan->GetModels(true);

$mscan->GetManufacturers();

$mscan->GetManufacturer($vehicle_id);

$mscan->GetMarketByZIP(68123);

$mscan->api_request(
  'api method name',
  'GET or POST',
  'string to append to the URL',
  'data to JSON encode and POST in the request body'
);