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.

Definition and request parameters for Bus Cancellation Method

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.

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://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": "cancelBus",
  "order_id": "64FC433D14546",
  "BusId": "28970",
  "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": "200",
    "status_message": "OK",
    "responseData": {
        "SendChangeRequestResult": {
            "ResponseStatus": 1,
            "Error": {
                "ErrorCode": 0,
                "ErrorMessage": ""
            },
            "TraceId": "7A0CEC5D-ABA2-44BE-9921-23EE94A93BB7",
            "BusCRInfo": [
                {
                    "CancellationChargeBreakUp": {
                        "CancellationFees": -4,
                        "CancellationServiceCharge": 0
                    },
                    "ChangeRequestId": 3973,
                    "CreditNoteNo": "MZ/2324/401",
                    "ChangeRequestStatus": 3,
                    "CreditNoteCreatedOn": "2023-09-09T16:02:17",
                    "TotalPrice": -4.35,
                    "RefundedAmount": 0,
                    "CancellationCharge": -4,
                    "TotalServiceCharge": 0,
                    "TotalGSTAmount": 0,
                    "GST": {
                        "CGSTAmount": 0,
                        "CGSTRate": 0,
                        "CessAmount": 0,
                        "CessRate": 0,
                        "IGSTAmount": 0,
                        "IGSTRate": 0,
                        "SGSTAmount": 0,
                        "SGSTRate": 0,
                        "TaxableAmount": 0
                    }
                }
            ]
        }
    }
}