Rates Plugin Technical Guide

Modified on Wed, 30 Jul at 10:58 AM

Rates Plugin

The Rates Plugin is a responsive widget for displaying property rates (nightly, weekly, monthly) using the iPro API. Ideal for vacation rentals or hotels, it displays data in a clean, mobile-friendly table format.


Features

  • Fully responsive layout
  • Shows rates by date range
  • Supports USD, EUR, GBP
  • Customizable brand colors
  • Toggle visibility of rate columns
  • Supports multiple property notes
  • Optional "Show More" button for long lists


Installation


1. Include the Script


<script src="https://your-cdn-path/rates.iife.js"
        data-container-id="rates-container"
        data-tenant-config='{
          "apiUrl": "https://your-api-endpoint.com",
          "brand": {
            "primary": "#4CAF50",
            "secondary": "#FF5252"
          }
        }'>
</script>


2. Add the container

<div id="rates-container"
     data-property-id="12345"
     data-currency="USD"
     data-title="Property Rates & Availability"
     data-column-visibility='{
       "monthly": false,
       "weekendly": false
     }'
     data-show-more="true">
</div>


Configuration


Container Attributes


AttributeTypeDescriptionDefault
data-property-idStringID of the propertyRequired
data-currencyStringUSD, EUR, or GBPGBP
data-titleStringTitle above the tableProperty Rates
data-column-visibilityJSON StringToggle visibility of specific columnsAll visible
data-show-moreBooleanShow "Show More" button after 20 rowsfalse


Column Visibility Example

{
  "startDate": true,
  "endDate": true,
  "nightly": true,
  "weekly": true,
  "monthly": false,
  "weekendly": false,
  "minStay": true,
  "arrivalDeparture": true,
  "occupancy": false
}


Script Attributes


AttributeTypeDescriptionDefault
data-container-idStringID of the target container divRequired
data-tenant-configJSON StringAPI endpoint and brand colorsRequired




Examples


Basic


<div id="rates-container" data-property-id="12345"></div>

<script src="https://your-cdn-path/rates.iife.js"
        data-container-id="rates-container"
        data-tenant-config='{"apiUrl": "https://your-api-endpoint.com"}'>
</script>



Custom Columns & Branding


<div id="rates-container"
     data-property-id="12345"
     data-currency="EUR"
     data-title="Villa Rates"
     data-column-visibility='{
       "monthly": false,
       "weekendly": false,
       "occupancy": false
     }'>
</div>

<script src="https://your-cdn-path/rates.iife.js"
        data-container-id="rates-container"
        data-tenant-config='{
          "apiUrl": "https://your-api-endpoint.com",
          "brand": {
            "primary": "#9C27B0",
            "secondary": "#4CAF50"
          }
        }'>
</script>



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article