Skip to content

API endpoints and outputs

Shubham Dokania edited this page Jul 7, 2015 · 22 revisions

========================================================= TRAVEL

GET /api/travel/cabs
Parameters :

lat: 28.7765
lng: 77.2345

Output :

[
    {
        "display_name": "uberGO",
        "product_id": "c8170d76-b67c-44b1-8c26-5f45541434d2",
        "price_per_km": 7,
        "min_price": 60,
        "provider": "Uber",
        "time_of_arrival": 12
    },
    {
        "display_name": "Hatchback",
        "product_id": "",
        "price_per_km": "16",
        "min_price": "50",
        "provider": "TaxiForSure",
        "time_of_arrival": 2
    },
    {
        "display_name": "Hatchback",
        "product_id": "",
        "price_per_km": "16",
        "min_price": "50",
        "provider": "TaxiForSure",
        "time_of_arrival": 3
    },
    {
        "display_name": "Sedan",
        "product_id": "",
        "price_per_km": "16",
        "min_price": "50",
        "provider": "TaxiForSure",
        "time_of_arrival": 4
    }
]

================================================================ BUS

GET /api/travel/bus Parameters:

src: "Delhi"
dest: "Amritsar"
date: "09-07-2015" (DD-MM-YYYY)

Output :

[
  {
    'origin': '',
    'destination': '',
    'seat': '',
    'duration': '',
    'condition': '',
    'fare': '',
    'bustype': '',
    'travelagency': '',
    'arrdate': '',
    'depdate': ''
  },  
]

========================================================================== GEO

GET /geo

Parameters:

location = "Rohini, Delhi"

output=:

[
  {
     "country": "India",
     "city": "Rohini Sector 28, New Delhi",
     "area": "Delhi",
     "PLZ": "110042",
     "street": "",
     "house_no": "",
     "POI": "",
     "type": "15",
     "phone": "",
     "lng": 77.10420727729797,
     "lat": 28.7578307662807,
     "formatted_address": "Rohini Sector 28, New Delhi, Delhi 110042, India"
  },
  
]

========================================================================== FLIGHT

GET /api/travel/flight

Parameters:

src = "DEL"  (IATA code)
dest = "BOM" (IATA code)
date = "09-07-2015" (DD-MM-YYYY)
adults = "69"

output=:

[
  {
      "origin": "DEL",
      "fare": 5996,
      "flightnum": "153",
      "warnings": "Refundable",
      "destination": "BOM",
      "duration": "2h 5m",
      "airline": "spicejet",
      "seatingclass": "E",
      "depdate": "2015-06-23t0840",
      "arrdate": "2015-06-23t1045"
  },
]

======================================================================== FOOD

-Restaurants

GET /api/food/restaurants
GET /api/food/cafe
GET /api/food/bar

Parameters :

lat: 28.7765
lng: 73.4325

Output :

[
{
"distance": 921,
"name": "The Oberoi, Gurgaon",
"lng": 77.088276,
"address": "No.443, Udyog Vihar, Phase 5, Beside Trident Hotel, Gurgaon",
"lat": 28.502015,
"type": [
"night_club",
"bar",
"restaurant",
"lodging",
"food",
"spa",
"health",
"establishment"
],
"id": "ChIJVVVVFUIZDTkRZHBDeKJ5H_8"
},
{
"distance": 362,
"name": "Route04",
"lng": 77.092223,
"address": "Ground Floor, Tower E, DLF Cybergreens, Gurgaon",
"lat": 28.493512,
"type": [
"restaurant",
"food",
"establishment"
],
"id": "ChIJ2WlhdDcZDTkRkjkETFqaXjU"
},
]

========================================================= SHOPPING OFFERS

GET /api/shop/offers
Parameters :

None

Output :

[
    {
      "title": "Min. 50% Off",
      "description": "Men's Footwear",
      "url": "http://dl.flipkart.com/dl/promotion/pr?offer=s:88cjeouxt4pkgh44:c:058247b627.&sid=osp,cil&affid=shubhamgr1",
      "imageUrls": [
        {
          "url": "http://img5a.flixcart.com/image/shoe/w/3/c/brown-new-209-bacca-bucci-40-original-imaeyfr5ysfce9qa.jpeg"
        }
      ],
      "availability": "In-stock"
    }
]

========================================================= SHOPPING SEARCH

GET /api/shop/search
Parameters :

q: search query <Type:String>

Output :

[
  {
    "productDescription": "Magnetic Compass 3 inches Big Size",
    "styleCode": null,
    "title": "Rudham Magnetic 3 Inches Big Compass",
    "color": "[Silver]",
    "productId": "COSE3WZKBRDFVKNG",
    "codAvailable": true,
    "emiAvailable": null,
    "sizeUnit": "",
    "productUrl": "http://dl.flipkart.com/dl/rudham-magnetic-3-inches-big-compass/p/itme3wzkkezyhkqh?pid=COSE3WZKBRDFVKNG&affid=shubhamgr1",
    "offers": [],
    "cashBack": null,
    "colorVariants": null,
    "inStock": true,
    "maximumRetailPrice": {
      "currency": "INR",
      "amount": 299
    },
    "productBrand": "Rudham",
    "size": null,
    "imageUrls": {
      "125x125": "http://img5a.flixcart.com/image/compass/k/n/g/rdcmpss-rudham-magnetic-3-inches-big-125x125-imae3wrentbpgzcg.jpeg",
      "unknown": "http://img5a.flixcart.com/image/compass/k/n/g/rdcmpss-rudham-magnetic-3-inches-big-original-imae3wrentbpgzcg.jpeg",
      "100x100": "http://img5a.flixcart.com/image/compass/k/n/g/rdcmpss-rudham-magnetic-3-inches-big-100x100-imae3wrentbpgzcg.jpeg",
      "40x40": "http://img5a.flixcart.com/image/compass/k/n/g/rdcmpss-rudham-magnetic-3-inches-big-40x40-imae3wrentbpgzcg.jpeg",
      "275x275": "http://img5a.flixcart.com/image/compass/k/n/g/rdcmpss-rudham-magnetic-3-inches-big-275x275-imae3wrentbpgzcg.jpeg",
      "75x75": "http://img5a.flixcart.com/image/compass/k/n/g/rdcmpss-rudham-magnetic-3-inches-big-75x75-imae3wrentbpgzcg.jpeg",
      "200x200": "http://img5a.flixcart.com/image/compass/k/n/g/rdcmpss-rudham-magnetic-3-inches-big-200x200-imae3wrentbpgzcg.jpeg",
      "400x400": "http://img6a.flixcart.com/image/compass/k/n/g/rdcmpss-rudham-magnetic-3-inches-big-400x400-imae3wrentbpgzcg.jpeg"
    },
    "sizeVariants": "[]",
    "discountPercentage": 53,
    "sellingPrice": {
      "currency": "INR",
      "amount": 140
    }
  }
]

========================================================= FOOD FOR MICROMAX

GET /api/foodmmx/nearme
Parameters :

lat: 28.7765
lng: 77.2345

Output :

[
  {
    "result": {
      "distance_actual": 1009.2104887786,
      "cuisines": "North Indian",
      "has_emirates_discount": 0,
      "has_discount": 0,
      "has_coordinates": 1,
      "id": "302302",
      "distance_friendly": "about 1.00 km",
      "city": "New Delhi",
      "votes": 63,
      "locality": "Rohini",
      "has_bar": 0,
      "has_delivery": 1,
      "latitude": 28.731374,
      "has_dine_in": 1,
      "rating_text": "Excellent",
      "cost_for_two": 400,
      "rating_aggregate": 4.2,
      "address": "CSC 5, Near D3 DDA Market, Behind Veera Jain Hospital, Sector 11, Rohini, New Delhi",
      "name": "Ropad Punjab Walo Ka Dhaba",
      "longitude": 77.109982,
      "accepts_credit_card": 0,
      "has_citibank_discount": 0,
      "is_pure_veg": 1,
      "has_menu": 1,
      "rating_color": "3F7E00",
      "user_review_count": 29,
      "rating_editor_overall": 0
    }
  }
]

========================================================= MICROMAX FOOD DETAILS

GET /api/foodmmx/details
Parameters :

id: id of restaurant<string/int>

Output :

{
  "reservation_text": "",
  "takeaway_flag": 0,
  "cuisines": "North Indian",
  "opening_soon_flag": 0,
  "nightlife_flag": 0,
  "establishment_types": [
    {
      "establishment_type": {
        "id": 21,
        "name": "Quick Bites"
      }
    }
  ],
  "is_open_now": 0,
  "userRating": {
    "aggregate": "4.2",
    "votes": 53,
    "rating_text": "Excellent",
    "rating_color": "3F7E00"
  },
  "bar_wineandbeer_flag": 0,
  "sports_bar_flag": 0,
  "entry_fee": "",
  "id": 302302,
  "outdoor_seating_flag": 0,
  "hasWifi": 0,
  "bar_byob_flag": 0,
  "group": [],
  "hasBar": 0,
  "cost_of_beer": 0,
  "serves_veg_flag": 0,
  "serviceCharge": 0,
  "bar_fullbar_flag": 0,
  "sheesha_flag": 0,
  "location": {
    "city": "New Delhi",
    "locality": "Rohini",
    "city_id": 1,
    "zipcode": "",
    "longitude": "77.1099820000",
    "address": "CSC 5, Near D3 DDA Market, Behind Veera Jain Hospital, Sector 11",
    "latitude": "28.7313740000"
  },
  "stag_entry_flag": 0,
  "isPureVeg": 1,
  "buffet_details": "",
  "hasAC": 0,
  "vat": 0,
  "bar_wineonly_flag": 0,
  "happy_hour_details": "",
  "status_id": 1,
  "hasDelivery": 1,
  "phone": "011 27572383, 011 42051241",
  "acceptsCreditCards": 0,
  "hasDineIn": 1,
  "halal_flag": 0,
  "serves_nonveg_flag": 0,
  "userReviews": {
    "0": {
      "review": {
        "rating": 4,
        "rating_5": 4,
        "author": "Sachin Garg",
        "timestamp": 1435504020,
        "reviewText": "I would highly recommend this Punjabi Dhaba in case you want a real Dhaba feel in Rohini area.\\\nAwesome food, I tried Dal Makhni, Chhole and Palak Paneer, and Lachchha Parantha/ Roti everything was good. I would say Kadi Pakoda needs a little improvement.\\\n\\\nService was excellent, waiter was wearing smile on his face and listening the order carefully.\\\n\\\nFood served to us was piping hot. This is what I like the most about the Dhaba.\\\n\\\nReal value for money, they also offer half portions and that is good quantity.\\\n\\\nThe DDA market it is located has 2 other Dhabas also but don't get confused. It is at the Back side and displays the Signboard as &quot;Punjabi Dhaba&quot; only. \\\n\\\n&quot;Cake cutting is not allowed here&quot;\\\n\\\nThe owner and staff asked for the feedback  after I finished and also interested to listen to the comments. If the weather is cool, it's very good. A Thumbs up from my side.",
        "id": "24126705",
        "ratingColor": "5BA829",
        "reviewTimeFriendly": "4 days ago",
        "reviewTime": "2015-06-28 20:37:00"
      }
    },
    "1": {
      "review": {
        "rating": 4,
        "rating_5": 4,
        "author": "Saurabh Chawla",
        "timestamp": 1435412133,
        "reviewText": "Great Dhaba Food. One of a kind in Rohini. You would actually get the taste of Punjab in the Desi Ghee Items of theirs. But Lachha Paranthas were a let down. Nonetheless one must try this place out. ",
        "id": "24114373",
        "ratingColor": "5BA829",
        "reviewTimeFriendly": "5 days ago",
        "reviewTime": "2015-06-27 19:05:33"
      }
    },
    "2": {
      "review": {
        "rating": 5,
        "rating_5": 4.5,
        "author": "Harsh Relan",
        "timestamp": 1435406664,
        "reviewText": "I am writing about this place after 2 years i had dinner over there . What a place , this was one of the best thing in my collage life . I use to visit there almost every night for dinner , very economical and best taste in surrounding area . Its the best food joint in sector 11  .",
        "id": "24113518",
        "ratingColor": "3F7E00",
        "reviewTimeFriendly": "5 days ago",
        "reviewTime": "2015-06-27 17:34:24"
      }
    },
    "3": {
      "review": {
        "rating": 4,
        "rating_5": 4,
        "author": "Rohit Bhateja",
        "timestamp": 1433610131,
        "reviewText": "A Zomato-Find !! Had no idea about it anyhow. Was difficult to find and has a typical dhaba setting. Coming over to food, ordered veg food and it was delicious (kadi, dal, paneer and malai kofta). It was a pleasant surprise for the family. Taste was good and so was the immediate service. Can try for a change and enjoy the dhaba service. Great option ! ",
        "id": "23915391",
        "ratingColor": "5BA829",
        "reviewTimeFriendly": "26 days ago",
        "reviewTime": "2015-06-06 22:32:11"
      }
    },
    "4": {
      "review": {
        "rating": 4,
        "rating_5": 4,
        "author": "Jaideep Jain",
        "timestamp": 1433581322,
        "reviewText": "After such a long wait, finally a dhaba in rohini with excellant taste of food and true to its dhaba value.\\\n\\\nAnything you order will be amazing. It looks little different than u expect, but it will be an amazing relishment.",
        "id": "23910627",
        "ratingColor": "5BA829",
        "reviewTimeFriendly": "26 days ago",
        "reviewTime": "2015-06-06 14:32:02"
      }
    },
    "count": 29,
    "review_url": "https://www.zomato.com/ncr/restaurants/north-delhi/rohini/ropad-punjab-walo-ka-dhaba-302302/reviews#tabtop"
  },
  "name": "Ropad Punjab Walo Ka Dhaba",
  "photos": {
    "photos_url": "https://www.zomato.com/ncr/restaurants/north-delhi/rohini/ropad-punjab-walo-ka-dhaba-302302/photos#tabtop"
  },
  "url": "https://www.zomato.com/ncr/restaurants/north-delhi/rohini/ropad-punjab-walo-ka-dhaba-302302",
  "timings": "12 Noon to 4 PM, 7 PM to 10:30 PM",
  "smoking_area_flag": 0,
  "menu": {
    "menu_url": "https://www.zomato.com/ncr/restaurants/north-delhi/rohini/ropad-punjab-walo-ka-dhaba-302302/menu#tabtop"
  },
  "meal_coupon_flag": 0,
  "avgCostForTwo": 400,
  "hasLiveMusic": 0
}

========================================================= FOOD ORDERS

GET /api/food/order
Parameters :

lat: latitude
lng: longitude

OR

id: id of the location

Output :

{
  "area_id": "134144",
  "restaurants": [
    {
      "rating": 4.2,
      "code": "v7ba",
      "chain": {
        "id": 0,
        "name": null
      },
      "review_number": 95,
      "is_delivery_enabled": true,
      "food_characteristics": [],
      "web_path": "https://www.foodpanda.in/restaurant/v7ba/silbatta-pure-veg",
      "is_test": false,
      "minimum_order_amount": 300,
      "logo": "http://ir0.mobify.com/jpg/%s/%s/http://assets.foodpanda.in/images/vendors/v7ba.jpg?v=20150314112326",
      "url_key": "silbatta-pure-veg",
      "id": 20106,
      "address_line2": null,
      "city": {
        "is_top_city": null,
        "url_key": "delhi",
        "id": 1,
        "name": "Delhi"
      },
      "is_service_tax_visible": false,
      "vat_percentage_amount": 5,
      "menus": [],
      "schedules": [],
      "is_preorder_enabled": true,
      "discounts": [],
      "custom_location_url": null,
      "cuisines": [],
      "latitude": 28.636852,
      "special_days": [],
      "metadata": null,
      "website": "",
      "is_vat_visible": false,
      "minimum_delivery_fee": 20,
      "post_code": "110027",
      "description": null,
      "is_vat_included_in_product_price": true,
      "minimum_pickup_time": 45,
      "customer_phone": "",
      "is_replacement_dish_enabled": true,
      "redirection_url": null,
      "is_vat_disabled": false,
      "payment_types": [],
      "address": "1 & 2 , 1/108 , Subhash Nagar , New Delhi",
      "is_pickup_enabled": true,
      "service_tax_percentage_amount": 0,
      "name": "Silbatta (Pure Veg.)",
      "longitude": 77.112503,
      "is_checkout_comment_enabled": true,
      "customer_type": "all",
      "is_service_tax_enabled": false,
      "is_voucher_enabled": true,
      "minimum_delivery_time": 90,
      "is_service_fee_enabled": true,
      "service_fee_percentage_amount": "0.00"
    }
  ]
}