Cancel Booking

These methods are to be called to send cancellation or change requests and to check the cancellation status.

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 "cancelBus" 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

order_id

string

( query )

The Order ID generated at the time of booking.

BusId

string

( query )

The Bus Id generated at the time of booking.

Remarks

string

( query )

Remark for cancellation

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": "cancelBus",
  "order_id": "1234567",
  "BusId": "22406",
  "Remarks": "I have another plan so i want cancellation"
}
					 

Response

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

{
    "status": "605",
    "status_message": "Booking Has Been cancelled",
    "responseData": {
        "SendChangeRequestResult": {
            "ResponseStatus": 1,
            "Error": {
                "ErrorCode": 0,
                "ErrorMessage": ""
            },
            "TraceId": "B1427096-DCE4-42C8-8228-800EC9BD5C79",
            "BusCRInfo": [
                {
                    "CancellationChargeBreakUp": {
                        "CancellationFees": 0.5,
                        "CancellationServiceCharge": 4.5
                    },
                    "ChangeRequestId": 2833,
                    "CreditNoteNo": "MZ/2122/107",
                    "ChangeRequestStatus": 3,
                    "CreditNoteCreatedOn": "2021-08-13T16:31:46",
                    "TotalPrice": 5.13,
                    "RefundedAmount": 0,
                    "CancellationCharge": 5,
                    "TotalServiceCharge": 0,
                    "TotalGSTAmount": 0,
                    "GST": {
                        "CGSTAmount": 0,
                        "CGSTRate": 0,
                        "CessAmount": 0,
                        "CessRate": 0,
                        "IGSTAmount": 0,
                        "IGSTRate": 0,
                        "SGSTAmount": 0,
                        "SGSTRate": 0,
                        "TaxableAmount": 0
                    }
                }
            ]
        }
    }
}