Instant booking

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.

1. Shop

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.

Get availability

List<Property> propertyList = rapidClient.getAvailability(
        List.of("PROPERTY ID"),

Get price check token

String getToken(String href) throws MalformedURLException {
        URL url = new URL("ENDPOINT" + href);
        String query = url.getQuery();
        String[] split = query.split("&");
        String token = null;
        for (String params : split) {
            String prefix = "token=";
            if (params.startsWith(prefix)) {
                token = params.replaceAll(prefix, "");
        return token;

String getPriceCheckToken(PropertyAvailability propertyAvailability) throws MalformedURLException {
        return getToken(propertyAvailability.getRooms().get(0).getRates().get(0).getBedGroups().entrySet().stream().findFirst().get().getValue().getLinks().getPriceCheck().getHref());

Check room prices

Property property = propertyList.get(0);

if (property instanceof PropertyAvailability) {
        PropertyAvailability propertyAvailability = (PropertyAvailability) property;

        RoomPriceCheck roomPriceCheck = rapidClient.priceCheck(
                "PROPERTY ID",

2. Book

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());

CreateItineraryRequest createItineraryRequest(boolean hold) {
        PhoneRequest phone =
                        .countryCode("COUNTRY CODE")
                        .areaCode("AREA CODE")

        List<CreateItineraryRequestRoom> rooms = List.of(
                        .specialRequest("SPECIAL REQUEST")

        BillingContactRequestAddress address =
                        .line1("LINE 1")
                        .line2("LINE 2")
                        .line3("LINE 3")
                        .stateProvinceCode("STATE CODE")
                        .countryCode("COUNTRY CODE")
                        .postalCode("POSTAL CODE")

        BillingContactRequest billingContact =

        List<PaymentRequest> payments = List.of(
                        .securityCode("SECURITY CODE")

        return CreateItineraryRequest.builder()
                .affiliateReferenceId(UUID.randomUUID().toString().substring(0, 28))
                .affiliateMetadata("AFFILIATE METADATA")
                .taxRegistrationNumber("TAX NUMBER")

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.

ItineraryCreation itineraryCreation = rapidClient.postItinerary(
        "CUSTOMER IP",
Did you find this page helpful?
How can we improve this content?
Thank you for helping us improve Developer Hub!