API Reference

api to fetch pickups

This endpoint retrieves a list of pickup locations that are associated with a specific business.


HTTP Request

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

Sample Request

<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL            => "https://api.pass.qa/business/v1/orders/getPickups",
  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/getPickups',
  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/getPickups',json=data, headers=headers)
print(response.json())

Response Descriptions

AttributeDescription
statusIndicates whether the data fertching has been successful or not.
pickupsThe pickups data can be multiple and exist inside the data object
{
    "status": "success",
    "http-code": 200,
    "message": "Data fetching success!",
    "data": {
        "pickups": [
            {
                "id": 9,
                "user_id": 8779,
                "location": "Doha",
                "latitude": "25.28418527596853",
                "longitude": "51.52664580419922",
                "created_at": "2024-07-31T09:14:29.000000Z",
                "updated_at": "2024-07-31T09:14:29.000000Z",
                "def_import": 0
            }
        ]
    },
    "option": {}
}