Our modular API will provide you with all the data points you and your travelers need to complete a property booking. For more information on how the Rapid API works and what it offers for partners, see here.
The Shop API returns rates and availability on all room types for specified properties (maximum of 250 properties per request). The response includes rate details such as promos, whether the rate is refundable, cancellation penalties, and a full price breakdown to meet the price display requirements for your market. For more information on this service please see here.
The Booking API allows you to book rooms and rates confirmed by the Price Check response. For more information on the Rapid Booking API please see here.
Get post itinerary token and create itinerary request
String getPostItineraryToken(RoomPriceCheck priceCheck) throws MalformedURLException {
return getToken(priceCheck.getLinks().getBook().getHref());
}
PhoneRequest phone =
PhoneRequest.builder()
.countryCode("1")
.areaCode("487")
.number("5550077")
.build();
List<CreateItineraryRequestRoom> rooms = List.of(
CreateItineraryRequestRoom.builder()
.givenName("John")
.familyName("Smith")
.smoking(false)
.specialRequest("Top floor or away from street please")
.build()
);
BillingContactRequestAddress address =
BillingContactRequestAddress.builder()
.line1("555 1st St")
.line2("10th Floor")
.line3("Unit 12")
.city("Seattle")
.stateProvinceCode("WA")
.countryCode(/* COUNTRY_CODE */)
.postalCode("98121")
.build();
BillingContactRequest billingContact =
BillingContactRequest.builder()
.givenName("John")
.familyName("Smith")
.address(address)
.build();
List<PaymentRequest> payments = List.of(
PaymentRequest.builder()
.type(PaymentRequest.Type.CUSTOMER_CARD)
.number("4111111111111111")
.securityCode("123")
.expirationMonth("08")
.expirationYear("2025")
.billingContact(billingContact)
.enrollmentDate("2018-09-15")
.build()
);
CreateItineraryRequest createItineraryRequest(boolean hold) {
return CreateItineraryRequest.builder()
.affiliateReferenceId(UUID.randomUUID().toString().substring(0, 28))
.hold(hold)
.email("john@example.com")
.phone(phone)
.rooms(rooms)
.payments(payments)
.affiliateMetadata("data_point_1:123|data_point2:This is data.")
.taxRegistrationNumber("12345678910")
.travelerHandlingInstructions("Please use the card provided for payment. Avoid cancelation as this is for a corporate traveler. Contact traveler if any issues.")
.build();
}
Create itinerary
The primary itinerary method of the Booking API creates a reservation for the selected property, room, rate, and occupancy. Payment information, including billing/cardholder contact information, is provided directly within the request. See here for more details.