Drive Thru Director Reporting API Requirements
Drive Thru Director Reporting API [v4] requirements:
Drive Thru Director version 2.5 or higher.
The device-specific username and password.
The external IP address of the Drive Thru Director device.
Access to the local network of the Drive Thru Director device.
Note
The device-specific username and password are provided by our company upon request.
Connection String
The API connection string is listed below. Replace 192.168.x.y with the local Drive Thru Director IP address.
x = 3rd octet of the IP address.
y = 4th octet of the IP address.
$apiUrl = 'http://192.168.x.y/index.php/api/json-rpc/cars/v4';
Connection String Example
<?php
$apiUrl = 'http://192.168.x.y/index.php/api/json-rpc/cars/v4';
echo "Loading request from " . $argv[1] . PHP_EOL;
$json = file_get_contents($argv[1] . '.json');
$context = stream_context_create(array(
'http' => array(
'ignore_errors' => false,
'method' => 'POST',
'header' => "Content-Type: application/json\r\n".
'Authorization: Basic ' . base64_encode('username:password'),
'content' => $json
)
));
$result = file_get_contents($apiUrl, false, $context);
var_dump($result);