MyVR.js Overview

MyVR has designed a powerful JavaScript library that makes it easy to connect a 3rd party website to MyVR account data. Whether you're building a website with WordPress or SquareSpace, you can use MyVR.js to embedded searchable property lists, showcase availability data, retrieve quotes, and take bookings that feed directly into a MyVR account.

Below you will find a complete reference manual for MyVR.js. For each action, we detail the function call, parameters, and return fields.

Some general rules our library abides by:

  • All field names are camelCase.
  • Functions that return lists are paginated.
  • Date and Time fields follow the ISO-8601 standard.
  • Money fields use integers of cents

Initialization

Including the Javascript Library

To utilize MyVR.js, you need to include the MyVR.js library on your page. The MyVR.js library can be found at https://static.myvr.com/public/myvrjs/v1/myvr.js

Authentication

In order to access the API, you'll need a public API access key.

MyVR Account Holders

API access keys can be created and managed from within your MyVR account. You can generate Live or Test access keys, depending on whether you want to access live data or test data.

MyVR Application Developers

If you're developing a JavaScript application that uses MyVR.js on behalf of a MyVR account holder, you will the account holder to create and share a public API access key with you.

For testing purposes, every MyVR Developer Portal account is provided with a test public API access key. You can use this key to try out MyVR.js and interact with test data. Your test API access key can be found here.

To get started, generate an access key for your account. You will need to initialize MyVR.js with a public API key before performing any actions.

Example Library Include

<script type="text/javascript" src="https://static.myvr.com/public/myvrjs/v1/myvr.js"></script>
                  


Example Authentication

myvr.init("PUBLIC_API_KEY")
                  

Promises

Every action of MyVR.js will return a promise. Our promises have the following methods: .then() , .error() , and .always() .

Promise Methods

                        
                          .then(
                            function(
                              data
                            ){}
                          );
                        
                      
The function passed into .then() will be called if the data is retreived succesfully. The retrieved data will be placed into the data argument of the given function.
                        
                          .error(
                            function(
                              statusCode,
                              data,
                              request
                            ){}
                          );
                        
                      
The function passed into .error() will be called if there is an issue retreiving the data. The status code of the reponse will be placed into the statusCode argument of the given function. The retreived data – often containing error information – will be placed into the data argument of the given function. The XMLHttpRequest object used to make the request will be placed into the request argument of the given function.
                        
                          .always(
                            function(){}
                          );
                        
                      
The function passed into .always() will always be called. It is called after all preceding .then() 's and .errors() 's.

Example Promise Handling

myvr.properties()
                        .then(function(data){
                            // Revel in the beautiful data
                        })
                        .error(function(statusCode, data, request) {
                            // Despair the wicked error
                        })
                        .always(function() {
                            // Check both ways before crossing the street
                        });
                  

Pagination

When a list of objects is requested, a paginated result is returned. We use a limit/offset pagination approach.

Pagination Attributes

limit The maximum number of items to return.
Default: 20
offset The starting position of the result set in relation to the complete set of unpaginated objects.
Default: 0

Request 100 objects starting from the 200th object (ie objects 201-300)

var promise = myvrjs.properties({
                      limit: 100,
                      offset: 200
                  });
                  

Property

Retrieve detailed information about a single property.

Inputs

key
string
The identifier of the property to be retrieved.

Example Call

var promise = myvr.property( "b6b0f2fe278f612b" );


Return Values

accessDescription
string
A description of which parts of the property the guests can access.
accommodates
integer
The number of people the property can accommodate/sleep.
addressOne
string
The primary street address of the property.
addressTwo
string
The secondary street address of the property.
amenities
string
A resource URI for a list of amenities associated with this property.
bathrooms
decimal
The number of bathrooms in the property. Include half baths as 0.5, full baths as 1.0
bedrooms
integer
The number of bedrooms in the property.
checkInTime
time
The standard check-in time for this property.
checkOutTime
time
The standard check-out time for this property.
city
string
The city in which the property is located.
countryCode
string
The two-letter ISO country code for the property.
created
datetime
The ISO-8601 datetime the object was created in MyVR.
currency
choice
The currency used for all rates and fees given as a 3 character ISO 4217 currency code.
  • "ARS" Argentine Peso
  • "AUD" Australian Dollar
  • "BHD" Bahraini Dinar
  • "BBD" Barbados Dollar
  • "BRL" Brazilian Real
  • "GBP" British Pound Sterling
  • "BND" Brunei Dollar
  • "CAD" Canadian Dollar
  • "CLP" Chilean Peso
  • "CNY" Chinese Yuan
  • "CRC" Costa Rican Colon
  • "CZK" Czech Koruna
  • "DKK" Danish Krone
  • "EUR" Euro
  • "GTQ" Guatemalan Quetzal
  • "HKD" Hong Kong Dollar
  • "HUF" Hungarian Forint
  • "ISK" Icelandic Krona
  • "INR" Indian Rupee
  • "IDR" Indonesian Rupiah
  • "ILS" Israeli New Shekel
  • "JMD" Jamaican Dollar
  • "JPY" Japanese Yen
  • "KZT" Kazakhstani Tenge
  • "KWD" Kuwaiti Dinar
  • "MYR" Malaysian Ringgit
  • "MUR" Mauritian Rupee
  • "MXN" Mexican Peso
  • "NPR" Nepalese Rupee
  • "TWD" New Taiwan Dollar
  • "NZD" New Zealand Dollar
  • "NOK" Norwegian Krone
  • "PKR" Pakistani Rupee
  • "PLN" Polish Złoty
  • "QAR" Qatari Rial
  • "RUB" Russian Ruble
  • "SAR" Saudi Riyal
  • "SGD" Singapore Dollar
  • "ZAR" South African Rand
  • "KRW" South Korean Won
  • "LKR" Sri Lankan Rupee
  • "SEK" Swedish Krona
  • "CHF" Swiss Franc
  • "THB" Thai Baht
  • "USD" US Dollar
  • "AED" United Arab Emirates Dirham
customFields
string
description
string
A long form description of the property.
fees
nested
The fees that apply to the property.
  • id string

    The unique identifier of the object in MyVR. This can be used to retrieve the object.

    Deprecated  
  • key string

    The unique identifier of the object in MyVR. This can be used to retrieve the object.

  • type choice

    The type of fee, selected from the choices listed below.

    fee Fee
    security deposit Refundable Security Deposit
    tax Tax
    other Other
    cleaning Cleaning Fee
    pet fee Pet Fee
    per-person-adjustment Per-person-adjustment
  • name string

    The name of the fee.

  • description string

    Your custom descrption of the fee.

  • basis choice

    The method by which the fee is calculated, selected from the choices listed below.

    per-person nightly Flat Rate Per Person Per Night
    flat Flat Rate Per Stay
    monthly Flat Rate Per Month
    per-person Flat Rate Per Person
    nightly Flat Rate Per Night
    Other Other
    total percentage Percentage of Rent, Fees & Taxes
    rent percentage Percentage of Rent
    percentage Percentage of Rent & Taxable Fees
    weekly Flat Rate Per Week
  • cost integer

    The cost associated with this fee. For example, if the basis of the fee is flat, a cost of 10000 would indicate a flat fee of $100.00

    Monetary fields are represented as integers of cents. For example, $5.00 would be represented as 500.

  • included boolean

    Whether or not the fee is included in quotes by default.

  • optional boolean

    Whether or not the fee is optional.

  • selected boolean

    Whether or not the fee is selected by default if it is optional.

  • refundable boolean

    Whether or not the fee can be refunded.

  • taxable boolean

    Whether or not the fee will be used when calculating taxes.

  • percentage decimal

    The percentage that should be used to calculate this fee. For example, a fee for 10% Occupancy Tax would have a value of 10%. When this fee is calculated, the rental rate and all taxable fees are used in the percentage calculation.

  • perPersonAdjustmentThreshold integer

    Per-person adjustment applies when total number of guests is greater than this threshold.

  • perPersonIncludesChildren boolean

    Whether or not children count in per-personfee adjustments.

headline
string
Short, one line, attention grabbing description of the property.
houseRules
string
A breakdown of rules for renters of the property.
id
string
The unique identifier of the object in MyVR. This can be used to retrieve the object.
Deprecated  
instantBookingsEnabled
boolean
Whether this property can be instantly booked.
key
string
The unique identifier of the object in MyVR. This can be used to retrieve the object.
lat
decimal
The latitude of the property, as determined from the provided address.
localAreaDescription
string
A description of the local area.
lon
decimal
The longitude of the property, as determined from the provided address.
lowestRate
integer
The lowest nightly rate of the property.

Monetary fields are represented as integers of cents. For example, $5.00 would be represented as 500.
manual
string
A text field for a property manual.
minGuestAge
integer
Minimum age of the booking guest.
modified
datetime
The ISO-8601 datetime the object was last modified in MyVR.
name
string
The name of the property, as presented to renters.
photos
nested
The photos of the property.
  • altText string

    Text that can be used to convey the same message as the image.

  • caption string

    A caption to accompany the image.

  • largeUrl string

    A link to a copy of the photo that is 1500 pixels in the largest dimension.

  • location choice

    The are of the property the photo depicts, selected from the list of choices below.

    Entertainment Room Entertainment Room
    Bathroom Bathroom
    Living Room Living Room
    Surrounding Area Surrounding Area
    Unknown Unknown
    Garage Garage
    Dining Room Dining Room
    Exterior Exterior
    Bedroom Bedroom
    Other Other
    Kitchen Kitchen
  • mediumUrl string

    A link to a copy of the photo that is 800 pixels in the largest dimension.

  • smallUrl string

    A link to a copy of the photo that is 400 pixels in the largest dimension.

  • thumbnailUrl string

    A link to a copy of the photo that is 128 pixels in the largest dimension.

  • title string

    A title for the photo.

  • url string

    A link to the photo in its original size.

postalCode
string
The postal code associated with the properties address.
rates
nested
The rental rates that apply to the property.
  • name string

    The name of the rate.

  • baseRate boolean

    Whether or not this is the base rate of your property. The base rate is used when no other rates are applicable.

  • startDate string

    The date that the rate will begin being applied. Not applicable for base rates.

  • endDate string

    The date that the rate will stop being applied. Not applicable for base rates.

  • weekNightRate integer

    The price per day on a weekday.

    Monetary fields are represented as integers of cents. For example, $5.00 would be represented as 500.

  • weekendRate integer

    The price per day on a weekend day.

    Monetary fields are represented as integers of cents. For example, $5.00 would be represented as 500.

  • weeklyRate integer

    The price for a 7 night stay.

    Monetary fields are represented as integers of cents. For example, $5.00 would be represented as 500.

  • monthlyRate integer

    The price for a 30 night stay.

    Monetary fields are represented as integers of cents. For example, $5.00 would be represented as 500.

  • minStay integer

    The minumum length of stay required for a reservation.

  • repeat boolean

    Whether or not the rate will repeat for the given date range for all future years. Not applicable for base rates.

  • changeoverDay string

    The day of the week check-in and check-out are allowed. Nullmeans no restriction exists.

region
string
The geographical region/state/province of the property.EG: 'California'
rooms
nested
Detailed breakdown of bedrooms of the property
  • type choice

    The type of bedroom.

    guest Guest Bedroom
    loft Loft
    attic Attic
    basement Basement
    other Other
    master Master Bedroom
    bedroom Bedroom
    studio Studio
    childrens Children's bedroom
  • bedCount integer

    The number of beds in the room.

  • beds nested

    The beds in the room.

    • size choice

      The size of the bed.

      king King Size
      full Full Size
      queen Queen Size
      crib Crib
      twin Single/Twin Size
      other Other
    • type choice

      The type of bed.

      wall-bed Murphy Bed
      hideaway Hideaway
      bunk Bunk Bed
      crib Crib
      standard Standard bed
      rollaway Rollaway Bed
      hammock Hammock
      canopy Canopy
      air Air Bed
      trundle Trundle
      other Other
      sofa-bed Fold-out Sofa Bed
    • mattress choice

      The type of mattress on the bed.

      box Box Spring
      foam Memory Foam
      hybrid Hybrid
      water Waterbed
      other Other
      pillow-top Pillow Top
size
integer
The size of the property in square feet.
slug
string
A human readable unique identifier for the property.
suitableElderly
choice
Is this property suitable for elderly renters?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
suitableEvents
choice
Is this property suitable for events?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
suitableGroups
choice
Is this property suitable for large group rentals?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
suitableHandicap
choice
Is this property suitable for handicap renters?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
suitableInfants
choice
Is this property suitable for renters with infants?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
suitableKids
choice
Is this property suitable for renters with kids?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
suitablePets
choice
Is this property suitable for renters with pets?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
suitableSmoking
choice
Is this property suitable for renters that smoke?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
transitDescription
string
A description of property transit options. Directions, whether the listing is close to public transportation (or far from it), nearby parking options, etc.
type
choice
The type of property, selected from the list of choices below.
  • "farmhouse" Farmhouse
  • "apartment" Apartment
  • "bed-and-breakfast" Bed and Breakfast
  • "villa" Villa
  • "estate" Estate
  • "mobile-home" Mobile Home
  • "house" House
  • "hotel" Hotel
  • "yacht" Yacht
  • "inn" Inn
  • "chalet" Chalet
  • "cabin" Cabin
  • "condo" Condominium
  • "cottage" Cottage
  • "townhouse" Townhouse
  • "castle" Castle
  • "other" Other
  • "boat" Boat
  • "houseboat" Houseboat

Example Response

{
    "accessDescription": null, 
    "accommodates": 11, 
    "addressOne": "11496 Zermatt Dr", 
    "addressTwo": null, 
    "amenities": [
        "4 Ring Stove", 
        "Alarm Clock", 
        "Blender", 
        "Ceiling Fans", 
        "Central Heating", 
        "Coffee Grinder", 
        "Coffee Maker", 
        "Cooking Utensils", 
        "Dishes & Utensils", 
        "Dishwasher", 
        "Dishwasher", 
        "Dryer", 
        "Filtered Water", 
        "Fireplace", 
        "Firewood", 
        "Freezer", 
        "Garage", 
        "Gas Stove", 
        "Grill", 
        "Hair Dryer", 
        "Ice Maker", 
        "Internet", 
        "Kitchen", 
        "Laundry Soap", 
        "Linens", 
        "Living Room", 
        "Microwave", 
        "Oven", 
        "Oven", 
        "Pantry Items", 
        "Paper Towels", 
        "Parking", 
        "Refrigerator", 
        "Security System", 
        "Shampoo", 
        "Soaps", 
        "Sofabed", 
        "Spices", 
        "Toaster", 
        "Toilet Paper", 
        "Towels", 
        "Towels", 
        "Washer", 
        "Washing Machine", 
        "Wireless Internet", 
        "Wood Stove"
    ], 
    "bathrooms": "4.0", 
    "bedrooms": 4, 
    "checkInTime": "16:00:00", 
    "checkOutTime": "10:00:00", 
    "city": "Truckee", 
    "countryCode": "US", 
    "created": "2016-01-19T00:01:48Z", 
    "currency": "USD", 
    "customFields": {}, 
    "description": "Luxurious living, scenic mountain setting, entertainment galore. Located on a quiet street in Tahoe Donner, our well equipped modern home is nestled into the wilderness. A babbling creek greets visitors approaching the front step as it collects into a small pond with a cascading waterfall. <br/>\n<br/>\nInside, over 3,000 sqft of luxurious living space divides itself between two floors. On the first floor, a beautiful kitchen with granite counters, gas stove and stainless steel appliances opens to a large great room centered around a wood burning fireplace and featuring 30' soaring ceilings. A spacious loft overlooks the great room, showcasing a large poker/card table. Upstairs features a large entertainment room, complete with wet bar, shuffleboard table, and state-of-the-art television setup with surround sound. The scenic backyard is accessible from a large deck featuring a new hot tub with seating for 7.", 
    "fees": [
        {
            "id": "caeb9c167089c18e", 
            "key": "caeb9c167089c18e", 
            "type": "cleaning", 
            "name": "Cleaning Fee", 
            "description": null, 
            "basis": "flat", 
            "cost": 25000, 
            "included": true, 
            "optional": false, 
            "selected": false, 
            "refundable": false, 
            "taxable": true, 
            "percentage": null, 
            "perPersonAdjustmentThreshold": 0, 
            "perPersonIncludesChildren": false
        }, 
        {
            "id": "99676ebdd62342e3", 
            "key": "99676ebdd62342e3", 
            "type": "security deposit", 
            "name": "Security Deposit", 
            "description": null, 
            "basis": "flat", 
            "cost": 50000, 
            "included": true, 
            "optional": false, 
            "selected": false, 
            "refundable": true, 
            "taxable": false, 
            "percentage": null, 
            "perPersonAdjustmentThreshold": 0, 
            "perPersonIncludesChildren": false
        }
    ], 
    "headline": "Beautiful Four Bedroom Lake Front Property", 
    "houseRules": null, 
    "id": "b6b0f2fe278f612b", 
    "instantBookingsEnabled": false, 
    "key": "b6b0f2fe278f612b", 
    "lat": "39.3422523000", 
    "localAreaDescription": "Tahoe Donner is a year round activity resort. The amenities include private beach/boat launching facilities, pools, recreation center, tennis, horseback riding, golf, downhill skiing as well as cross country skiing. Truckee is a historical mining town-having a western feel but also has museums, theaters, fine dining plus 2 large supermarkets-all less than 3 miles from the house. Our home is also located within a 15 minute drive to 4 major ski resorts. Downtown Reno is a short 40 minute drive away for those seeking a night on the town or the thrill of a Nevada casino.", 
    "lon": "-120.2271947000", 
    "lowestRate": 39500, 
    "manual": "", 
    "minGuestAge": 18, 
    "modified": "2019-10-18T17:18:43Z", 
    "name": "API Demo Property", 
    "photos": [
        {
            "altText": "", 
            "caption": "", 
            "largeUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/1500x1500/a391b295c6.jpg", 
            "location": "Unknown", 
            "mediumUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/800x800/a391b295c6.jpg", 
            "smallUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/400x400/a391b295c6.jpg", 
            "thumbnailUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/128x128/a391b295c6.jpg", 
            "title": "", 
            "url": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/a391b295c6.jpg"
        }, 
        {
            "altText": "", 
            "caption": "", 
            "largeUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/1500x1500/d941b18613.jpg", 
            "location": "Unknown", 
            "mediumUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/800x800/d941b18613.jpg", 
            "smallUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/400x400/d941b18613.jpg", 
            "thumbnailUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/128x128/d941b18613.jpg", 
            "title": "", 
            "url": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/d941b18613.jpg"
        }, 
        {
            "altText": "", 
            "caption": "", 
            "largeUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/1500x1500/house-front.jpg", 
            "location": "Unknown", 
            "mediumUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/800x800/house-front.jpg", 
            "smallUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/400x400/house-front.jpg", 
            "thumbnailUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/128x128/house-front.jpg", 
            "title": "", 
            "url": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/house-front.jpg"
        }
    ], 
    "postalCode": "96161", 
    "rates": [
        {
            "name": "Base Rate", 
            "baseRate": true, 
            "startDate": null, 
            "endDate": null, 
            "weekNightRate": 39500, 
            "weekendRate": 0, 
            "weeklyRate": 250000, 
            "monthlyRate": 0, 
            "minStay": 3, 
            "repeat": true, 
            "changeoverDay": null
        }, 
        {
            "name": "Ski Season", 
            "baseRate": false, 
            "startDate": "2019-12-01", 
            "endDate": "2020-05-15", 
            "weekNightRate": 49500, 
            "weekendRate": 0, 
            "weeklyRate": 0, 
            "monthlyRate": 0, 
            "minStay": 3, 
            "repeat": true, 
            "changeoverDay": null
        }
    ], 
    "region": "CA", 
    "rooms": [
        {
            "type": "master", 
            "bedCount": 1, 
            "beds": [
                {
                    "size": "king", 
                    "type": "standard", 
                    "mattress": "box"
                }
            ]
        }, 
        {
            "type": "bedroom", 
            "bedCount": 1, 
            "beds": [
                {
                    "size": "queen", 
                    "type": "standard", 
                    "mattress": "box"
                }
            ]
        }, 
        {
            "type": "bedroom", 
            "bedCount": 2, 
            "beds": [
                {
                    "size": "full", 
                    "type": "standard", 
                    "mattress": "box"
                }, 
                {
                    "size": "full", 
                    "type": "standard", 
                    "mattress": "box"
                }
            ]
        }, 
        {
            "type": "bedroom", 
            "bedCount": 2, 
            "beds": [
                {
                    "size": "twin", 
                    "type": "standard", 
                    "mattress": "box"
                }, 
                {
                    "size": "twin", 
                    "type": "bunk", 
                    "mattress": "box"
                }
            ]
        }
    ], 
    "size": 3000, 
    "slug": "api-demo-property", 
    "suitableElderly": "yes", 
    "suitableEvents": "unknown", 
    "suitableGroups": "yes", 
    "suitableHandicap": "no", 
    "suitableInfants": "unknown", 
    "suitableKids": "yes", 
    "suitablePets": "no", 
    "suitableSmoking": "no", 
    "transitDescription": null, 
    "type": "house"
}

Properties

Retrieve a filtered list of properties.

Inputs

accommodates
integer
List properties that accommodate this many or more guests.
Optional  
bedrooms
integer
List properties with this many or more bedrooms.
Optional  
bathrooms
decimal
List properties with this many or more bathrooms.
Optional  
group
string
List properties that belong to a property group with a name containing this value. This field is case insensitive.
Optional  
latitudeMax
float
List properties that have a latitude less than this value.
Optional  
latitudeMin
float
List properties that have a latitude greater than this value.
Optional  
longitudeMax
float
List properties that have a longitude less than this value.
Optional  
longitudeMin
float
List properties that have a longitude greater than this value.
Optional  
currency
choice
List properties that use this currency for rates. This value should be given as a 3 character ISO 4217 currency code.
Optional  
lowestRateMax
integer
List properties that have a lowest rate that is less than this value. This value should be given as an integer of cents. The currency field is required whenusing this filter.
Optional  
lowestRateMin
integer
List properties that have a lowest rate that is greater than this value. This value should be given as an integer of cents. The currency field is required whenusing this filter.
Optional  
name
string
List properties that have names containing this value. This field is case insensitive.
Optional  
suitableElderly
choice
List properties that have the given suitability policy for edlerly guests. This field is passed in either as a string or an array of strings. Use one of the following values for each input.
Optional  
suitableGroups
choice
List properties that have the given suitability policy for large groups. This field is passed in either as a string or an array of strings. Use one of the following values for each input.
Optional  
suitableHandicap
choice
List properties that have the given suitability policy for handicap guests. This field is passed in either as a string or an array of strings. Use one of the following values for each input.
Optional  
suitableKids
choice
List properties that have the given suitability policy for children. This field is passed in either as a string or an array of strings. Use one of the following values for each input.
Optional  
suitablePets
choice
List properties that have the given suitability policy for pets. This field is passed in either as a string or an array of strings. Use one of the following values for each input.
Optional  
suitableSmoking
choice
List properties that have the given suitability policy for smoking. This field is passed in either as a string or an array of strings. Use one of the following values for each input.
Optional  
type
choice
List properties that are of the given type.Use one of the types listed below.
Optional  
startDate
date
List properties availaible for a stay that starts on this ISO-8601 date.
Optional  
endDate
date
List properties available for a stay that ends on this ISO-8601 date.
Optional  
groups
string
List properties that belong to ANY of the provided property groups. Specify a comma separated list of property group keys.
Optional  
groupsAll
string
List properties that belong to ALL of the provided property groups. Specify a comma separated list of property group keys.
Optional  

Example Call

var promise = myvr.properties({
    accommodates: 5,
    bedrooms: 2,
    bathrooms: "3",
    group: "All Properties",
    latitudeMax: 39.4,
    latitudeMin: 39.3,
    longitudeMax: -120.2,
    longitudeMin: -120.3,
    currency: "USD",
    lowestRateMax: 30000,
    lowestRateMin: 40000,
    name: "API Demo Property",
    suitableElderly: "yes",
    suitableGroups: "yes",
    suitableHandicap: ["yes", "no"],
    suitableKids: "yes",
    suitablePets: "no",
    suitableSmoking: "no",
    type: "house",
    startDate: "2016-01-01",
    endDate: "2016-02-01",
    groups: "b122a0ff5a236ce1,86a575b701c740d8",
    groupsAll: "b122a0ff5a236ce1,86a575b701c740d8",
});


Return Values

id
string
The unique identifier of the object in MyVR. This can be used to retrieve the object.
Deprecated  
key
string
The unique identifier of the object in MyVR. This can be used to retrieve the object.
slug
string
A human readable unique identifier for the property.
accommodates
integer
The number of people the property can accommodate/sleep.
bathrooms
decimal
The number of bathrooms in the property. Include half baths as 0.5, full baths as 1.0
bedrooms
integer
The number of bedrooms in the property.
city
string
The city the property in which the property is located.
country
string
The country in which the property is located
currency
choice
The currency used for all rates and fees given as a 3 character ISO 4217 currency code.
  • "ARS" Argentine Peso
  • "AUD" Australian Dollar
  • "BHD" Bahraini Dinar
  • "BBD" Barbados Dollar
  • "BRL" Brazilian Real
  • "GBP" British Pound Sterling
  • "BND" Brunei Dollar
  • "CAD" Canadian Dollar
  • "CLP" Chilean Peso
  • "CNY" Chinese Yuan
  • "CRC" Costa Rican Colon
  • "CZK" Czech Koruna
  • "DKK" Danish Krone
  • "EUR" Euro
  • "GTQ" Guatemalan Quetzal
  • "HKD" Hong Kong Dollar
  • "HUF" Hungarian Forint
  • "ISK" Icelandic Krona
  • "INR" Indian Rupee
  • "IDR" Indonesian Rupiah
  • "ILS" Israeli New Shekel
  • "JMD" Jamaican Dollar
  • "JPY" Japanese Yen
  • "KZT" Kazakhstani Tenge
  • "KWD" Kuwaiti Dinar
  • "MYR" Malaysian Ringgit
  • "MUR" Mauritian Rupee
  • "MXN" Mexican Peso
  • "NPR" Nepalese Rupee
  • "TWD" New Taiwan Dollar
  • "NZD" New Zealand Dollar
  • "NOK" Norwegian Krone
  • "PKR" Pakistani Rupee
  • "PLN" Polish Złoty
  • "QAR" Qatari Rial
  • "RUB" Russian Ruble
  • "SAR" Saudi Riyal
  • "SGD" Singapore Dollar
  • "ZAR" South African Rand
  • "KRW" South Korean Won
  • "LKR" Sri Lankan Rupee
  • "SEK" Swedish Krona
  • "CHF" Swiss Franc
  • "THB" Thai Baht
  • "USD" US Dollar
  • "AED" United Arab Emirates Dirham
currencySymbol
string
The symbol of the currency used for all rates and fees.
headline
string
Short, one line, attention grabbing description of the property.
description
string
A long form description of the property.
lat
decimal
The latitude at which the property is located.
lon
decimal
The longitude at which the property is located.
lowestRate
integer
The lowest nightly rate of the property.

Monetary fields are represented as integers of cents. For example, $5.00 would be represented as 500.
name
string
The name of the property, as presented to renters.
photo
nested
The photo of the property that is currently first in the property photo list.
  • altText string

    Text that can be used to convey the same message as the image.

  • caption string

    A caption to accompany the image.

  • largeUrl string

    A link to a copy of the photo that is 1500 pixels in the largest dimension.

  • location choice

    The are of the property the photo depicts, selected from the list of choices below.

    Entertainment Room Entertainment Room
    Bathroom Bathroom
    Living Room Living Room
    Surrounding Area Surrounding Area
    Unknown Unknown
    Garage Garage
    Dining Room Dining Room
    Exterior Exterior
    Bedroom Bedroom
    Other Other
    Kitchen Kitchen
  • mediumUrl string

    A link to a copy of the photo that is 800 pixels in the largest dimension.

  • smallUrl string

    A link to a copy of the photo that is 400 pixels in the largest dimension.

  • thumbnailUrl string

    A link to a copy of the photo that is 128 pixels in the largest dimension.

  • title string

    A title for the photo.

  • url string

    A link to the photo in its original size.

size
integer
The size of the property in square feet.
state
string
The state in which the property is located.
suitableElderly
choice
Is this property suitable for elderly renters?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
suitableEvents
choice
Is this property suitable for events?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
suitableGroups
choice
Is this property suitable for large group rentals?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
suitableHandicap
choice
Is this property suitable for handicap renters?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
suitableInfants
choice
Is this property suitable for renters with infants?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
suitableKids
choice
Is this property suitable for renters with kids?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
suitablePets
choice
Is this property suitable for renters with pets?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
suitableSmoking
choice
Is this property suitable for renters that smoke?
  • "inquire" Inquire
  • "unknown" Unknown
  • "yes" Yes
  • "no" No
type
choice
The type of property, selected from the list of choices below.
  • "farmhouse" Farmhouse
  • "apartment" Apartment
  • "bed-and-breakfast" Bed and Breakfast
  • "villa" Villa
  • "estate" Estate
  • "mobile-home" Mobile Home
  • "house" House
  • "hotel" Hotel
  • "yacht" Yacht
  • "inn" Inn
  • "chalet" Chalet
  • "cabin" Cabin
  • "condo" Condominium
  • "cottage" Cottage
  • "townhouse" Townhouse
  • "castle" Castle
  • "other" Other
  • "boat" Boat
  • "houseboat" Houseboat

Example Response

{
    "count": 100, 
    "limit": 25, 
    "offset": 25, 
    "results": [
        {
            "id": "b6b0f2fe278f612b", 
            "key": "b6b0f2fe278f612b", 
            "slug": "api-demo-property", 
            "accommodates": 11, 
            "bathrooms": "4.0", 
            "bedrooms": 4, 
            "city": "Truckee", 
            "country": "United States", 
            "currency": "USD", 
            "currencySymbol": "$", 
            "headline": "Beautiful Four Bedroom Lake Front Property", 
            "description": "Luxurious living, scenic mountain setting, entertainment galore. Located on a quiet street in Tahoe Donner, our well equipped modern home is nestled into the wilderness. A babbling creek greets visitors approaching the front step as it collects into a small pond with a cascading waterfall. <br/>\n<br/>\nInside, over 3,000 sqft of luxurious living space divides itself between two floors. On the first floor, a beautiful kitchen with granite counters, gas stove and stainless steel appliances opens to a large great room centered around a wood burning fireplace and featuring 30' soaring ceilings. A spacious loft overlooks the great room, showcasing a large poker/card table. Upstairs features a large entertainment room, complete with wet bar, shuffleboard table, and state-of-the-art television setup with surround sound. The scenic backyard is accessible from a large deck featuring a new hot tub with seating for 7.", 
            "lat": "39.3422523000", 
            "lon": "-120.2271947000", 
            "lowestRate": 39500, 
            "name": "API Demo Property", 
            "photo": {
                "altText": "", 
                "caption": "", 
                "largeUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/1500x1500/a391b295c6.jpg", 
                "location": "Unknown", 
                "mediumUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/800x800/a391b295c6.jpg", 
                "smallUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/400x400/a391b295c6.jpg", 
                "thumbnailUrl": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/128x128/a391b295c6.jpg", 
                "title": "", 
                "url": "//image.myvr.com/b45b80f1d8764037/729dc028c692c4a0/a391b295c6.jpg"
            }, 
            "size": 3000, 
            "state": "CA", 
            "suitableElderly": "yes", 
            "suitableEvents": "unknown", 
            "suitableGroups": "yes", 
            "suitableHandicap": "no", 
            "suitableInfants": "unknown", 
            "suitableKids": "yes", 
            "suitablePets": "no", 
            "suitableSmoking": "no", 
            "type": "house"
        }
    ]
}
NOTE: The above example response only shows one result for brevity, whereas the meta info indicates it should have 25.

Availability

Retrieve an array of items representing blocking calendar events. If there are no blocking events for a date range, it's safe to assume a property is available. It's possible for there to be multiple overlapping events for a particular date range.

Inputs

property
string
The property for which to retrieve availability data.
startDate
date
The lowest ISO-8601 date from which to retrieve calendar events.
Optional  
endDate
date
The highest ISO-8601 date from which to retrieve calendar events.
Optional  

Example Call

var promise = myvr.availability({
    property: "b6b0f2fe278f612b",
    startDate: "2017-01-01",
    endDate: "2017-02-01",
});


Return Values

id
string
The unique identifier of the object in MyVR. This can be used to retrieve the object.
Deprecated  
key
string
The unique identifier of the object in MyVR. This can be used to retrieve the object.
startDate
date
The date at which the calendar event begins.
endDate
date
The date at which the calendar event ends.
status
choice
The status of the event, selected from the list of choices below.
  • "hold" h
  • "reserved" r
  • "unavailable" u

Example Response

{
    "count": 100, 
    "limit": 25, 
    "offset": 25, 
    "results": [
        {
            "id": "cd5dc8b7e8fd2512", 
            "key": "cd5dc8b7e8fd2512", 
            "startDate": "2016-02-01", 
            "endDate": "2016-02-07", 
            "status": "reserved"
        }
    ]
}
NOTE: The above example response only shows one result for brevity, whereas the meta info indicates it should have 25.

Quote

Retrieve an estimated cost for a stay.

Inputs

property
string
The property for which the quote is being generated.
adults
integer
The number of adults to stay at the property.
Optional  
children
integer
The number of children to stay at the property.
Optional  
checkIn
date
The ISO-8601 date for check-in.
checkOut
date
The ISO-8601 date for check-out.
addons
string
The optional fees to be applied to the quote. Passed in as an array of fee keys or as a single fee key.
Optional  

Example Call

var promise = myvr.quote({
    property: "b6b0f2fe278f612b",
    adults: 1,
    children: 1,
    checkIn: "2016-01-01",
    checkOut: "2016-02-01",
    addons: ["caeb9c167089c18e", "99676ebdd62342e3"],
});


Return Values

adults
integer
The number of guests who are adults.
children
integer
The number of guests who are children.
pets
boolean
Whether or not the guests plan on brining pets.
smoker
boolean
Whether or not the guests are smokers.
checkIn
date
The first day of the stay.
checkOut
date
The last day of the stay.
duration
integer
The total number of nights of the stay.
overlapExists
boolean
Whether or not the stay dates overlap with another blocking event in the property's calendar
currency
string
The ISO 4217 currency code of the currency in which the renter will be charged.
currencySymbol
string
The symbol of the currency in which the renter will be charged.
amount
integer
The total amount to be charged including all fees and rent represented as an integer of cents.

Monetary fields are represented as integers of cents. For example, $5.00 would be represented as 500.
totalDue
integer
The total amount the renter owes at the time of booking represented as an integer of cents.

Monetary fields are represented as integers of cents. For example, $5.00 would be represented as 500.
fees
nested
The fees to be applied to the stay.
  • id string

    The unique identifier of the object in MyVR. This can be used to retrieve the object.

    Deprecated  
  • key string

    The unique identifier of the object in MyVR. This can be used to retrieve the object.

  • name string

    The name of the fee.

  • type choice

    The type of fee.

    fee Fee
    promo Promotion
    tax Tax
    occupancy Per-person-adjustment
    pet Pet Fee
    other Other
    cleaning Cleaning Fee
    deposit Refundable Security Deposit
  • description string

    Your custom description of the fee.

  • amount integer

    The total cost of the fee represented as an integer of cents.

    Monetary fields are represented as integers of cents. For example, $5.00 would be represented as 500.

  • included boolean

    Whether or not the fee is included in quotes by default

  • refundable boolean

    Whether or not the fee can be refunded.

  • optional boolean

    Whether or not the fee is optional.

  • selected boolean

    Whether or not the fee should be selected by default if it is optional.

totalRefundableFees
integer
The total of all refundable fees on this quote. represented as an integer of cents.

Monetary fields are represented as integers of cents. For example, $5.00 would be represented as 500.
totalNonrefundableFees
integer
The total of all nonrefundable fees on this quote represented as an integer of cents.

Monetary fields are represented as integers of cents. For example, $5.00 would be represented as 500.
rates
nested
The rates used to generate the quote.
  • name string

    The name of the rate.

  • amount integer

    The total amount that will be charged for the nights stayed durign the rate period represented as an integer of cents.

    Monetary fields are represented as integers of cents. For example, $5.00 would be represented as 500.

  • duration integer

    The number of nights of the stay that are during the rate period.

  • startDate date

    The first day that the rate is applied.

  • endDate date

    The last day that the rate is applied.

totalRent
integer
The total of all rates on this quote represented as an integer of cents.

Monetary fields are represented as integers of cents. For example, $5.00 would be represented as 500.
payments
nested
The payment schedule of the quote.
  • amount integer

    The amount to be paid by the payment represented as an integer of cents.

    Monetary fields are represented as integers of cents. For example, $5.00 would be represented as 500.

  • collectWhileBooking boolean

    Whether or not the payment will be collected at the time of booking.

  • dueDate date

    The date that the payment is due.

refundPeriods
nested
The refund policy of the quote.
  • days integer

    The number of days in advanced that the refund is accepted.

  • percentage integer

    The percentage of the amount paid that can be refunded.

Example Response

{
    "adults": 1, 
    "children": 0, 
    "pets": false, 
    "smoker": false, 
    "checkIn": "2016-02-01", 
    "checkOut": "2016-02-07", 
    "duration": 6, 
    "overlapExists": true, 
    "currency": "USD", 
    "currencySymbol": "$", 
    "amount": 335700, 
    "totalDue": 285700, 
    "fees": [
        {
            "id": "f380332759c450b2", 
            "key": "f380332759c450b2", 
            "name": "Occupancy Tax", 
            "type": "tax", 
            "description": null, 
            "amount": 23700, 
            "included": true, 
            "refundable": false, 
            "optional": false, 
            "selected": false
        }, 
        {
            "id": "8df260dba00e022e", 
            "key": "8df260dba00e022e", 
            "name": "Cleaning", 
            "type": "fee", 
            "description": null, 
            "amount": 25000, 
            "included": true, 
            "refundable": false, 
            "optional": true, 
            "selected": true
        }, 
        {
            "id": "de41badf0492a072", 
            "key": "de41badf0492a072", 
            "name": "Refundable Security Deposit", 
            "type": "deposit", 
            "description": null, 
            "amount": 50000, 
            "included": true, 
            "refundable": true, 
            "optional": false, 
            "selected": false
        }
    ], 
    "totalRefundableFees": 50000, 
    "totalNonrefundableFees": 48700, 
    "rates": [
        {
            "name": "Base Rate", 
            "amount": 237000, 
            "duration": 6, 
            "startDate": "2016-02-01", 
            "endDate": "2016-02-06"
        }
    ], 
    "totalRent": 237000, 
    "payments": [
        {
            "amount": 335700, 
            "collectWhileBooking": false, 
            "dueDate": null
        }
    ], 
    "refundPeriods": [
        {
            "days": 32767, 
            "percentage": 0
        }
    ]
}

Inquire

Create an inquiry for a property.

Inputs

property
string
The property for which the inquiry is being generated.
adults
integer
The number of adults to stay at the property.
Optional  
children
integer
The number of children to stay at the property.
Optional  
checkIn
date
The ISO-8601 date for check-in.
checkOut
date
The ISO-8601 date for check-out.
firstName
string
The first name of the guest.
Optional  
lastName
string
The last name of the guest.
Optional  
email
email
The email address of the guest.
phone
string
The phone number of the guest.
Optional  
pets
boolean
If the guest intends to bring pets.
Optional  
smokers
boolean
If the guest needs a smoking unit.
Optional  
comments
string
A message from the renter about the inquiry.
Optional  

Example Call

var promise = myvr.inquire({
    property: "b6b0f2fe278f612b",
    adults: 1,
    children: 1,
    checkIn: "2016-01-01",
    checkOut: "2016-02-01",
    firstName: "John",
    lastName: "Doe",
    email: "johndoe@gmail.com",
    phone: "555-867-5309",
    pets: true,
    smokers: false,
    comments: "",
});


Return Values

property
string
The property for which to create an inquiry.
source_application
hidden
source
hidden
checkIn
date
The ISO-8601 date for check-in
checkOut
date
The ISO-8601 date for check-out
adults
integer
The integer number of adults staying
children
integer
The integer number of children staying
firstName
string
The first name of the person inquiring about the property.
lastName
string
The last name of the person inquiring about the property.
myvr_source_code
hidden
phone
string
The phone number of the person inquiring about the property.
email
email
The email address of the person inquiring about the property.
pets
boolean
Whether or not person inquiring plans to bring pets.
smoker
boolean
Whether or not any of the guests are smokers.
comments
string
A message from the renter about the inquiry.

Example Response

{
    "checkIn": "2016-02-01", 
    "checkOut": "2016-02-07", 
    "adults": 1, 
    "children": 0, 
    "firstName": "John", 
    "lastName": "Doe", 
    "phone": "15555555555", 
    "email": "John@Doe.com", 
    "pets": false, 
    "smoker": false, 
    "comments": null
}

Book

Initiate the booking process for a property.

Inputs

property
string
The property for which the quote is being generated.
adults
integer
The number of adults to stay at the property.
Optional  
children
integer
The number of children to stay at the property.
Optional  
checkIn
date
The ISO-8601 date for check-in.
checkOut
date
The ISO-8601 date for check-out.
addons
string
The optional fees to be applied to the quote. Passed in as an array of fee keys or as a single fee key.
Optional  

Example Call

var promise = myvr.book({
    property: "b6b0f2fe278f612b",
    adults: 1,
    children: 1,
    checkIn: "2016-01-01",
    checkOut: "2016-02-01",
    addons: ["caeb9c167089c18e", "99676ebdd62342e3"],
});