VerticalAPI

Booking

Booking API allows you to book rooms & rates confirmed by the price check response. The primary itinerary method of the Booking API creates a reservation for the selected hotel, room, rate and occupancy.

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

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

clientReference

string

( query )

*required Unique Client Reference.

holder[]

Array

Array of guest details for in the particular activity as requested in activity search

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

Array

Array of selected activity

rateKey

string

RateKey of the activity

from

string

From date of the activity

to

string

To date of the activity

preferedLanguage

string

Prefered Language of the activity

serviceLanguage

string

Service Language of the activity

paxes[]

Array

Paxes detail of the activity

(1.1)age

string

age of the guest

(1.2)name

string

name of the guest

Name

(1.3)surname

string

surname of the guest

Surname

(1.4)type

string

Type of the guest

Type

answers[]

Array

Answers of selected activity

*If Question is available in detail response

(1.1)question

string

Question

(1.2)answer

string

Answer

price

decimal

Activity fare(Actual Net Fare in INR)

currency

string

Currency code

REQUEST

API Endpoint: https://your-end-point/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",
  "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": {
        "operationId": "0cc42032ee5d4e8e",
		"order_id": "626153A1B94FD"
        "auditData": {
            "processTime": 0,
            "time": "2022-04-21T11:52:13.629Z",
            "serverId": "blank",
            "environment": "blank"
        },
        "booking": {
            "reference": "270-399717",
            "status": "PRECONFIRMED",
            "currency": "EUR",
            "pendingAmount": 69.46,
            "agency": {
                "code": 30543,
                "branch": 1,
                "comments": "",
                "sucursal": {
                    "name": "PRUEBAS SISTEMAS MINORISTA SUC 1 - 1",
                    "street": "PEREZ GALDOS 1",
                    "zip": "07006",
                    "city": "PALMA DE MALLORCA",
                    "email": "mfiol@activitiesbank.com",
                    "region": "07"
                }
            },
            "creationDate": "2022-04-21T13:52:12.000Z",
            "paymentData": {
                "paymentType": {
                    "code": "P"
                },
                "invoicingCompany": {
                    "code": "HBD",
                    "name": "BEDSONLINE, S.L.U.",
                    "registrationNumber": "ESB28931681"
                },
                "description": "Name Beds on Line, Bank: BBVA(Pl. L' Olivar 6, 07002 Palma, Baleares, España) Account:ES9101824899160200711397,  SWIFT:BBVAESMMXXX,  7 days prior to clients arrival (except group bookings with fixed days in advance at the time of the confirmation) . Please indicate our reference number when making payment. Thank you for your cooperation., NOTICE: SWIFT CODE CHANGED"
            },
            "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",
                    "supplier": {
                        "name": "HOTELBEDS SPAIN, S.L.U",
                        "vatNumber": "ESB28916765"
                    },
                    "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",
                    "agencyCommission": {
                        "percentage": 11,
                        "amount": -8.58,
                        "vatAmount": 0
                    },
                    "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 "
                    }
                }
            ]
        }
    }
}