My Rides


GET /v1/bookings/my_rides

Can be used to see the status of your current active and past rides. This is something just like 'Your Rides' page in Ola App.


Request Parameters

Name Data Type Description Type
page integer

[Optional] Response is paginated with most recent bookings first having 3 bookings per page

Default value: 1

Payload
Authorization string Authorization Token identifies the user Header
X-APP-TOKEN string Key which identifies the partner Header
Content-Type string "application/json" to be passed Header

Example Request

GET

https://devapi.olacabs.com/v1/bookings/my_rides?page=2


"headers": {
  "Authorization": "Bearer baac2c11212ff1212f212fbff24bf",
  "X-APP-TOKEN": "6a53bcbe112f1212f121221f1f12f122f1f8c"
}

Example Response


{
  "bookings": [
    {
      "status": "SUCCESS",
      "booking_id": "CRN123456789",
      "pickup_lat": 12.825954,
      "pickup_lng": 77.60356,
      "drop_lat": 0,
      "drop_lng": 0,
      "booking_status": "BOOKING_CANCELLED",
      "booking_time": "Fri, 16 Sep 2016 20:32:28 IST +05:30",
      "category": "mini",
      "merchant_txn_id": "Aabc-12a123if-123123a"
    },
    {
      "status": "SUCCESS",
      "booking_id": "CRN123456789",
      "pickup_lat": 28.581828,
      "pickup_lng": 77.1864273,
      "drop_lat": 28.521828,
      "drop_lng": 77.186427,
      "booking_status": "COMPLETED",
      "booking_time": "Thu, 01 Sep 2016 00:01:22 IST +05:30",
      "category": "mini",
      "merchant_txn_id": "Aabc-12123if-681gda1"
    }
  ]
}

Guidelines:

  • Key "merchant_txn_id" is visible if it was passed while creating the booking. Use it to check for a particular booking in my rides.
  • This API can come to your rescue when for some or the other reason booking create request fails. You can call this and check if you have any active ride or not. This is something that should be implemented to give consumer a hassle free experience.
  • Also note that, this API is going to have a stricter rate limiting as it has a longer response time.