Retrieve Booking

This method gets the booking information based on Busid.

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 "getBookDetails" 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.

ModeType

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

BusId

string

( query )

The BusId ID generated at the time of booking.

order_id

string

( query )

The Order ID get from the response of booking.

REQUEST

API Endpoint: https://abengines.com/api/v1/travel-api/bus.php

header: array(
'Content-Type:application/json',
'Accept-encoding: gzip',
'PID:'ADD-YOUR-PID',
'x-api-key:'ADD-YOUR-KEY'
);

POST: 
{
  "action": "getBookDetails",
  "mode": "Test",
  "BusId": "22406",
  "order_id": "1234567"
}
					 

Response

The API returns an HTTP response, which generally includes the result of the request invocation

{
    "status": "200",
    "status_message": "OK",
    "responseData": {
        "GetBookingDetailResult": {
            "Error": {
                "ErrorCode": 0,
                "ErrorMessage": ""
            },
            "Itinerary": {
                "IsDomestic": false,
                "TicketNo": "96Q56ZTQ",
                "ArrivalTime": "2021-09-13T04:00:00",
                "BlockDuration": 10,
                "BookingMode": 0,
                "BusId": 22406,
                "BusType": "Volvo A/C Seater (1+1)",
                "DateOfJourney": "2021-09-12",
                "DepartureTime": "2021-09-12T18:00:00",
                "Destination": "Hyderabad",
                "DestinationId": 9573,
                "NoOfSeats": 1,
                "Origin": "Bangalore",
                "Passenger": [
                    {
                        "LeadPassenger": true,
                        "Title": "Mr",
                        "Address": "Barmer",
                        "Age": 31,
                        "Email": "operations@techwysh.com",
                        "FirstName": "Sivanath ",
                        "Gender": 1,
                        "IdNumber": null,
                        "IdType": null,
                        "LastName": "Nagarajan",
                        "Phoneno": "9003667677",
                        "Seat": {
                            "IsLadiesSeat": false,
                            "IsMalesSeat": false,
                            "IsUpper": false,
                            "SeatFare": 5,
                            "SeatId": 27051,
                            "SeatName": "1",
                            "SeatStatus": false,
                            "SeatType": 1,
                            "Price": {
                                "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
                                }
                            }
                        }
                    }
                ],
                "RouteId": "2000000139070054664",
                "ServiceName": "Seat Seller",
                "SourceId": 8463,
                "Status": 2,
                "TravelName": "TESTING ACCOUNT",
                "TravelOperatorPNR": "96Q56ZTQ",
                "BoardingPointdetails": {
                    "CityPointAddress": "Domlur",
                    "CityPointContactNumber": "7204587325",
                    "CityPointLandmark": "Domlur",
                    "CityPointLocation": "Domlur",
                    "CityPointName": "Domlur",
                    "CityPointTime": "2021-09-12T18:00:00"
                },
                "CancelPolicy": [
                    {
                        "CancellationCharge": 10,
                        "CancellationChargeType": 2,
                        "PolicyString": "Till 13:00 on 11 Sep 2021",
                        "TimeBeforeDept": "29$-1",
                        "FromDate": "2021-08-13T14:55:49",
                        "ToDate": "2021-09-11T13:00:00"
                    },
                    {
                        "CancellationCharge": 50,
                        "CancellationChargeType": 2,
                        "PolicyString": "Between 13:00 on 11 Sep 2021 - 01:00 on 12 Sep 2021",
                        "TimeBeforeDept": "17$29",
                        "FromDate": "2021-09-11T13:00:00",
                        "ToDate": "2021-09-12T01:00:00"
                    },
                    {
                        "CancellationCharge": 100,
                        "CancellationChargeType": 2,
                        "PolicyString": "After 01:00 on 12 Sep 2021",
                        "TimeBeforeDept": "0$17",
                        "FromDate": "2021-09-12T01:00:00",
                        "ToDate": "2021-09-13T04:00:00"
                    }
                ],
                "Price": {
                    "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
                    }
                },
                "InvoiceNumber": "MW/2122/1626",
                "InvoiceCreatedOn": "2021-08-13T09:38:34",
                "InvoiceCreatedBy": 51363,
                "InvoiceAmount": 5,
                "InvoiceCreatedByName": "Akashi Rajkonwari",
                "InvoiceLastModifiedBy": 51363,
                "InvoiceLastModifiedByName": "Akashi Rajkonwari",
                "InvoiceStatus": 3,
                "BookingHistory": [
                    {
                        "CreatedBy": 51363,
                        "CreatedByName": "Akashi Rajkonwari",
                        "CreatedOn": "2021-08-13T09:38:34",
                        "EventCategory": 1,
                        "LastModifiedBy": 51363,
                        "LastModifiedByName": "Akashi Rajkonwari",
                        "LastModifiedOn": "2021-08-13T09:38:34",
                        "Remarks": "Booking is Saved and Invoice Generated.(Booked By BookingAPI , through New BookingEngine Service). "
                    },
                    {
                        "CreatedBy": 51363,
                        "CreatedByName": "Akashi Rajkonwari",
                        "CreatedOn": "2021-08-13T09:38:35",
                        "EventCategory": 2,
                        "LastModifiedBy": 51363,
                        "LastModifiedByName": "Akashi Rajkonwari",
                        "LastModifiedOn": "2021-08-13T09:38:35",
                        "Remarks": "Booking Confirmed "
                    }
                ]
            },
            "ResponseStatus": 1,
            "TraceId": "B1427096-DCE4-42C8-8228-800EC9BD5C79"
        }
    }
}