NAV Navbar
shell

Introduction

Version: 1.0 Last Update: 19 March 2019

Authentication

Requests are authorized using an API key. Please request your API key at support@maxrevenue.clib

List compsets

GET /api-1-0-compsets

curl "https://us-central1-max-revenue.cloudfunctions.net/api-1-0-compsets?key={api-key}"

JSON response:

[
  {
    "hotel_id": "1231880102690321",
    "hotel_name": "My Hotel Inn",
    "currency": "USD"
  }
]

CSV response:

hotel_id,hotel_name,currency
1231880102690321,My Hotel Inn,USD

This endpoint retrieves all compsets available for your account.

Query Parameters

Parameter Description
key required Please request your API key at support@maxrevenue.clib
t optional Sets type of output transformation. Possible values: '0', 'csv'. Default: '0'. Example: '/api-1-0-compsets?key={api-key}&t=csv'.

Response

Attributes Type Description
hotel_id string Unique identifier for hotel.
name string Hotel name.
currency string Three-letter ISO currency code, in uppercase.

List compset hotels

GET /api-1-0-compset-hotels

curl "https://us-central1-max-revenue.cloudfunctions.net/api-1-0-compset-hotels?key={api-key}"

JSON response:

[
    ...
    {
        "id": "1231880102690321",
        "name": "My Hotel Inn",
        "star_rating": 5,
        "total_rooms": 200,
        "a_guest_rating": 9.1,
        "a_total_reviews": 4,
        "b_guest_rating": 8.5,
        "b_total_reviews": 119,
        "e_guest_rating": 4.5,
        "e_total_reviews": 49,
        "p_guest_rating": 0,
        "p_total_reviews": 0,
        "t_guest_rating": 4.5,
        "t_total_reviews": 878,
        "t_ranking": "#5 of 203 hotels in Hospitality City"
    },
    ...
]

CSV response:

id,name,star_rating,total_rooms,a_guest_rating,a_total_reviews,b_guest_rating,b_total_reviews,e_guest_rating,e_total_reviews,p_guest_rating,p_total_reviews,t_guest_rating,t_total_reviews,t_ranking
4190409133228032,Best Western Hospitality City,5,155,6.8,1,8.3,34,4.5,15,0,0,5,254,#1 of 201 hotels in Hospitality City
4524953615040512,Holiday Inn Hospitality City,5,164,8.4,48,8.1,118,4.4,83,8.5,2,4.5,1348,#2 of 201 hotels in Hospitality City
1231880102690321,My Hotel Inn,5,200,9.1,4,8.5,119,4.5,49,0,0,4.5,874,#5 of 201 hotels in Hospitality City
4141305510330368,Hilton Hospitality City,5,210,8.6,71,8.6,648,4.5,156,9.5,2,4.5,858,#11 of 201 hotels in Hospitality City
4176650960470016,Hyatt Regency Hospitality City,5,178,8.7,107,8.6,540,4.4,160,7,2,4.5,1149,#10 of 201 hotels in Hospitality City
5205401089441792,Marriott Hospitality City,4,63,8.2,38,8.3,97,3.8,30,8.3,98,4.5,868,#3 of 201 hotels in Hospitality City
3841147132280832,Wyndham Hospitality City,5,184,0,0,8.1,424,4.1,109,,,4.5,1119,#6 of 201 hotels in Hospitality City

This endpoint retrieves details for hotels of specific compset indentified by hotel id.

Query Parameters

Parameter Description
key required Please request your API key at support@maxrevenue.clib
hotel_id required The id comes in api-1-0-compsets response
t optional Sets type of output transformation. Possible values: '0', 'csv'. Default: '0'. Example: '/api-1-0-compset-hotels?key={api-key}&t=csv'.

Response

Attributes Type Description
id string Unique identifier for hotel.
name string Hotel name.
star_rating decimal Star rating.
total_rooms integer Total number of rooms.
a_guest_rating decimal Average guest rating at Agoda.com.
a_total_reviews integer Total number of reviews at Agoda.com.
b_guest_rating decimal Average guest rating at Booking.com.
b_total_reviews integer Total number of reviews at Booking.com.
e_guest_rating decimal Average guest rating at Expedia.com.
e_total_reviews integer Total number of reviews at Expedia.com.
p_guest_rating decimal Average guest rating at Priceline.com.
p_total_reviews integer Total number of reviews at Priceline.com.
t_guest_rating decimal Average guest rating at Tripadvisor.com.
t_total_reviews integer Total number of reviews at Tripadvisor.com.
t_ranking string Ranking at Tripadvisor.com.

List compset regions

GET /api-1-0-compset-regions

curl "https://us-central1-max-revenue.cloudfunctions.net/api-1-0-compset-regions?key={api-key}"

JSON response:

[
    {
        "id": "5126853",
        "name": "Hospitality City"
    },
    ...
]

CSV response:

id,name
5126853,Hospitality City
278305,Hospitality City Downtown
7004910,Hospitality City North
7056710,Hospitality City South
7151902,Hospitality City West

This endpoint retrieves details for regions of specific compset indentified by hotel id.

Query Parameters

Parameter Description
key required Please request your API key at support@maxrevenue.clib
hotel_id required The id comes in api-1-0-compsets response
t optional Sets type of output transformation. Possible values: '0', 'csv'. Default: '0'. Example: '/api-1-0-compset-regions?key={api-key}&hotel_id={hotel-id}&t=csv'.

Response

Attributes Type Description
id string Unique identifier for region.
name string Region name.

List compset rates

GET /api-1-0-rates

curl "https://us-central1-max-revenue.cloudfunctions.net/api-1-0-rates?key={api-key}"

JSON response (t=0):

{
    ...
    "4176650960470016|2019-03-27": {
        "rate_map": {
            "Cancelon": 327,
            "Booking.com": 349,
            "Hotelpower.com": 402,
            "Orbitz.com": 349,
            "Hotwire.com": 349,
            "Prestigia.com": 356,
            "Otel.com": 321,
            "Hotels.com": 349,
            "AMOMA": 330,
            "ZenHotels.com": 364,
            "Travelocity": 349,
            "getaroom.com": 349,
            "Priceline": 349,
            "Expedia.com": 349,
            "Agoda.com": 313,
            "Hyatt.com": 349
        },
        "rate": 349
    }
    ...
}

JSON response (t=1):

{
    ...
    "4176650960470016": {
        "2019-03-24": 189,
        "2019-03-25": 266,
        "2019-03-26": 389,
        "2019-03-27": 349,
        "2019-03-28": 199,
        "2019-03-29": 289,
        "2019-03-30": 179,
        "2019-03-31": 179,
        "2019-04-01": 489,
        "2019-04-02": 599
    },
    ...
}

JSON response (t=2):

{
    ...
    "2019-03-27": {
        "4190409133228032": 599,
        "4524953615040512": 490,
        "1231880102690321": 499,
        "4141305510330368": 309,
        "4176650960470016": 349,
        "5205401089441792": -1,
    "3841147132280832": 128
    },
    ...
}

CSV response:

Date,4190409133228032,4524953615040512,1231880102690321,4141305510330368,4176650960470016,5205401089441792,3841147132280832
2019-03-24,399,409,199,159,189,119,98
2019-03-25,,429,280,279,266,160,
2019-03-26,799,499,,369,389,377,159
2019-03-27,599,499,490,309,349,,128
2019-03-28,399,449,280,189,199,125,98
2019-03-29,419,350,199,159,289,122,98
2019-03-30,419,359,199,169,179,122,98
2019-03-31,419,359,199,169,179,122,98
2019-04-01,699,659,,359,489,202,148
2019-04-02,,499,490,489,599,233,159

This endpoint retrieves rates of specific compset indentified by hotel id.

Query Parameters

Parameter Description
key required Please request your API key at support@maxrevenue.clib
hotel_id required The id comes in api-1-0-compsets response
t optional Sets type of output transformation. Possible values: '0', '1', '2', 'csv'. Default: '0'. Example: '/api-1-0-rates?key={api-key}&hotel_id={hotel-id}&t=csv'.
days optional Number of days. Overridden by month and year parameters. Possible values: '1' .. '365'. Default: '10'. Example: '/api-1-0-rates?key={api-key}&hotel_id={hotel-id}&days=30'.
month optional Number of month in year. Always used with year parameter. Possible values: '1' .. '12'. Example: '/api-1-0-rates?key={api-key}&hotel_id={hotel-id}&month=3&year=2019'.
year optional Number of years. Always used with month parameter. Example: '/api-1-0-rates?key={api-key}&hotel_id={hotel-id}&month=3&year=2019'.

Response

The rates are presented as integers in currency specified for compset.

List regional demand

GET /api-1-0-demand

curl "https://us-central1-max-revenue.cloudfunctions.net/api-1-0-demand?key={api-key}"

JSON response (t=0):

{
    ...
    "5126853|2019-03-27": {
        "status": "LIGHT",
        "score": 16
    }
    ...
}

JSON response (t=1):

{
    ...
    "5126853": {
        "2019-03-24": 46,
        "2019-03-25": 47,
        "2019-03-26": 45,
        "2019-03-27": 16,
        "2019-03-28": 44,
        "2019-03-29": 45,
        "2019-03-30": 46,
        "2019-03-31": 43,
        "2019-04-01": 49,
        "2019-04-02": 45
    },
    ...
}

JSON response (t=2):

{
    ...
    "2019-03-27": {
        "5126853": 16,
        "278305": 46,
        "7004910": -1,
        "7056710": 49,
        "7151902": 39
    },
    ...
}

CSV response:

Date,5126853,278305,7004910,7056710,7151902
2019-03-24,46,28,,49,42
2019-03-25,47,52,,58,26
2019-03-26,45,49,54,54,41
2019-03-27,16,46,,49,39
2019-03-28,44,47,,49,38
2019-03-29,45,14,51,49,39
2019-03-30,46,21,,51,44
2019-03-31,43,14,,50,46
2019-04-01,49,48,52,,49
2019-04-02,45,47,21,61,20

This endpoint retrieves regional demand values of specific compset indentified by hotel id.

Query Parameters

Parameter Description
key required Please request your API key at support@maxrevenue.clib
hotel_id required The id comes in api-1-0-compsets response
t optional Sets type of output transformation. Possible values: '0', '1', '2', 'csv'. Default: '0'. Example: '/api-1-0-demand?key={api-key}&hotel_id={hotel-id}&t=csv'.
days optional Number of days. Overridden by month and year parameters. Possible values: '1' .. '365'. Default: '10'. Example: '/api-1-0-demand?key={api-key}&hotel_id={hotel-id}&days=30'.
month optional Number of month in year. Always used with year parameter. Possible values: '1' .. '12'. Example: '/api-1-0-demand?key={api-key}&hotel_id={hotel-id}&month=3&year=2019'.
year optional Number of years. Always used with month parameter. Example: '/api-1-0-demand?key={api-key}&hotel_id={hotel-id}&month=3&year=2019'.

Response

The demand values are presented as integers in %.