General Questions
Q1 ) What does this id mean? Is this for trip id or ticket number?
Ans ) id in availableTrips response is for TRIP ID
Q2 ) How to get the images of the bus ?
Ans) The images of the seats can be added at the client side if required.
Q3 ) Why the URL's mentioned in the Activities are not working ?
Ans) Do not use the urls directly in the browser this will throw error, Kindly use the urls directly in the code
Q4 )What to do when we are not getting any certain source and destination combinations services for that ?
Ans) Kindly refresh your database frequently , to be updated with all the changes at our end.
Q5 )How can we do test bookings? Can we have testing credentials ?
Ans) All the test bookings are live bookings, you need not use any other credentials. As the test bookings are completely live , you must follow the test guidelines provided in the first mail.
Q6 )We want to add amenities as like in redbus.in , how to get that at our website ?
Ans) The amenities at redbus.in is completely redbus's property , we never share it with the partners , if you want you can implement it at your end.
Q7 )We have changed our server , do we need to make any changes in our API ?
Ans) You need not do anything , just make sure that your server is PUBLIC and you are using your own credentials. API is remotely accessible , irrespective of the server.
Q8 ) We are facing number of "TENTATIVE BOOKING FAILED" errors, what are the causes and how can we reduce it ?
Ans)
CAUSES FOR TENTATIVE BOOKING FAILED :
There can be external dependencies like changes at operator's end , then 'TENTATIVE BOOKING FAILED ERROR' may occur.
Whenever the seat selected is a 'LADIES SEAT' , but the passenger's title is given as 'Mr' or the gender is given as 'MALE' , then 'TENTATIVE BOOKING FAILED ERROR' occurs.
Whenever the data which partners are accessing is stale , then 'TENTATIVE BOOKING FAILED ERROR' occurs.
ID proof is mandatory in some cases , but idtype and idnumber is mandatory in all cases , so even if there is no value to be entered the fields must entered in the JSON request.
HOW TO REDUCE TENTATIVE BOOKING FAILED ERROR...???
Kindly check your JSON request , check if you have mentioned all the necessary fields and given required values.
Make sure if you are booking a ladies seat , it should be booked with title 'Ms' or 'Mrs' and the gender should be mentioned as 'FEMALE' .
Keep refreshing your database every 3-4 hours for all the updates at our end.
Make sure that the IDtype must be written as PAN_CARD, VOTER_CARD, PASSPORT, DRIVING_LICENCE, RATION_CARD, AADHAR.
Q9) What is the average API response time?
Ans) The average API response time is below 1 sec. Worst case response time can be upto 180 sec.
Q10) What is the difference between TIN and PNR?
Ans) TIN is SS tin generated by us. PNR is generated by operator. PNR will be used for validation by vendor.
Q11) How is gender parameter passed in blockTicket() request?
Ans) Only MALE and FEMALE for gender field is accepted in Block request. If there is anything else apart from these values, by default we consider Gender as MALE.
Q12) What is difference between pick up time and prime departure time?
Ans) Pickup time is time for that particular boarding point which is selected at the time of booking for boarding where as the Prime departure time is the main boarding point time which may not be the bus starting point. It can be any boarding point which is selected by the operator.
Q13) How is the cancellation policy calculated?
Ans) Cancellation policy will be calculated from cancellationCalculationTimestamp shared in getTicket() api. On the ticket the cancellation policy and the refund amount shown should be calculated using the value of the param "cancellationCalculationTimestamp" : "yyyy-mm-dd hh:mm:ss".
On the SRP {availableTrips () }, cancellation policy 'CP', will still be calculated using first bp time. It is calculated on the base fare.
Q14) What are the different permissible id types?
Ans) Pan Card, Driving License, Adhaar Card and Ration card are the permissible id types.
Q15) Is there any restriction on no. of seats per transaction?
Ans) We are passing "maxSeatsPerTicket" in getAvailableTrips() and tripDetails(). Kindly consume and implement the same at your end.
Q16) What is the caching time to be used at Partner’s end?
Ans) AvailableTrips() to be cached at an interval of 2hrs except in peak seasons where the suggested refresh interval is 30 mins. Seat layout call to be a live call.
Q17) How to get the customized error message sent by server?
Ans) Please use the below code to read the customized error message to know what’s the exact error that you are getting from our side as we are sharing the same in .net make changes according to your code.
In SSAPIClient.cs page
catch (WebException ex)
{
//reading the custom messages sent by the server
using (var reader = new StreamReader(ex.Response.GetResponseStream()))
{
return reader.ReadToEnd();
}
}
catch (Exception ex)
{
return ex.Message + ex.InnerException + "--error" +
"requestString:::::::::::: " + requestBody;
}"
Q18) What to do in case of bus cancellation?
Ans) Kindly raise a notification from the SS console by Clicking on Bus Cancelled option. The status for particular booking will be sent to the registered email id.
Note: We won't be responding to any emails sent regarding bus cancellations.
Q19) Why are we getting null response in availabletrips Api?
Ans) It's because no bus service is available on the given route and date of journey.
Booking Services
Q1 ) How long we can delay in booking after blocking a seat?
Ans ) You can confirm blocked seats in another 8 minutes of timespan , otherwise you may face error as 'SEAT NO MORE AVAILABLE' error.
Q2 ) How to convert the the below time formats to exact time format like 10:15 A.M, 11:25 P.M etc.
1.[arrivalTime] => 510
2.[departureTime] => 1140
Ans ) Time Format are explained in minutes. We are providing time in Minutes for all the Buses in 'Available Trips' from the start of the day.
Minutes should be divided by 60 to get the time formats.
Consider the below two examples, the time starts from 00:00am.
1)For example if the droping time is 1095
1095/60 = 18 and remainder is 15
Journey Day = 18 /24 = 0
Hour = 18%24 = 18, Minutes = 15
=> 18 hrs 15 min
=> 06:15 pm (same day as doj )
2)For example if the dropping time is 1600
1600/60=26 and remainder is 40
Journey Day = 26/24 = 1
Hour = 26%24 = 2, Minutes = 40
=>2:40am of the next day(next day from doj)
Q3 ) Is there any API to call Seat layout ?
Ans ) The seat layout needs to be generated using the seat array map returned from the API /trip details.
Seat layout: Click here to know more about Seat Layout
Q4 ) What are the length and character restrictions on names and other fields?
Ans ) There is no restriction to the length and character for the "Name" field, it takes 255 characters which is indefinite for almost all practical situations. In case of phone number field it is validated to exactly 10 digits and does not accepts any special characters.
Q5)How to be confirmed if the ticket is blocked or not?
Ans) To confirm this please have a look on the following details:
If the ticket is confirmed then ticket details will be displayed in following order
{
"busType": "Volvo A/C Multi Axle SemiSleeper (2+2)",
"cancellationPolicy": "0:6: 100:0;6:8:60:0;8:10:50:0;10:12:30:0;12 : -1:15:0",
"dateOfIssue": "2013-01-01T10:35:41+05:30",
"destinationCityId": "102",
"doj": "2013-01-02T00:00:00+05:30",
"inventoryId": "100000007324327302",
"inventoryItems": [
{
"fare": "1400.00",
"ladiesSeat": "true",
"passenger": {
"address": "",
"age": "19",
"email": "[email protected]",
"gender": "FEMALE",
"idNumber": "20031307012004",
"idType": "NONE",
"mobile": "9946571567",
"name": "NEETHU SARA MATHEW",
"primary": "true",
"title": "Ms"
},
"seatName": "H1-"
},
{
"fare": "1400.00",
"ladiesSeat": "true",
"passenger": {
"age": "16",
"email": "",
"gender": "FEMALE ",
"mobile": "",
"name": "NIDHI MERLIN MATHEW",
"primary": "false",
"title": "Ms"
},
"seatName": "K3-"
}
],
"partialCancellationAllowed": "true",
"pickUpContactNo": "",
"pickUpLocationAddress": "After Deepa Juction,Opp.hdfc bank",
"pickupLocation": "Deepa Junction",
"pickupLocationId": "48360",
"pickupLocationLandmark": "After Deepa Juction,Opp.hdfc bank",
"pickupTime": "945",
"pnr": "ORED83004-Via Ernakulam Thrissur",
"sourceCityId": "2282",
"status": "BOOKED",
"tin": "SF23300891659",
"travels": "Kallada Travels (Suresh Kallada)"
}
If the ticket is not confirmed the below mentioned error message is shown.
"Error: No confirmed ticket found for the block key"
Also, partners can call checkBookedTicket api. It returns the ticket object if the ticket was confirmed otherwise gives error in standard API format.
Q6) What is the significance of Mticket flag which we are sending in available trips?
Ans ) The Mticket flag which is being sent in getAvailableTrips() method has to be implemented at partner's end.
If this flag is TRUE for a particular operator then Mticket(SMS ticket) will be considered valid and mobile ticket can be produced at the time of journey for that particular operator.
The JSON response is:
{"availableTrips":[{"arrivalTime":"1740","availableSeats":"24","boardingTimes":[{"bpId":"86872","location":"Chandanagar","time":"1290"},{"bpId":"86840","location":"Miyapur","time":"1305"},{"bpId":"250444","location":"Nizampet","time":"1320"},(2+2)","cancellationPolicy":"0:5: 100:0;5:12:40:0;12:24:25:0;24: -1:10:0","departureTime":"1290","droppingTimes":{"bpId":"36795","location":"Police ControlRoom","time":"300"},"fares":"400","id":"100000007994179758","idProofRequired":"false",
"partialCancellationAllowed":"true","travels":"SVKDT TRAVELS","mTicketEnabled":"true"},{"arrivalTime":"1740","availableSeats":"18","boardingTimes":[{"bpId":"203409","location":"Chandanagar","time":"1275"},{"bpId":"203410","location":"Miyapur","time":"1290"}
Q7) What does forcedSeats mean in tripDetails api response?
Ans ) We are sharing forcedSeats property in tripDetails() response with '@' as the delimiter from which you have to take the first part as female reserved seat and the second part as male reserved seats.
"forcedSeats": "femaleseat1,femaleseat2@maleseat1,maleseat2"
Sample Response:
{ "maxSeatsPerTicket": “6”,
“forcedSeats”: ”U11@”,
"seats": [ {"available": "true",
Q8)What is difference between bpname and location sent in availableTrips?
Ans )bpname and location sent in availableTrips() response are different. bpname is only for SRP use in your website whereas location is the exact boarding point name. Kindly use location for fetching the boarding point in the seat layout page
Q9)How to calculate the exact doj to show on customer ticket?
Ans )As we share time in Minutes for all the Buses in 'Available Trips API'. Please refer below three possible cases:
a. if the "pickupTime": "15" and doj: 2022-01-26 in get ticket api response.
- It's Morning service same day travel, Doj will be 2022-01-26 12:15AM or 00:15AM
b. if the "pickupTime": "1295" and doj: 2022-01-26 in get ticket api response. - It's same day travel, Doj will be 2022-01-26 21:35PM or 9:35PM
c. if the "pickupTime": "1500" and doj: 2022-01-26 in get ticket api response. - It's a next day travel, as the pickup time is "1500" that means its more that 24 hrs.
1500/60=25
Journey Day = 25/24 = 1
Hour = 25%24 = 1
=>1:00Am of the next day. So the DOJ will become 2022-01-27 1:00AM
Also, we share a field 'nextDay' in availabletrips api to identify if the service is spanning more than 24 hrs or one day.
Which you can use to call out a next day service on SRP.
"nextDay": "true",
This will help customer to make an informed decision, whether to go ahead for booking or not.
We suggest adding this check at your end in UI, when it's a next day service.
Cancellation Services
Q1 ) How to interpret the cancellation policy string?
Ans ) The entire string is a comma seperated list of having four parts seperated by semi colon.
" From Time : To Time : Cancellation Rate : percentage or absolute."
Case 1 : "0:12: 100:0;12: -1:10:0"
0:12: 100:0; means if the customer cancels the ticket within 12 hours of cancellationCalculationTimestamp then cancellation amount will be 100%. ( e.g. cancellationCalculationTimestamp : 8:00 pm and if we cancel anytime between 8:00am to 8:00 pm then cancellation amount will be 100%)
12: -1:10:0 means if the customer cancel the ticket anytime before 12 hours of cancellationCalculationTimestamp then cancellation amount will be 10%. ( e.g. cancellationCalculationTimestamp: 8:00 pm and if we cancel anytime before 8:00 am then cancellation amount is 10%.)
Case 2 : "8:24:50:0;24:48:25:0;48: -1:10:0"
The ticket is NonCancellable or 100% cancellation charges is applicable if the customer tries to cancel the ticket within 8 hours from cancellationCalculationTimestamp. This is called NonCancellableTime.
Note that if the cancellation policy string starts with a value other than 0, then the ticket is non cancellable up to the mentioned value in (hours) from cancellationCalculationTimestamp. Kindly invoke getTicket() method to fetch the cancellation policy string after confirming the booking.
Cancellation policy will be calculated from cancellationCalculationTimestamp shared in getTicket() method.
On the SRP {availableTrips () }, cancellation policy 'CP', will be calculated using first bp time. It is calculated on the base fare.
Q2 ) Can I cancel list of seats partially?How?
Ans ) Whenever you are cancelling any ticket partially or entirely you need to send the list of all the seat number(s) that are to be cancelled.
Q3 ) Can I cancel the primary passenger ?
Ans) If partial cancellation is not allowed from operator's end you are not authorized to cancel the seat for a particular passenger.
But if the partial cancellation is allowed from operator's end then if the primary passenger is cancelled then whole ticket gets cancelled which is not recommended.
This has to be implemented from partner's end that whenever primary passenger is being cancelled then they have to throw the message that the "primary passenger can not be cancelled".
Q4 ) How can i cancel ticket ...?
Ans ) Make sure that in the below request each seat name should be in double quotes separated by comma as shown below,
CancelTicket api request: {"tin":"SF22989123844","seatsToCancel":["12","11","10","9"]}