Travel Portal Development, Travel Portal Solution, Travel Whitelabel

Bus Book

This method confirms the previously tentative booked ticket. Client need to call the book method with all the requested details along with the seat numbers and boarding point. The system will return the confirmed ticket details including Ticket number.

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.

Definition and request parameters for Bus Book Method

action

string

( query )

Must be "bookBus" 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.

order_id

string

( query )

Unique Order Id (You will get this from blockBus response)

origin_name

string

( query )

Origin City Name

destination_name

string

( query )

Destination City Name

depart_date

string

( query )

Travel Date Ex:(2021-09-09)

ResultIndex

string

( query )

ResultIndex

TraceId

string

( query )

Unique identifier for identify every unique search

BoardingPointId

string

( query )

Id of the boarding point selected (e.g. 43289)h

DroppingPointId

string

( query )

Id of the dropping point selected (e.g. 43281)

Passenger

Array

( query )

Array of passenger details

LeadPassenger

Boolean

( query )

Lead Passenger

PassengerId

number

( query )

Passenger Id

Title

string

( query )

Title of passenger

FirstName

string

( query )

First name of passenger

LastName

string

( query )

Last name of passenger

Email

string

( query )

Email address of passenger

Phoneno

string

( query )

Phone no of passenger

Gender

Enumeration

( query )

Gender of passenger Possible values Male = 1, Female = 2

IdType

Enumeration

( query )

Id proof type

Possible values PAN,Aadhar,Voterid,Driving License,Passport

In search response if node i.e IdProofRequired as true then it is mandatory to pass the details of IdType and IdNumber in block and book method

IdNumber

String

( query )

Id proof number

Age

String

( query )

Age of the passenger

Seat

Array

( query )

Array of seat details seat name, seat no

ColumnNo

Integer

( query )

ColumnNo

Height

Integer

( query )

Seat height

IsLadiesSeat

Boolean

( query )

Seat reserved for ladies possible values are True or False

IsMalesSeat

Boolean

( query )

Seat reserved for male. Possible values are True or False

IsUpper

Boolean

( query )

IsUpper

RowNo

Integer

( query )

seat row number in which row seat lies e.g. 1

SeatIndex

Integer

( query )

SeatIndex (e.g. 9)

SeatName

string

( query )

Valid seat name

SeatType

Enumeration

( query )

type of seat possible value can be seat = 1, sleeper = 2, seatCumSleeper = 3, UpperBerth = 4,LowerBerth = 5

Width

Integer

( query )

Possible Values are 1 or 2

Price

Array

( query )

Seat Price array

CurrencyCode

string

( query )

Currency

BasePrice

Decimal

( query )

Base price of bus

Tax

Decimal

( query )

Tax applicable on bus price

OtherCharges

Decimal

( query )

Other charges applicable on bus price

Discount

Decimal

( query )

Discount applicable on bus price

PublishedPrice

Decimal

( query )

Published Price

PublishedPriceRoundedOff

Decimal

( query )

This price is for display purpose only

OfferedPrice

Decimal

( query )

Offered Price of the Bus

OfferedPriceRoundedOff

Decimal

( query )

Offered Price (rounded off) of the Bus

AgentCommission

Decimal

( query )

AgentCommission

AgentMarkUp

Decimal

( query )

AgentMarkUp

TDS

Decimal

( query )

TDS

GST

Array

( query )

Define the CGST and IGST rate and amount applicable on the bus price

CGSTAmount

Decimal

( query )

CGST amount

CGSTRate

Decimal

( query )

Rate of CGST

CessAmount

Decimal

( query )

Cess amount

CessRate

Decimal

( query )

Percentage Rate of cess

IGSTAmount

Decimal

( query )

IGST amount

IGSTRate

Decimal

( query )

Percentage Rate of IGST

SGSTAmount

Decimal

( query )

SGST S amount

SGSTRate

Decimal

( query )

Percentage Rate of SGST

TaxableAmount

Decimal

( query )

Total taxable amount

REQUEST

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

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

POST:
{
    "action": "bookBus",
    "order_id": "64FC433D14546",
    "origin_name": "Bangalore",
    "destination_name": "Hyderabad",
    "depart_date": "2021-09-11",
    "TraceId": "7a0cec5d-aba2-44be-9921-23ee94a93bb7",
    "ResultIndex": "8",
    "BoardingPointId": "1",
    "DroppingPointId": "1",
    "Passenger": [
        {
            "LeadPassenger": true,
            "PassengerId": 0,
            "Title": "Mr",
            "FirstName": "Praveen ",
            "LastName": "Sharma",
            "Email": "praveen@thewebconz.com",
            "Address": "Delhi",
            "Gender": 1,
            "Age": "31",
            "IdType": null,
            "IdNumber": null,
            "Phoneno": "9003667677",
            "Seat": {
                "ColumnNo": "012",
                "Height": 2,
                "IsLadiesSeat": false,
                "IsMalesSeat": false,
                "IsUpper": true,
                "RowNo": "002",
                "SeatFare": 13.65,
                "SeatIndex": 28,
                "SeatName": "n",
                "SeatStatus": true,
                "SeatType": 2,
                "Width": 1,
                "Price": {
                    "CurrencyCode": "INR",
                    "BasePrice": 13.65,
                    "Tax": 0,
                    "OtherCharges": 0,
                    "Discount": 0,
                    "PublishedPrice": 13.65,
                    "PublishedPriceRoundedOff": 14,
                    "OfferedPrice": -16.35,
                    "OfferedPriceRoundedOff": -16,
                    "AgentCommission": 30,
                    "AgentMarkUp": 0,
                    "TDS": 12,
                    "GST": {
                        "CGSTAmount": 0,
                        "CGSTRate": 0,
                        "CessAmount": 0,
                        "CessRate": 0,
                        "IGSTAmount": 0,
                        "IGSTRate": 18,
                        "SGSTAmount": 0,
                        "SGSTRate": 0,
                        "TaxableAmount": 0
                    }
                }
            }
        }
    ]
}
					 

Response

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

{
    "status": "200",
    "status_message": "OK",
    "responseData": {
        "BookResult": {
            "ResponseStatus": 1,
            "Error": {
                "ErrorCode": 0,
                "ErrorMessage": ""
            },
            "TraceId": "7a0cec5d-aba2-44be-9921-23ee94a93bb7",
            "BusBookingStatus": "Confirmed",
            "InvoiceAmount": -4,
            "InvoiceNumber": "MW/2324/2929",
            "BusId": 28970,
            "TicketNo": "A8VEMBZY",
            "TravelOperatorPNR": "A8VEMBZY",
            "order_id": "64FC433D14546"
        }
    }
}
            
-->