Booking Confirm Transfers logo icon

The confirm call creates new bookings for an activity product. 

Since previous operations such as detail are providing a rateKey, almost all the information to confirm a booking is temporary stored in APITUDE for activities and it will be used when confirming a booking. It means that the process is simple. So, from a business perspective, the following information is needed to confirm a booking:

  • rateKey: The rate key identifies an activity, modality and rate. It’s returned in the detail response.
  • Selected dates (from and to)
  • Personal data for the holder and paxes

The confirmation response, is very similar to the booking detail response. 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 

Additionally, in the event that you need to connect with a payment platform to let some time for  your customer to pay for the booking, a different approach can be followed:

  • Preconfirm: Stock and data is locked for 30 minutes.
  • Reconfirm: After you have finished with the payment you can confirm the booking. 

See more details for two-step confirmations here.

Specifications

PUT https://api.test.hotelbeds.com/activity-api/3.0/bookings

Request

The confirm api call always returns the same structure, but it can be called with some optional parameters.

The following are some examples: 

Confirm Request

The following is an example of a ticket confirmation request in a single step:

{
  "language": "en",
  "clientReference": "ABC12345 - ES",
  "holder": {
    "name": "John",
    "surname": "Smith",
    "title": "Mr",
    "email": "j.smith@hotelbeds.com",
    "address": "Cami Son Fangos 100",
    "zipCode": "07007",
    "mailing": true,
    "mailUpdDate": 1455547156925,
    "country": "ES",
    "telephones": ["123456789","123456798"]
  },
  "activities": [{
    "rateKey": "3ajeb1pcqslb8r850t2atsqk4d",
    "from": "2016-03-29",
    "to": "2016-03-29",
    "paxes": [
    {
      "age": 68,
      "name": "John",
      "surname": "Smith",
      "type": "ADULT"
    },
    {
      "age": 25,
      "name": "Margaret",
      "surname": "Smith",
      "type": "ADULT",
    },
    {
      "age": 7,
      "name": "Peter",
      "surname": "Smith",
      "type": "CHILDREN",
    }]
  }]
}

The relevant information in the example above is:

  • Holder: Personal data of the booking holder. If it is also a pax, his or her information is repeated below in the paxes list.
  • rateKey: Identifies the product or service to be booked.
  • from and to: Dates when the final customer is going to attend the activity. If the activity duration is 1 day, then from and to have the same value.
  • Paxes: List of paxes and pax type. The ages must match the ones provided in the detail api call. The pax list is optional.  If the paxes information is not provided, then a list of paxes with the ages sent in the “detail” api call is returned. 
  • Questions and answers: if there are questions returned in the “detail” api call, all question(s) will need an answer in the "confirm" request. 

If the “detail” api call did not provide serviceLanguage or session, then it won’t be required in the booking confirmation request. 

The following are the specs for a confirm request: 

NAME

Type

DESCRIPTION

language

String

Language code to be used in the contents response.

clientReference

String

Text to be provided in the booking and stored in APITUDE along with other information. Use your booking number or expedient number or reference. Bookings can be retrieved by client reference. See the booking detail api call for information on how to retrieve a booking.

holder

Holder

Booking holder information element

holder/@name

String

Holder name

holder/@surname

String

Holder surname

holder/@title

String

Holder title (Mr, Ms, Miss)

holder/@email

String

Holder e-mail

holder/@address

String

Holder postal address.

holder/@zipCode

String

Holder zip code.

holder/@mailing

Boolean

True If the holder agrees to receive communications via e-mail.

holder/@country

String

Holder Country name

holder/@telephones

List

Booking holder telephones list

activities

List

Activities to be confirmed. More than one can be provided in the same confirmation.

activities/@answers

List

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

activities/answers/question

Question

Question being answered

activities/answers/question/@code

String

Question code

activities/answers/question/@text

String

Question text. Not needed, but it can be provided.

activities/answers/question/@required

Boolean

Indicates if question is required. Not needed, but it can be provided in the request.

activities/answers/@answer

String

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

activities/@comments

List

List of comments provided by the final customer at the moment of confirming the booking.

@rateKey

String

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

@session

String

Session code among the ones provided (if provided) in the selected rate.

@from

String

Activity date from. Difference between date from and date to must be equals to the activity duration. Most common case of duration = 1 day, generates a date from and to with the same value. Format is yy-mm-dd.

@to

String

Activity date to. Difference between date from and date to must be equals to the activity duration. Most common case of duration = 1 day, generates a date from and to with the same value. Format is yy-mm-dd.

paxes

List

List of activity paxes.

The paxes information is mandatory. However, if this was provided in the detail and not informed in the confirmation the list and distribution of paxes to be used will be the one used in the Detail. Otherwise if you use a new list of paxes in the Confirm the previous list will be replaced with the new one. See the link on the Detail call.

At least the number of paxes and the pax type must match the information provided in the detail because changing that information could affect the activity price.

The holder can be or not in the paxes list. If the holder is going to enjoy the activity, then he / she will appear two times: one in the holder section and another one in the paxes list.

paxes/@age

Integer

Pax age

paxes/@name

String

Pax name

paxes/@surname

String

Pax surname

paxes/@type

PaxType

Pax type (ADULT, CHILD)

Paxes must be grouped by type, and all ADULTS must be informed before all CHILD (see example above)

Response

Confirm Response

The following are the specs delivered in the confirm response: 

NAME

Type

DESCRIPTION

operationId

String

Operation unique identifier. Free text alphanumeric. Always present.

auditData

Object

Request metadata. Always present.

auditData/@processTime

Number

Processing time in seconds. Floating point. Always present.

auditData/@time

String

Request date and time. ISO 8601 format. Always present.

auditData/@serverId

Number

Server identifier. Free text alphanumeric. Always present.

auditData/@environment

String

Environment (e.g. production, test). Restricted values: "prod", "preprod", "test", "blank". Always present

booking

Object

Booking data. Always present.

booking/@reference

String

Booking reference. Free text alphanumeric. Always present.

booking/@status

String

Booking status. Restricted values: "CONFIRMED", "CANCELLED". Always present.

booking/@currency

String

ISO 4217 currency. Restricted to Currencies content call. Always present.

booking/@pendingAmount

Number

Pending amount. 2 decimal float. Always present.

booking/@agency

Object

Agency data. Always present.

booking/agency/@code

Number

Agency code. Long integer. Always present.

booking/agency/@branch

Number

Agency branch. Short integer. Always present.

booking/agency/@comments

String

Comments. Free text alphanumeric. Optional.

booking/@creationDate

String

Creation date. ISO 8601 format. Always present.

booking/@paymentData

Object

Payment data. Always present.

booking/paymentData/@paymentType

Object

Payment type. Always present

booking/paymentData/paymentType/@code

String

Payment type code. Restricted values: "P" prepayment, "C" credit. Always present.

booking/paymentData/@invoicingCompany

Object

Invoicing company data. Always present.

booking/paymentData/invoicingCompany/@code

String

Company code. Free text alphanumeric. Always present.

booking/paymentData/invoicingCompany/@name

String

Company name. Free text alphanumeric. Always present.

booking/paymentData/invoicingCompany/@registrationNumber

String

Registration number. Free text alphanumeric. Always present.

booking/@extraData

Array

Additional data. Array of objects with id (string) and value (string). Optional

booking/@clientReference

String

Customer reference. Free text alphanumeric. Optional.

booking/@holder

Object

Holder data. Always present

booking/holder/@name

String

Name. Free text alphanumeric. Always present.

booking/holder/@title

String

Title. Free text alphanumeric. Optional.

booking/holder/@email

String

Email. Email format. Optional.

booking/holder/@mailing

Boolean

Agrees to receive communications. Values: true, false. Always present.

booking/holder/@surname

String

Surname. Free text alphanumeric. Always present

booking/holder/@telephones

Array

Telephones. Array of strings. Optional.

booking/@total

Number

Total amount. 2 decimal float. Always present.

booking/@totalNet

Number

Net amount. 2 decimal float. Always present.

booking/@activities

Array

Booked activities. Array of objects. Always present.

booking/activities/@status

String

Activity status. Restricted values: "CONFIRMED", "CANCELLED". Always present.

booking/activities/@supplier

Object

Activity supplier. Always present.

booking/activities/supplier/@name

String

Supplier name. Free text alphanumeric. Always present.

booking/activities/supplier/@vatNumber

String

Tax ID number. Free text alphanumeric. Always present.

booking/activities/@comments

Array

Comments. Array of objects with type (string) and text (string). Optional.

booking/activities/@type

String

Activity type. Restricted values: "TICKET". Always present.

booking/activities/@vouchers

Array

Vouchers. Array of objects. This field is only filled in activities that generate barcodes provided by integrated suppliers, when displaying this field the generated coupon must be entered in the URL field instead of generating your own.

booking/activities/vouchers/@code

String

Voucher code. Free text alphanumeric. Always present.

booking/activities/vouchers/@language

String

Voucher language. Restricted values: ISO 639-1 codes. Always present.

booking/activities/vouchers/@url

String

Voucher URL. Free text alphanumeric. Always present.

booking/activities/vouchers/@mimeType

String

Voucher MIME type. E.g. "text/html". Always present.

booking/activities/vouchers/@dateFrom

String

Validity start date. ISO 8601 format. Always present.

booking/activities/vouchers/@dateTo

String

Validity end date. ISO 8601 format. Always present.

booking/activities/@activityReference

String

Activity reference. Free text alphanumeric. Always present

booking/activities/@code

String

Activity code. Free text alphanumeric. Always present.

booking/activities/@name

String

Activity code. Free text alphanumeric. Always present.

booking/activities/@modality

Object

Booked activity modality. Always present.

booking/activities/modality/@code

String

Modality code. Free text alphanumeric. Always present.

booking/activities/modality/@name

String

Modality name. Free text alphanumeric. Always present.

booking/activities/modality/@rates

Boolean

Include all the information fo the rate selected

booking/activities/modality/rates/@freeCancellation

Boolean

Indicates if cancellation is free. Always present.

booking/activities/modality/rates/@rateDetails

String

Indicates the Details of the rate if there's any.

booking/activities/modality/rates/rateDetails/@languages

String

Present in case the activities has a language to select

booking/activities/modality/rates/rateDetails/languages/@code

String

Language code. ISO 639-1 format

booking/activities/modality/@amountUnitType

String

Amount unit type. Restricted values: "PAX", "SERVICE". Always present.

booking/activities/@dateFrom

String

Start date. ISO 8601 format. Always present.

booking/activities/@dateTo

String

End date. ISO 8601 format. Always present.

booking/activities/@cancellationPolicies

Array

Cancellation policies. Array of objects. Optional.

booking/activities/cancellationPolicies/@dateFrom

String

Application start date. ISO 8601 format. Always present.

booking/activities/cancellationPolicies/@amount

Number

Penalty amount. 2 decimal float. Always present.

booking/activities/@paxes

Array

Passengers. Array of objects. Always present.

booking/activities/paxes/@name

String

Name. Free text alphanumeric. Always present.

booking/activities/paxes/@mailing

Boolean

Agrees to receive communications. Values: true, false. Always present.

booking/activities/paxes/@surname

String

Surname. Free text alphanumeric. Always present.

booking/activities/paxes/@customerId

String

Customer identifier. Free text alphanumeric. Always present.

booking/activities/paxes/@age

Number

Age. Short integer. Always present.

booking/activities/paxes/@paxType

String

Passenger type. Restricted values: "AD", "CH". Always present.

booking/activities/paxes/@passport

String

Passport. Free text alphanumeric. Optional.

booking/activities/@questions

Array

Questions and answers. Array of objects with question (object) and answer (string). Optional.

booking/activities/@id

String

Compound activity identifier. Format: {bookingReference}#{activityIndex}. E.g. "123#O#1"

booking/activities/@agencyCommission

Object

Commission percentage. 2 decimal float. Always present.

booking/activities/agencyCommission/@percentage

Number

Agency commission. Always present.

booking/activities/agencyCommission/@amount

Number

Commission amount. 2 decimal float. Always present.

booking/activities/agencyCommission/@vatAmount

Number

Commission VAT amount. 2 decimal float. Always present.

booking/activities/agencyCommission/@vatAmount

Number

Commission VAT amount. 2 decimal float. Always present.

booking/activities/@contactInfo

Object

Contact information. Always present.

booking/activities/contactInfo/@postalCode

String

Postal code. Free text alphanumeric. Always present.

booking/activities/contactInfo/@city

String

Free text alphanumeric. Always present

booking/activities/contactInfo/@country

Object

Country. Always present.

booking/activities/contactInfo/country/@destinations

Array

Destinations. Array of objects with code (string) and name (string). Always present.

booking/activities/@amountDetail

Object

Amount detail. Always present.

booking/activities/amountDetail/@paxAmounts

Array

Amounts per passenger type. Array of objects with paxType (string) and amount (number). Always present.

booking/activities/amountDetail/@totalAmount

Object

Total amount. Always present.

booking/activities/amountDetail/totalAmount/@amount

Number

Total amount. 2 decimal float. Always present.

booking/activities/@extraData

Array

Additional data. Array of objects with id (string) and value (string). Optional.

booking/activities/@providerInformation

Object

Provider information.

booking/activities/providerInformation/@name

Object

Provider information.

booking/activities/providerInformation/@bookingReference

Object

Internal confirmation number received in some products

booking/activities/@content

Object

Activity content. Always present.

booking/activities/content/@name

String

Activity name. Free text alphanumeric. Always present.

booking/activities/content/@detailedInfo

Array

Detailed information. Array of strings. Optional.

booking/activities/content/@featureGroups

Array

Feature groups. Array of objects. Optional.

booking/activities/content/featureGroups/@groupCode

String

Group code. Free text alphanumeric. Always present.

booking/activities/content/featureGroups/@included

Array

Included features. Array of objects with featureType (string) and description (string).

booking/activities/content/@location

Object

Location. Always present.

booking/activities/content/location/@endPoints

Array

End points. Array of objects. Optional.

booking/activities/content/location/endPoints/@type

String

End point type. Restricted values: "Same", "Different". Always present.

booking/activities/content/location/endPoints/@description

String

Description. Free text alphanumeric. Always present.

booking/activities/content/location/@startingPoints

Array

Starting points. Array of objects. Always present.

booking/activities/content/location/startingPoints/@type

String

Starting point type. Restricted values: "MeetingPoint", "UserPoint". Always present.

booking/activities/content/location/startingPoints/@meetingPoint

Object

Meeting point. Always present if type="MeetingPoint".

booking/activities/content/location/startingPoints/meetingPoint/@type

String

Meeting point type. Restricted values: "ADDRESS", "LANDMARK", "OTHER". Always present.

booking/activities/content/location/startingPoints/meetingPoint/@geolocation

Object

Geolocation. Always present.

booking/activities/content/location/startingPoints/meetingPoint/geolocation/@latitude

Number

Latitude. Float. Always present.

booking/activities/content/location/startingPoints/meetingPoint/@address

Object

Description. Free text alphanumeric. Always present.

booking/activities/content/location/startingPoints/meetingPoint/@country

Object

Country. Always present.

booking/activities/content/location/startingPoints/meetingPoint/country/@code

String

ISO 3166-1 alpha-2 code. Always present.

booking/activities/content/location/startingPoints/meetingPoint/country/@name

String

Country name. Free text alphanumeric. Always present.

booking/activities/content/location/startingPoints/meetingPoint/country/@code

String

Destinations. Array of objects with code (string) and name (string). Always present.

booking/activities/content/location/startingPoints/meetingPoint/@city

String

City. Free text alphanumeric. Always present.

booking/activities/content/location/startingPoints/meetingPoint/@zip

String

Postal code. Free text alphanumeric. Always present.

booking/activities/content/location/startingPoints/meetingPoint/@description

Object

Description. Free text alphanumeric. Always present.

booking/activities/content/location/startingPoints/meetingPoint/@pickupInstructions

Array

Pickup instructions. Array of strings. Optional.

booking/activities/content/@media

Object

Media. Always present.

booking/activities/content/media/@images

Array

Images. Array of objects. Optional.

booking/activities/content/media/images/@visualizationOrder

Number

Display order. Short integer. Always present.

booking/activities/content/media/images/@mimeType

String

Image MIME type. E.g. "image/jpeg". Always present.

booking/activities/content/media/images/@language

String

Language. Restricted values: ISO 639-1 codes. Always present.

booking/activities/content/media/images/@urls

Array

Image URLs in different sizes. Array of objects with resource (string), sizeType (string), width (number), height (number) and dpi (number). Always present.

booking/activities/content/@redeemInfo

Object

Redeem information. Always present.

booking/activities/content/redeemInfo/@type

String

Redeem type. Restricted values: "PRINTED", "VOUCHER", "VOUCHERLESS", "NONE". Always present.

booking/activities/content/redeemInfo/@directEntrance

Boolean

Direct entrance. Values: true, false. Always present.

booking/activities/content/redeemInfo/@comments

Array

Comments. Array of strings. Optional.

booking/activities/content/@routes

Array

Routes. Array of objects. Optional.

booking/activities/content/@scheduling

Object

Schedules. Optional.

booking/activities/content/scheduling/@opened

Array

Open days. Array of objects with openingTime (string), closeTime (string) and weekDays (array of strings). Always present.

booking/activities/content/@segmentationGroups

Array

Segmentation groups. Array of objects. Optional.

booking/activities/content/segmentationGroups/@code

Number

Group code. Short integer. Always present.

booking/activities/content/segmentationGroups/@name

String

Group name. Free text alphanumeric. Always present.

booking/activities/content/segmentationGroups/@segments

Array

Group code. Short integer. Always present.Segments. Array of objects with code (number) and name (string). Always present.

booking/activities/content/@activityFactsheetType

String

Activity factsheet type. Restricted values: "ACTIVITY", "PASS_CARDS", "TOURS", "ATTRACCTIONS", "HOP_ON_HOP_OFF" Always present.

booking/activities/content/@activityCode

String

Activity code. Free text alphanumeric. Always present.

booking/activities/content/@contentId

String

Content identifier. Free text alphanumeric. Always present.

booking/activities/content/@description

String

Description. Free text alphanumeric. Always present.

booking/activities/content/@lastUpdate

String

Last update. ISO 8601 format. Always present.

booking/activities/content/@summary

String

Summary. Free text alphanumeric. Always present.

booking/activities/content/@advancedTips

Array

Advanced tips. Array of strings. Optional.

booking/activities/content/@countries

Array

Countries. Array of objects with code (string), name (string) and destinations (array). Always present.

booking/activities/content/@highligths

Array

Highlights. Array of strings. Optional

booking/activities/content/@language

String

Language. Restricted values: ISO 639-1 codes. Always present.