API Reference

api to fetch vehicle list

This API endpoint fetches vehicle present in the panel.


HTTP Request

https://api.pass.qa/business/v1/orders/getVehicles

Sample Request

<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL            => "https://api.pass.qa/business/v1/orders/getVehicles",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING       => "",
  CURLOPT_MAXREDIRS      => 10,
  CURLOPT_TIMEOUT        => 30,
  CURLOPT_HTTP_VERSION   => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST  => "POST",
  CURLOPT_POSTFIELDS     => null,
  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: 'POST',
  url: baseURL+'/v1/orders/getVehicles',
  headers: 
   { Accept: 'application/json',
     Authorization: 'Bearer '+token,
     'Content-Type': 'application/json' },
  body: null,
  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'}
data = null
response = requests.post(baseUrl+'/v1/orders/getVehicles',json=data, headers=headers)
print(response.json())

Response Descriptions

AttributeDescription
statusIndicates whether the data fertching has been successful or not.
pickupsThe vehicle data can be multiple and exist inside the data object
{
    "status": "success",
    "http-code": 200,
    "message": "Data fetching success!",
    "data": {
        "vehicle": [
            {
                "id": 1,
                "name": "Bicycle",
                "box_size": {
                    "width": "100",
                    "height": "100",
                    "length": "100",
                    "weight": "5"
                },
                "description": null,
                "vehicle_image": ""
            },
            {
                "id": 2,
                "name": "Car",
                "box_size": {
                    "width": "200",
                    "height": "200",
                    "length": "200",
                    "weight": "20"
                },
                "description": null,
                "vehicle_image": ""
            },
            {
                "id": 3,
                "name": "Van",
                "box_size": {
                    "width": "300",
                    "height": "300",
                    "length": "500",
                    "weight": "130"
                },
                "description": null,
                "vehicle_image": ""
            },
            {
                "id": 4,
                "name": "Scooter",
                "box_size": {
                    "width": "150",
                    "height": "150",
                    "length": "150",
                    "weight": "10"
                },
                "description": null,
                "vehicle_image": ""
            }
        ]
    },
    "option": {}
}