The reservation retrieval method returns the full information of a WebHotelier reservation.

Table of Contents
  1. URL Endpoint
  2. Guidelines
  3. Example Response

URL Endpoint

/reservation/{res_id}

Guidelines

Channel reservations

WebHotelier retrieves and imports reservations from 3d party Channel Manager systems.

ChannelStream reservations can be distinguished by the channelstream flag in the reservation info response.

To distinguish the booking channel, use the bookInfo.source_id & bookInfo.source_name fields. To get a list of source ids that correspond to channels, use the Booking Sources API method.

Channel resevations may have some additional fields with data returned from the 3d party Channel Manager system. Such fields are:

  • external_id
  • bookInfo.externalRateInfo
  • guest_names
  • special_requests

You should parse, store and show the above fields to your system as they may contain special additional information that can not be reflected via the mapped WebHotelier reservation rate.

More that one channel reservations may share the same external_id. This is because Channel Managers may split a multi-room reservation into several single-room reservations. Each one of these split reservations is a unique WebHotelier reservation with unique WebHotelier reservation ID. You should always import and uniquely distinguish a reservation based on the WebHotelier reservation ID.

Channel reservations may also be imported manually by the hotelier via the Legolas Calendar. These reservations will have the channelstream flag set to false, offline flag set to true and bookInfo.source_id set to the corresponding channel.

Example JSON Response

{
	"method": "https://rest.reserve-online.net/reservation/10123456"
	"http_method": "GET",
	"http_code": 200,
	"error_code": "OK",
	"error_msg": "",
	"params": [],
	"data":{
		"id":INTEGER, // Reservation id
		"external_id":STRING, // (Optional) External reference id
		"property":STRING, // Property code
		"status":BOOLEAN, // 1=Confirmed, 0=Cancelled
		"cancellation_reason":STRING, // (Optional, exists only if status=0 and cancellation reason has been given)
		"offline":BOOLEAN, // 1=Reservation was imported via Legolas or ChannelStream, 0=Direct online reservation
		"channelstream":BOOLEAN, // 1=ChannelStream reservation, 0=Non ChannelStream
		"roomStay":{
			"roomType":STRING, // Room type code
			"roomName":STRING, // Room type name
			"rateName":STRING, // Rate name
			"rateDesc":STRING, // Rate short description
			"rateID":INTEGER, // Rate unique id
			"board":INTEGER, // Board ID(can be empty/null). See Board Types
			"externalRateInfo":STRING, //(Optional) Rate information as provided by third party systems
			"rooms":INTEGER, // Number of rooms
			"from":ISO 8601, // Check-in date
			"to":ISO 8601, // Check-out date
		},
		"pricing":{
			"price":NUMBER, // Total reservation price
			"subTotal":NUMBER, // Rooms price
			"extras":NUMBER, // Extras name
			"taxes":NUMBER, // Taxes price
			"currency":ISO 4217, // Price currency code
		},
		"bookInfo":{
			"bookDate":ISO 8601, // Booking date timestamp in ISO 8601 UTC format
			"bookingCode":STRING, // Special booking code used
			"voucherCode":STRING, // Special voucher code used
			"referer":STRING, // Referer hostname
			"source":STRING, // Booking source name(refers also to channels like Booking.com, Expedia, etc)
			"source_id":INTEGER, // Booking source unique id
			"agent":STRING, // Travel agent name
			"agent_id":INTEGER, // Travel agent unique id
			"remote_ip":IP, // User ip ( IPv4 )
			"remote_country":ISO 3166-1-alpha-2, // User country
		},
		"clientInfo":{
			"firstName":STRING,
			"lastName":STRING,
			"email":STRING,
			"tel":STRING,
			"country":ISO 3166-1-alpha-2,
			"address":STRING,
			"postal":STRING,
			"location":STRING,
			"region":STRING,
			"company":STRING,
			"purpose":STRING,
			"remarks":STRING
		},
		"guest_names":[], STRING[], // (Optional) A list of guest names as provided by 3d party systems*
		"constraints":{
			"minStay":INTEGER, // Minimum stay in days
			"maxStay":INTEGER, // Maximum stay in days
			"freeCancelDays":INTEGER, // Number of days before check-in that free cancellation is allowed
			"freeCancelExpiry":ISO 8601, // Cancellation date timestamp in ISO 8601 UTC format
		},
		"policies":{
			"cancellation":STRING, // Cancellation policy
			"payment":STRING // Payment policy
		},
		"rooms":[
			{
				"roomNo":INTEGER,
				"adults":INTEGER,
				"children":INTEGER,
				"infants":INTEGER,
				"rates":[
					{
						"date":ISO 8601,
						"price":NUMBER, // Room daily price
						"price_with_tax":NUMBER // Room daily price with tax included
					}
				],
				"price":NUMBER, // Total room price
				"price_with_tax":NUMBER // Total room price with tax included
			}
		],
		"extras":[
			{
				"id":INTEGER,
				"name":STRING,
				"quantity":INTEGER,
				"price":NUMBER, // Total extra price
				"pricing":{
					"unitPrice":NUMBER, // Single extra unit price
					"perRoom":BOOLEAN, // 1=True, 0=False
					"perDay":BOOLEAN, // 1=True, 0=False
					"perAdult":BOOLEAN, // 1=True, 0=False
					"perChild":BOOLEAN, // 1=True, 0=False
					"perInfant":BOOLEAN // 1=True, 0=False
				}
			}
		],
		"taxes":[
			{
				"order":INTEGER,
				"description":STRING,
				"included":BOOLEAN, // 1=True, 0=False
				"type":STRING,
				"value":NUMBER, // Tax value, may reflect percentage or flat amount
				"pricing":{
					"perRoom":BOOLEAN, // 1=True, 0=False
					"perDay":BOOLEAN, // 1=True, 0=False
					"perAdult":BOOLEAN, // 1=True, 0=False
					"perChild":BOOLEAN, // 1=True, 0=False
					"perInfant":BOOLEAN // 1=True, 0=False
				}
			}
		],
		"preferences":[
			{
				"id":INTEGER,
				"type":STRING,
				"name":STRING,
				"title":STRING,
				"value":STRING
			}
		],
		"special_requests":STRING, //(Optional) Additional requests-notes as provided by 3d party systems
		"changes":[
			{
				"userType":STRING,
				"userName":STRING,
				"date":ISO 8601, // Modification date timestamp in ISO 8601 UTC format
				"TYPE":STRING
			}
		]
	}
}
	

* Total number of guest names may differ from total occupancy