Bus Search
This method gives the list of bus services from the specified source city to the destination city on a specified date.
Parameters
Name
Description
Accept
string
( header )
Must be application/json
Accept - Encoding
string
( header )
Must be gzip
Authorization
string
( header )
Must be Your PID
Must be Your API Key
Customer-Ip
string
( header )
Must be IP address of the customer, as captured by your integration. Send IPV4 addresses only.
Ensure your integration passes the customer’s IP, not your own. This value helps determine their location and other settings.
Also used for fraud recovery and other important analytics.
action
string
( query )
Must be "busSearch" as parameter
Action methods in Web API controller can have one or more parameters of different types. It can be either primitive type or complex type. Web API binds action method parameters either with URL's query string or with request body depending on the parameter type.
apiKey
string
( query )
Must be a valid API Key
The API Key provided to you is critical to the security of your request data – treat it like a password. Never include the raw value in any publicly accessible site or app code. You will be provided with an API key when you are approved to integrate TPS API.
mode
string
( query )
Must be either "Test" or "LIVE"
Your application must be approved from Adivaha Personnel. All the transactions will be treated as LIVE once the parameter is set to LIVE.
requestBody
array
( query )
Must be an array with the following parameters
origin_id
string
( query )
City ID of Origin City Ex: 8463 (City ID for Bangalore)
destination_id
string
( query )
City ID of Destination City Ex: 9573 (City ID for Hyderabad)
depart_date
string
( query )
Travel Date. Must follow YYYY-MM-DD format. ie. "depart_date:2021-09-09"
REQUEST
API Endpoint: https://abengines.com/api/v1/travel-api/bus.php
header: array( 'Content-Type:application/json', 'Accept-encoding: gzip', 'PID:'ADD-YOUR-KEY', 'x-api-key:'ADD-YOUR-KEY' ); POST: { "action": "busSearch", "mode": "Test", "origin_id": "8463", "destination_id": "9573", "depart_date": "2021-09-09" }
Response
The API returns an HTTP response, which generally includes the result of the request invocation
{ "status": "200", "status_message": "OK", "responseData": { "BusSearchResult": { "ResponseStatus": 1, "Error": { "ErrorCode": 0, "ErrorMessage": "" }, "Destination": "Hyderabad", "Origin": "Bangalore", "TraceId": "95220686-46d3-467c-b027-d94c562ccc6e", "BusResults": [ { "ResultIndex": 13, "ArrivalTime": "2021-09-10T04:00:00", "AvailableSeats": 20, "DepartureTime": "2021-09-09T18:00:00", "RouteId": "2000000139040054664", "BusType": "Volvo A/C Seater (1+1)", "ServiceName": "Seat Seller", "TravelName": "TESTING ACCOUNT", "IdProofRequired": false, "IsDropPointMandatory": false, "LiveTrackingAvailable": false, "MTicketEnabled": true, "MaxSeatsPerTicket": 6, "OperatorId": 10419079, "PartialCancellationAllowed": true, "BoardingPointsDetails": [ { "CityPointIndex": 1, "CityPointLocation": "Domlur", "CityPointName": "Domlur", "CityPointTime": "2021-09-09T18:00:00" } ], "DroppingPointsDetails": [ { "CityPointIndex": 1, "CityPointLocation": "Abids", "CityPointName": "Abids", "CityPointTime": "2021-09-10T04:00:00" } ], "BusPrice": { "CurrencyCode": "INR", "BasePrice": 5.28, "Tax": 0, "OtherCharges": 0, "Discount": 0, "PublishedPrice": 5.28, "PublishedPriceRoundedOff": 5, "OfferedPrice": 5.02, "OfferedPriceRoundedOff": 5, "AgentCommission": 0.26, "AgentMarkUp": 0, "TDS": 0.11, "GST": { "CGSTAmount": 0, "CGSTRate": 0, "CessAmount": 0, "CessRate": 10, "IGSTAmount": 0, "IGSTRate": 18, "SGSTAmount": 0, "SGSTRate": 0, "TaxableAmount": 0 } }, "CancellationPolicies": [ { "CancellationCharge": 10, "CancellationChargeType": 2, "PolicyString": "Till 13:00 on 08 Sep 2021", "TimeBeforeDept": "29$-1", "FromDate": "2021-08-13T12:26:31", "ToDate": "2021-09-08T13:00:00" }, { "CancellationCharge": 50, "CancellationChargeType": 2, "PolicyString": "Between 13:00 on 08 Sep 2021 - 01:00 on 09 Sep 2021", "TimeBeforeDept": "17$29", "FromDate": "2021-09-08T13:00:00", "ToDate": "2021-09-09T01:00:00" }, { "CancellationCharge": 100, "CancellationChargeType": 2, "PolicyString": "After 01:00 on 09 Sep 2021", "TimeBeforeDept": "0$17", "FromDate": "2021-09-09T01:00:00", "ToDate": "2021-09-10T04:00:00" } ] }, { "ResultIndex": 1, "ArrivalTime": "2021-09-09T21:00:00", "AvailableSeats": 28, "DepartureTime": "2021-09-09T01:00:00", "RouteId": "2000000139040079020", "BusType": "Volvo A/C Sleeper (2+2)", "ServiceName": "Seat Seller", "TravelName": "TESTING ACCOUNT", "IdProofRequired": false, "IsDropPointMandatory": false, "LiveTrackingAvailable": false, "MTicketEnabled": true, "MaxSeatsPerTicket": 6, "OperatorId": 10419079, "PartialCancellationAllowed": true, "BoardingPointsDetails": [ { "CityPointIndex": 1, "CityPointLocation": "Domlur I Stage", "CityPointName": "Domlur I Stage (Pickup Bus)", "CityPointTime": "2021-09-09T01:00:00" } ], "DroppingPointsDetails": [ { "CityPointIndex": 1, "CityPointLocation": "Anand Bagh", "CityPointName": "Anand Bagh", "CityPointTime": "2021-09-09T21:00:00" } ], "BusPrice": { "CurrencyCode": "INR", "BasePrice": 8.45, "Tax": 0, "OtherCharges": 0, "Discount": 0, "PublishedPrice": 8.45, "PublishedPriceRoundedOff": 8, "OfferedPrice": 8.03, "OfferedPriceRoundedOff": 8, "AgentCommission": 0.42, "AgentMarkUp": 0, "TDS": 0.17, "GST": { "CGSTAmount": 0, "CGSTRate": 0, "CessAmount": 0, "CessRate": 10, "IGSTAmount": 0, "IGSTRate": 18, "SGSTAmount": 0, "SGSTRate": 0, "TaxableAmount": 0 } }, "CancellationPolicies": [ { "CancellationCharge": 10, "CancellationChargeType": 2, "PolicyString": "Till 20:00 on 07 Sep 2021", "TimeBeforeDept": "29$-1", "FromDate": "2021-08-13T12:26:31", "ToDate": "2021-09-07T20:00:00" }, { "CancellationCharge": 50, "CancellationChargeType": 2, "PolicyString": "Between 20:00 on 07 Sep 2021 - 08:00 on 08 Sep 2021", "TimeBeforeDept": "17$29", "FromDate": "2021-09-07T20:00:00", "ToDate": "2021-09-08T08:00:00" }, { "CancellationCharge": 100, "CancellationChargeType": 2, "PolicyString": "After 08:00 on 08 Sep 2021", "TimeBeforeDept": "0$17", "FromDate": "2021-09-08T08:00:00", "ToDate": "2021-09-09T21:00:00" } ] }, { "ResultIndex": 5, "ArrivalTime": "2021-09-09T03:00:00", "AvailableSeats": 8, "DepartureTime": "2021-09-09T02:00:00", "RouteId": "8000000139030117824", "BusType": "Bharat benz Non A/C Seater Air Suspension (1+1)", "ServiceName": "Seat Seller", "TravelName": "bo_migration", "IdProofRequired": false, "IsDropPointMandatory": false, "LiveTrackingAvailable": false, "MTicketEnabled": true, "MaxSeatsPerTicket": 6, "OperatorId": 29865737, "PartialCancellationAllowed": true, "BoardingPointsDetails": [ { "CityPointIndex": 1, "CityPointLocation": "Hosur", "CityPointName": "Hosur", "CityPointTime": "2021-09-09T02:00:00" } ], "DroppingPointsDetails": [ { "CityPointIndex": 1, "CityPointLocation": "Abids", "CityPointName": "Abids", "CityPointTime": "2021-09-09T03:00:00" } ], "BusPrice": { "CurrencyCode": "INR", "BasePrice": 10, "Tax": 0, "OtherCharges": 0, "Discount": 0, "PublishedPrice": 10, "PublishedPriceRoundedOff": 10, "OfferedPrice": 9.5, "OfferedPriceRoundedOff": 10, "AgentCommission": 0.5, "AgentMarkUp": 0, "TDS": 0.2, "GST": { "CGSTAmount": 0, "CGSTRate": 0, "CessAmount": 0, "CessRate": 10, "IGSTAmount": 0, "IGSTRate": 18, "SGSTAmount": 0, "SGSTRate": 0, "TaxableAmount": 0 } }, "CancellationPolicies": [ { "CancellationCharge": 15, "CancellationChargeType": 2, "PolicyString": "Till 21:00 on 07 Sep 2021", "TimeBeforeDept": "29$-1", "FromDate": "2021-08-13T12:26:31", "ToDate": "2021-09-07T21:00:00" }, { "CancellationCharge": 20, "CancellationChargeType": 2, "PolicyString": "Between 21:00 on 07 Sep 2021 - 09:00 on 08 Sep 2021", "TimeBeforeDept": "17$29", "FromDate": "2021-09-07T21:00:00", "ToDate": "2021-09-08T09:00:00" }, { "CancellationCharge": 50, "CancellationChargeType": 2, "PolicyString": "Between 09:00 on 08 Sep 2021 - 17:00 on 08 Sep 2021", "TimeBeforeDept": "9$17", "FromDate": "2021-09-08T09:00:00", "ToDate": "2021-09-08T17:00:00" }, { "CancellationCharge": 100, "CancellationChargeType": 2, "PolicyString": "After 17:00 on 08 Sep 2021", "TimeBeforeDept": "0$9", "FromDate": "2021-09-08T17:00:00", "ToDate": "2021-09-09T03:00:00" } ] } ] } } }