Tracking the driver with our live routing API
Once you successfully have created an order, you will be able to watch the Pass driver on a live map.
The driver's location and order status will be change as the driver is moving.
HTTP Request
https://api.pass.qa/api/map-view/{order_id}
Sample Request
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pass.qa/api/map-view/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ".$token,//$token is your token created in dashboard.
"Content-Type: application/json; charset=utf-8",
"Accept: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo 'cURL Error #:' . $err;
} else {
echo $response;
}
var request = require("request");
var token = 'mytokenvalue' //token value to be placed here;
var baseURL = 'https://api.pass.qa/api/';
var options = { method: 'GET',
url: baseURL+'map-view/{order_id}',
headers:
{ Accept: 'application/json',
Authorization: 'Bearer '+token,
'Content-Type': 'application/json' },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import requests
token = 'your token'
baseUrl ='https://api.pass.qa/api/'
headers = {'Authorization': 'Bearer '+token,'Accept':'application/json','Content-Type':'application/json'}
response = requests.get(baseUrl+'map-view/{order_id}', headers=headers)
print(response.json())
Response Descriptions
Attribute | Description |
---|---|
Note | This is a web page URL , this web page contains order tracking, Order cancellation, individual task information along with task cancellation option. |