Get Room List

This endpoint retrieves all rooms / rates of the property.

Request

GET https://app.hotelrunner.com/api/v2/apps/rooms

// Example Request Snippet for JavaScript XHR

var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.hotelrunner.com/api/v2/apps/rooms?token={TOKEN}&hr_id={HR_ID}");
xhr.setRequestHeader("cache-control", "no-cache");

xhr.send(data);

The above command returns JSON structured like this:

{
    "rooms": [
        {
            "rate_code": "HR:1",
            "inv_code": "HR:1",
            "availability_update": true,
            "restrictions_update": true,
            "price_update": true,
            "name": "Standard Room",
            "description": "Standard Room Description",
            "policy": "Standard Room Policy",
            "room_capacity": 3,
            "adult_capacity": 2,
            "is_master": false,
            "channel_codes": [
                "bookingcom",
                "online",
                "hrs",
                "expedia"
            ]
        },
        {
            "rate_code": "NR:HR:1",
            "inv_code": "HR:1",
            "availability_update": false,
            "restrictions_update": false,
            "price_update": false,
            "name": "Standard Room - NR",
            "description": "Standard Room Description",
            "policy": "Standard Room Policy",
            "room_capacity": 3,
            "adult_capacity": 2,
            "is_master": false,
            "channel_codes": [
                "bookingcom",
                "online",
                "hrs",
                "expedia"
            ]
        },
        {
            "rate_code": "HR:2",
            "inv_code": "HR:2",
            "availability_update": false,
            "restrictions_update": false,
            "price_update": false,
            "name": "Default Room",
            "description": "We use this room for unmatched reservations. If a reservation comes with this room type code, this means that hotelier should update their channel mappings on HotelRunner and the reservation should be mapped with a room type manually.",
            "policy": "",
            "room_capacity": 2,
            "adult_capacity": 2,
            "is_master": true,
            "channel_codes": [
                "online"
            ]
        }
    ]
}

Room Object

Name Description
rate_code Rate code on HotelRunner (NR means Non refundable)
inv_code Room availability group on HotelRunner. Availabilities of rates are same within same group.
availability_update Only those has availability_update=true can update availabilities.
restrictions_update Only those has restrictions_update=true can update restrictions.
price_update Only those has price_update=true can update prices.
name Name of room -
description Description of room
policy Free text policy for room
room_capacity Maximum room capacity including children
adult_capacity Maximum adult count that can stay in room
channel_codes Channel codes of which room is connected with
is_master Master room is used for unmatched reservations. If a reservation comes with this room type's code, this means that hotelier should update their channel mappings on HotelRunner and the reservation should be mapped with a room type manually.

Update Room

curl -X PUT --data "hr_id={HR_ID}&token={TOKEN}&inv_code={INV_CODE}&channel_codes[]={CHANNEL_CODE_1}&channel_codes[]={CHANNEL_CODE_2}&start_date={START_DATE}&end_date={END_DATE}&availability={AVAILABILITY}&price={PRICE}&min_stay={MIN_STAY}&stop_sale={STOP_SALE}" https://app.hotelrunner.com/api/v1/apps/rooms/~

The above command returns json structured like this:

    {
        "status": 'ok', 
        "transaction_id": "123456789" 
    }



    {
        "status": 'try_again', 
        "transaction_id": "123456789" 
    }


This endpoint updates the room.

PUT https://app.hotelrunner.com/api/v2/apps/rooms/~

Query Parameters

Parameter Default Required Description
inv_code - Yes Inv code that will be updated. We don't support updates by rate_code
availability - No Don't send this parameter if you don't want to update availability.
price - No Don't send this parameter if you don't want to update price.
stop_sale - No Don't send this parameter if you don't want to update stop sale. Accepted values: 1 or 0
cta - No Don't send this parameter if you don't want to update CTA. Accepted values: 1 or 0
ctd - No Don't send this parameter if you don't want to update CTD. Accepted values: 1 or 0
min_stay - No Don't send this parameter if you don't want to update min_stay.
start_date - Yes Format: YYYY-MM-DD Start date
end_date - Yes Format: YYYY-MM-DD End date
days [0,1,2,3,4,5,6] No Type: Array Used to update specific week days within given date range. (Sunday: 0)
channel_codes All connected channels of room No Type: Array Used to update specific channels. (eg. ['bookingcom', 'online'])

Get Transaction Details

curl "https://app.hotelrunner.com/api/v2/apps/infos/transaction_details?transaction_id={TRANSACTION_ID}&token={TOKEN}&hr_id={HR_ID}"

The above command returns json structured like this:

{
  "transaction": {
    "id": "883770514",
    "counts": {
      "failed": 1,
      "succeeded": 1,
      "in_progress": 0
    },
    "details": [
      {
        "id": 12529,
        "channel_code": "bookingcom",
        "state": "failed",
        "name": "Люкс (68366) - Стандартный тариф - 1 Person",
        "code": "156754:8833301",
        "inv_code": "8833301",
        "created_at": "2015-10-16T08:01:29Z",
        "pid": 9651,
        "error_message": null
      },
      {
        "id": null,
        "channel_code": "online",
        "state": "succeeded",
        "name": "Online",
        "code": "Online",
        "inv_code": "Online",
        "created_at": "2015-10-16T07:54:25Z",
        "pid": null,
        "error_message": null
      }
    ]
  }
}

This endpoint returns update status logs of given transaction id

GET https://app.hotelrunner.com/api/v1/apps/infos/transaction_details

Query Parameters

Parameter Default Required Description
transaction_id - Yes Each room update request returns transaction_id.