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.

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.

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_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 no, Voterid card, Passport

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://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": "blockBus",
  "mode": "Test",
  "origin_name": "Bangalore",
  "destination_name": "Hyderabad",
  "depart_date": "2021-09-09",
  "TraceId": "b1427096-dce4-42c8-8228-800ec9bd5c79",
  "ResultIndex": "2",
  "BoardingPointId": "1",
  "DroppingPointId": "1",
  "Passenger": [
    {
      "LeadPassenger": true,
      "PassengerId": 0,
      "Title": "Mr",
      "FirstName": "Sivanath ",
      "LastName": "Nagarajan",
      "Email": "operations@techwysh.com",
      "Address": "Barmer",
      "Gender": 1,
      "Age": "31",
      "IdType": null,
      "IdNumber": null,
      "Phoneno": "9003667677",
      "Seat": {
        "ColumnNo": "000",
        "Height": 1,
        "IsLadiesSeat": false,
        "IsMalesSeat": false,
        "IsUpper": false,
        "RowNo": "000",
        "SeatFare": 5.28,
        "SeatIndex": 1,
        "SeatName": "1",
        "SeatStatus": true,
        "SeatType": 1,
        "Width": 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
          }
        }
      }
    }
  ]
}
					 

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/13/2021 04:00:00",
            "BusType": "Volvo A/C Seater (1+1)",
            "DepartureTime": "09/12/2021 18:00:00",
            "ServiceName": "Seat Seller",
            "TraceId": "b1427096-dce4-42c8-8228-800ec9bd5c79",
            "TravelName": "TESTING ACCOUNT",
            "BoardingPointdetails": {
                "CityPointAddress": "Domlur",
                "CityPointContactNumber": "7204587325",
                "CityPointIndex": 1,
                "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"
                }
            ],
            "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": {
                        "ColumnNo": "000",
                        "Height": 1,
                        "IsLadiesSeat": false,
                        "IsMalesSeat": false,
                        "IsUpper": false,
                        "RowNo": "000",
                        "SeatFare": 5.28,
                        "SeatIndex": 1,
                        "SeatName": "1",
                        "SeatStatus": true,
                        "SeatType": 1,
                        "Width": 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
                            }
                        }
                    }
                }
            ]
        }
    },
    "BlockResult": {
        "order_id": "61163BAFE49B4"
    }
}