Lock Allotment with Preconfirm Booking Response

Preconfirm: The booking is pre-confirmed and the allotment is locked.

  • You will have 30 minutes to complete the booking and reconfirm.
  • Otherwise the session will expire and the product will not be able to be confirmed with the same preconfirmation done.
  • You will need to do another preconfirmation before using the reconfirm call.

From a business perspective, the following information is returned:

  • Booking number
  • Activity information (name, description, operational information, date, time and paxes)
  • If needed, a special voucher URL that needs to be provided to the final customer .

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 Preconfirm call

action

string

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

ModeType

string

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.

clientReference

string

*required Unique Client Reference.

holder[]

Array

Booking holder information element

title

string

Title of the guest(Mr, Ms, Miss)

name

string

First name of the guest

surname

string

Last name of the guest

email

string

Email id

address

string

Address of the guest

zipCode

string

zipCode of the guest

Zip Code

country

string

Country of the guest

Country

telephones[]

array

Telephones (Ex-[9988776655,7766554433])

activities

List

Activities to be confirmed

rateKey

string

Rate key to be confirmed taken from the detail api call.

from

string

Activity date from [Format is yyyy-mm-dd.]

to

string

Activity date to. [Format is yyyy-mm-dd.]

preferedLanguage

string

Prefered Language of the activity

serviceLanguage

string

Service Language of the activity

paxes[]

List

List of activity paxes.

The paxes information is mandatory.

(1.1)age

string

Pax age

(1.2)name

string

Pax name

(1.3)surname

string

Pax surname

(1.4)type

string

Pax type (ADULT, CHILD)

Paxes must be grouped by type, and all ADULTS must be informed before all CHILD

answers[]

List

If the activity required some questions to be answered, then the answers for each question must be provided in the “answers” attribute.

(1.1)question

string

Question being answered

(1.2)answer

string

This is the answer to the question raised before in the @question attribute.

price

decimal

Activity fare(Actual Net Fare in INR)

currency

string

Currency code

code

string

Activity code ie. "code":"E-E10-IN-JAIL5"(Get from detail api)

Note:You can't preconfirm activities with kids in the test environment.

REQUEST

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

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

POST:
{
  "action": "preConfirm",
  "mode": "Test",
  "language": "en",
  "clientReference": "5F816749F3A14",
  "price": "5000",
  "currency": "INR",
  "code": "E-E10-IN-JAIL5",
  "holder": {
    "title": "Mr",
    "name": "Test",
    "surname": "Booking",
    "email": "praveen@thewebconz.com",
    "address": "LajpatNagar",
    "zipCode": "112233",
    "country": "IN",
    "mailing": true,
    "mailUpdDate": "2022-04-30",
    "telephones": [
      "8802273456"
    ]
  },
  "activities": [
    {
      "answers": [
        {
          "question": {
            "code": "HOTEL_NAME",
            "text": "Please advise the name of your hotel",
            "required": true
          },
          "answer": "oyohotel"
        }
      ],
      "preferedLanguage": "en",
      "serviceLanguage": "en",
      "rateKey": "gdibark3lmeb76ursqlpr70ap4",
      "from": "2022-04-30",
      "to": "2022-04-30",
      "paxes": [
        {
          "age": 30,
          "type": "ADULT",
          "name": "Test",
          "surname": "Booking"
        }
      ]
    }
  ]
}
					 

Response

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

{
    "status": 200,
    "status_message": "OK",
    "responseData": {
		"order_id": "626153A1B94FD"
        "booking": {
            "reference": "270-399717",
            "status": "PRECONFIRMED",
            "currency": "EUR",
            "pendingAmount": 69.46,
            "creationDate": "2022-04-21T13:52:12.000Z",
            "clientReference": "5F816749F3A14",
            "holder": {
                "name": "TEST",
                "title": "",
                "email": "praveen@thewebconz.com",
                "mailing": false,
                "surname": "BOOKING",
                "telephones": [
                    "8802273456"
                ]
            },
            "total": 78.04,
            "totalNet": 69.46,
            "activities": [
                {
                    "status": "PRECONFIRMED",
                    "comments": [
                        {
                            "type": "CONTRACT_REMARKS",
                            "text": "Meeting point: At the Hotel // End point: at the Hotel // Duration: 4 hours // Inclusions: Transport, Guide, Monuments  // Exclusions: Tipping or any other meal which is not mentioned // Supplier name: Distinct Destinations Private Ltd // Supplier emergency phone: 00 91 9818419730 // Voucher type: Printed voucher or E-voucher. Print and bring the voucher or show the voucher on your mobile device to enjoy the activity. // Voucher validity: Date of service only. // Recommendations: Children require an adult aged 16 or above to purchase tickets on their behalf, and must be accompanied by this adult when entering the park. All guests under the same reservation must enter the park together. Tickets must be used on the specific day selected. Tickets can only be used once. Re-entry not allowed. Passport is required on the travel date //  \t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n"
                        }
                    ],
                    "type": "TICKET",
                    "activityReference": "270-399717",
                    "code": "E-E10-IN-JACITY",
                    "name": "Half Day City Tour",
                    "modality": {
                        "code": "PRIVATE@STANDARD|ENG|13:30",
                        "name": "Private english 13:30",
                        "rates": [
                            {
                                "rateDetails": [
                                    {
                                        "languages": [
                                            {
                                                "code": "en"
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "amountUnitType": "PAX"
                    },
                    "dateFrom": "2022-04-30",
                    "dateTo": "2022-04-30",
                    "cancellationPolicies": [
                        {
                            "dateFrom": "2022-04-29T00:00:00.000Z",
                            "amount": 78.04
                        }
                    ],
                    "paxes": [
                        {
                            "name": "Test",
                            "mailing": false,
                            "surname": "Booking",
                            "customerId": "1",
                            "age": 30,
                            "paxType": "AD",
                            "passport": ""
                        }
                    ],
                    "questions": [
                        {
                            "question": {
                                "code": "EMAILCONTACTO",
                                "text": "Email – Client contact introduced in the booking process",
                                "required": true
                            },
                            "answer": "praveen@thewebconz.com"
                        },
                        {
                            "question": {
                                "code": "HOTEL_NAME",
                                "text": "Please advise the name of your hotel",
                                "required": true
                            },
                            "answer": "oyohotel"
                        },
                        {
                            "question": {
                                "code": "TLFCONTACTO",
                                "text": "Telephone – Client contact introduced in the booking process",
                                "required": true
                            },
                            "answer": "8802273456"
                        }
                    ],
                    "id": "270#O#1",
                    "contactInfo": {
                        "country": {
                            "destinations": [
                                {
                                    "code": "JAI",
                                    "name": "Jaipur"
                                }
                            ]
                        }
                    },
                    "amountDetail": {
                        "paxAmounts": [
                            {
                                "paxType": "ADULT",
                                "amount": 78.04
                            }
                        ],
                        "totalAmount": {
                            "amount": 78.04
                        }
                    },
                    "extraData": [
                        {
                            "id": "INFO_TTOO_BEARING_AMOUNT",
                            "value": "69.460"
                        },
                        {
                            "id": "INFO_TTOO_BEARING_AMOUNT_CURRENCY",
                            "value": "EUR"
                        },
                        {
                            "id": "INFO_TTOO_SERVICE_AMOUNT",
                            "value": "8.58"
                        }
                    ],
                    "providerInformation": {
                        "name": "DISTINCT DESTINATIONS PVT LTD "
                    }
                }
            ]
        }
    }
}