Auto Ride Tracking


GET /v1/bookings/track_ride

Location tracking is available for autorickshaws booked by a registered Ola user.

By providing your partner token and a valid authorization code, you can provide your users the following benefits.

  • Track an auto on its way to the pickup point.
  • Get estimated time of arrival to pickup point.
  • Track location of the auto while the trip is in progress
  • Invoice of the ride can be viewed after ride completion.

Name Data Type Description Type
Authorization string Authorization Token identifies the user Header
X-APP-TOKEN string Key which identifies the partner Header

State Diagram of Auto Booking

Auto state diagram

Example Request

GET

https://devapi.olacabs.com/v1/bookings/track_ride?booking_id=KRN100875


  "headers": {
    "Authorization": "Bearer b6121212f12ff12f12f1f12f1f12ff",
    "X-APP-TOKEN": "6a6121212f12ff12f12f1f12f1f12f8c"
  }

Example Response

Allotment Pending


{
  "status": "SUCCESS",
  "request_type": "TRACK_RIDE",
  "booking_id": "KRN100819",
  "booking_status": "PENDING"
} 

Call Driver


{
  "status": "SUCCESS",
  "request_type": "TRACK_RIDE",
  "booking_id": "KRN100819",
  "driver_name": "Name of the driver",
  "driver_number": "9999999999",
  "driver_image_url": "Driver image url",
  "driver_rating": "4.73269",
  "vehicle_type": "auto",
  "vehicle_number": "KA 00 AB 007",
  "driver_lat": 12.9500641,
  "driver_lng": 77.6418138,
  "duration": {
    "value": 4,
    "unit": "MINUTES"
  },
  "distance": {
    "value": 660,
    "unit": "METER"
  },
  "booking_status": "CALL_DRIVER"
}

Trip-Start


{
  "status": "SUCCESS",
  "request_type": "TRACK_RIDE",
  "booking_id": "KRN100819",
  "driver_lat": 12.9500619,
  "driver_lng": 77.6418132,
  "booking_status": "IN_PROGRESS"
}

Invoice State (Billing not done by Ola)


{
  "status": "SUCCESS",
  "request_type": "TRACK_RIDE",
  "booking_id": "KRN100819",
  "ola_money_balance": 0,
  "trip_info": {
    "billing_enabled": false,
    "discount": 0,
    "advance": 0,
    "convenience_charge": 10
  },
  "booking_status": "INVOICE"
}

Invoice State (Billing done by Ola)


{
  "status": "SUCCESS",
  "request_type": "TRACK_RIDE",
  "booking_id": "KRN100819",
  "ola_money_balance": 0,
  "trip_info": {
    "billing_enabled": true,
    "amount": 30,
    "payable_amount": 30,
    "distance": {
      "value": 0,
      "unit": "KMS"
    },
    "trip_time": {
      "value": 0,
      "unit": "MINUTE"
    },
    "discount": 0,
    "advance": 0,
    "convenience_charge": 10,
    "night_charges_applied": false,
    "night_charge_ratio": "NA"
  },
  "booking_status": "INVOICE"
}

Ride Completed State (Billing not done by Ola)


{
  "status": "SUCCESS",
  "request_type": "TRACK_RIDE",
  "booking_id": "KRN100819",
  "pickup_time": "2016-04-06T18:31:46+05:30",
  "ola_money_balance": 0,
  "trip_info": {
    "billing_enabled": false,
    "discount": 0,
    "advance": 0,
    "convenience_charge": 10
  },
  "booking_status": "COMPLETED"
}

Ride Completed State (Billing done by Ola)


{
  "status": "SUCCESS",
  "request_type": "TRACK_RIDE",
  "booking_id": "KRN100819",
  "pickup_time": "2016-03-23T15:57:18+05:30",
  "ola_money_balance": 0,
  "trip_info": {
    "billing_enabled": true,
    "amount": 30,
    "distance": {
      "value": 0,
      "unit": "KMS"
    },
    "ride_time": {
      "value": 0,
      "unit": "MINUTE"
    },
    "discount": 0,
    "cash_paid": 30,
    "advance": 0,
    "convenience_charge": 10,
    "night_charges_applied": false,
    "night_charge_ratio": "NA"
  },
  "booking_status": "COMPLETED"
}

Track ride in case of booking cancelled response


{
  "status": "SUCCESS",
  "request_type": "TRACK_RIDE",
  "booking_id": "KRN100819",
  "booking_status": "BOOKING_CANCELLED"
}

Track ride in case of allotment retrying

This happens when one driver after accepting the booking cancels it in first 45 secs. For a booking, allotment retry can happen just once.


{
  "status": "SUCCESS",
  "request_type": "TRACK_RIDE",
  "booking_id": "KRN100819",
  "booking_status": "ALLOTMENT_RETRYING"
}

Track ride in case of allotment failure

This happens when no driver accepts the booking or when no driver accepts after allotment retrying state.


{
  "status": "SUCCESS",
  "request_type": "TRACK_RIDE",
  "booking_id": "KRN100819",
  "booking_status": "ALLOTMENT_FAILED"
}