Bus Block

This API method is used to tentatively book (block) a ticket. This tentative ticket will be blocked for a specified time and can be confirmed within specified time limit.

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 Block Method

action

string

( query )

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

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": "blockBus",
    "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": {
        "BlockResult": {
            "IsPriceChanged": false,
            "ResponseStatus": 1,
            "Error": {
                "ErrorCode": 0,
                "ErrorMessage": ""
            },
            "ArrivalTime": "09/12/2023 06:00:00",
            "BusType": "Volvo A/C Sleeper (2+2)",
            "DepartureTime": "09/11/2023 20:00:00",
            "ServiceName": "Seat Seller",
            "TraceId": "7a0cec5d-aba2-44be-9921-23ee94a93bb7",
            "TravelName": "TESTING ACCOUNT",
            "BoardingPointdetails": {
                "CityPointAddress": "Kukatpalli, testing",
                "CityPointContactNumber": "99999999999999",
                "CityPointIndex": 1,
                "CityPointLandmark": "kukatpalli,Testing",
                "CityPointLocation": "Abids",
                "CityPointName": "Abids",
                "CityPointTime": "2023-09-11T20:00:00"
            },
            "CancelPolicy": [
                {
                    "CancellationCharge": 10,
                    "CancellationChargeType": 2,
                    "PolicyString": "Till 15:00 on 10 Sep 2023",
                    "TimeBeforeDept": "29$-1",
                    "FromDate": "2023-09-09T15:25:36",
                    "ToDate": "2023-09-10T15:00:00"
                },
                {
                    "CancellationCharge": 50,
                    "CancellationChargeType": 2,
                    "PolicyString": "Between 15:00 on 10 Sep 2023 - 03:00 on 11 Sep 2023",
                    "TimeBeforeDept": "17$29",
                    "FromDate": "2023-09-10T15:00:00",
                    "ToDate": "2023-09-11T03:00:00"
                },
                {
                    "CancellationCharge": 100,
                    "CancellationChargeType": 2,
                    "PolicyString": "After 03:00 on 11 Sep 2023",
                    "TimeBeforeDept": "0$17",
                    "FromDate": "2023-09-11T03:00:00",
                    "ToDate": "2023-09-12T06:00:00"
                }
            ],
            "Passenger": [
                {
                    "LeadPassenger": true,
                    "Title": "Mr",
                    "Address": "Delhi",
                    "Age": 31,
                    "City": null,
                    "Email": "praveen@thewebconz.com",
                    "FirstName": "Praveen ",
                    "Gender": 1,
                    "IdNumber": null,
                    "IdType": null,
                    "LastName": "Sharma",
                    "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
                            }
                        }
                    },
                    "State": null
                }
            ],
            "order_id": "64FC433D14546"
        }
    }
}