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/business/v1/orders/{ORDER_ID}/eta
Sample Request
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pass.qa/business/v1/orders/{ORDER_ID}/eta",
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/business';
var options = { method: 'GET',
url: baseURL+'/v1/orders/{ORDER_ID}/eta',
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/business'
headers = {'Authorization': 'Bearer '+token,'Accept':'application/json','Content-Type':'application/json'}
response = requests.get(baseUrl+'/v1/orders/{ORDER_ID}/eta', headers=headers)
print(response.json())
Response Descriptions
Attribute | Description |
---|---|
status | Indicates whether the progress has been successful or not. |
eta | The remaining time of the driver's arrival to either pickup or dropoff points. |
route | The route that driver is taking. Route is given in coordinates for your usage. |
distance | The distance left to reach either the pickup or dropoff points based on kilometers (km). |
{
"status": "success",
"message": "routing information",
"data": {
"eta": "11 min left",
"route": "25.281717,51.502487|25.282097,51.502593|25.282507,51.502809|25.28262,51.502892|25.282554,51.503851|25.283013,51.503866|25.283084,51.503875|25.283127,51.503896|25.283163,51.503924|25.283197,51.503992|25.283226,51.504079|25.283396,51.50483|25.28357,51.505581|25.283562,51.505659|25.283547,51.505706|25.283523,51.505748|25.283483,51.505791|25.283399,51.505857|25.28277,51.506057|25.282543,51.506121|25.282307,51.506186|25.28174,51.506361|25.281685,51.506382|25.281578,51.506418|25.281526,51.506436|25.281456,51.506459|25.281244,51.50653|25.280909,51.50665|25.280483,51.506825|25.280094,51.506984|25.279844,51.507072|25.279148,51.507308|25.278903,51.507404|25.278871,51.507416|25.278766,51.507453|25.278716,51.507471|25.278682,51.507483|25.27848,51.507555|25.278252,51.50764|25.277717,51.507818|25.277177,51.50801|25.276393,51.50828|25.276331,51.5083|25.275799,51.508492|25.275691,51.508531|25.275532,51.508589|25.275383,51.508648|25.275102,51.508764|25.274656,51.508972|25.274505,51.50905|25.273786,51.509598|25.27349,51.509829|25.27312,51.510124|25.27278,51.510426|25.272554,51.510632|25.2725,51.510685|25.272492,51.510693|25.272424,51.510757|25.272364,51.510819|25.272349,51.510836|25.27234,51.510848|25.272331,51.510858|25.272323,51.510871|25.272314,51.510886|25.272309,51.510898|25.272303,51.510916|25.2723,51.510932|25.272299,51.510949|25.2723,51.510967|25.272303,51.510986|25.272306,51.510997|25.272313,51.511015|25.272331,51.511052|25.272363,51.511096|25.272386,51.511128|25.272752,51.511624|25.273397,51.512452|25.273491,51.512559|25.273694,51.512795|25.273934,51.513075|25.274413,51.513632|25.274571,51.513815|25.274999,51.514315|25.275346,51.514723|25.275375,51.514758|25.275405,51.514792|25.275977,51.515436|25.276123,51.515628|25.276167,51.515687|25.276216,51.515755|25.276729,51.516342|25.277101,51.516712|25.277164,51.516779|25.277207,51.516826|25.277246,51.516874|25.277638,51.51738|25.277919,51.517783|25.278164,51.518132|25.279152,51.519697|25.27926,51.51987|25.280075,51.521276|25.280312,51.521735|25.28042,51.521932|25.280783,51.522643|25.281084,51.523179|25.281242,51.523435|25.281406,51.523688|25.281583,51.523958|25.281626,51.524023|25.281778,51.524431|25.281797,51.524488|25.281817,51.52456|25.281828,51.524621|25.281834,51.524664|25.281834,51.524707|25.28183,51.52475|25.281822,51.524792|25.281808,51.524833|25.281681,51.524956|25.281591,51.52505|25.281475,51.525169|25.281316,51.525345|25.281161,51.525529|25.280685,51.526058|25.2804,51.526379|25.280381,51.526405|25.280313,51.526494|25.280189,51.526665|25.28011,51.526784|25.280035,51.526906|25.279948,51.527057|25.279833,51.52729|25.279759,51.52745|25.279701,51.527602|25.279646,51.527757|25.279567,51.528005|25.279516,51.52819|25.279485,51.528337|25.279448,51.528535|25.279429,51.528659|25.279416,51.528765|25.279412,51.528812|25.279393,51.52901|25.279388,51.529075|25.279379,51.529329|25.27938,51.529477|25.279384,51.529927|25.279385,51.530081|25.279391,51.530374|25.279391,51.531002|25.279389,51.531532|25.279386,51.531818|25.279387,51.531832|25.279396,51.532138|25.279405,51.532326|25.279439,51.532987|25.279451,51.533263|25.279485,51.533909|25.279497,51.534033|25.279517,51.534179|25.279543,51.534335|25.279566,51.534463|25.2796,51.534596|25.279626,51.534679|25.279591,51.535024|25.279587,51.535058|25.27958,51.535107|25.279576,51.535125|25.279573,51.535142|25.27956,51.535195|25.27955,51.53523|25.279534,51.535269|25.279513,51.535308|25.279489,51.535342|25.279462,51.535378|25.279428,51.535419|25.279353,51.535454|25.279211,51.535524|25.279045,51.535618|25.279008,51.535641|25.278825,51.535754|25.278664,51.535862|25.278555,51.535948|25.278417,51.536067|25.278245,51.536238|25.278105,51.536387|25.278079,51.536414|25.278039,51.536459|25.277893,51.536628|25.277754,51.536794|25.277641,51.536932|25.277426,51.53721|25.277397,51.537251|25.277339,51.537339|25.276831,51.538049|25.276504,51.538489|25.276245,51.538706|25.276222,51.538723|25.276194,51.538741|25.276162,51.538759|25.276121,51.53878|25.276077,51.538797|25.276046,51.538807|25.275999,51.538818|25.275964,51.538822|25.275936,51.538821|25.275908,51.538818|25.275873,51.538814|25.275698,51.538634|25.275673,51.538607|25.275623,51.538547|25.275538,51.538444|25.275411,51.538261|25.275286,51.538036|25.275212,51.537855|25.275122,51.537609|25.275056,51.537399|25.274996,51.537137|25.274964,51.536869|25.274944,51.536523|25.274913,51.535551|25.274905,51.535325|25.274898,51.535148",
"distance": "5.71"
}
}