Hotels
Get hotels
Get hotels data for a single specified hotel. This operation can be called initially to fetch data which may be important during the booking workflow.
Request
[ApiBaseUrl]/api/distributor/v1/hotels/get
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Identification of the client, as described in Authorization. |
| string | required | Unique identifier of the hotel. |
Response
Property | Type | Contract | Description |
---|---|---|---|
| array of Country | required | Countries supported by the hotel. |
| array of Currency | required | Currencies accepted by the hotel. |
| string | required | Code of hotel’s default currency. |
| string | required | Code of hotel’s default language. |
| string | required | Code of currency of hotel’s default rate. |
| string | required | Iana identifier of hotel’s time zone |
| string | optional | Unique identifier of hotel’s logo image. |
| string | optional | Unique identifier of hotel’s intro image (usable as background image). |
| array of Language | required | Languages supported by the hotel. |
| required | Name of the hotel. | |
| required | Description of the hotel. | |
| one of Payment gateway types | optional | Info about payment gateway used by the hotel. |
| array of Product | required | All products orderable with rooms associated with the first bookable service in the list of services of this enterprise. |
| array of Room category | required | All room categories offered by hotel. |
| string | optional | URL of hotel’s terms and conditions. |
| string | required | Base URL of images. |
The returned list of products contains only the products associated with the first bookable service in the list of services of this enterprise.
Country
Property | Type | Contract | Description |
---|---|---|---|
| string | required | ISO 3166-1 Aplha-2 code of the country. |
| string | required | Name of the country. |
Currency
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Code of the currency in ISO 4217 format. |
| string | required | Symbol of the currency. |
| string | required | Format of a currency value (for both positive and negative values, including symbol). |
| number | required | Number of decimal places used with the currency value. |
| boolean | required | Indicates whether the symbol stands behind a value in standard formatting. |
Language
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Language code. |
| string | required | Name of the language. |
| required | Specifics of a default culture for the language. |
Culture
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Symbol used to separate decimal places in the currency value format. |
| string | required | Symbol used to separate thousands in the currency value format. |
Localized text
A localized text is an object of the property values localized into languages supported by hotel, indexed by language codes.
Payment gateway
If the hotel does not use any payment gateway, the value is null. If it does, then you should use a specific API call and the gateway’s library to encode credit card data. The main purpose of a payment gateway is to securely obtain the credit card of the customer before a reservation is created. You can decide not to support any of them and just ignore it, in which case reservations are created with a note about missing credit card.
Property | Type | Contract | Description |
---|---|---|---|
| string Payment card storage type | required | Type of the payment card storage used by enterprise. |
| boolean | required | Whether the gateway is processed through Mews Payments or not (formerly called Mews Merchant). |
| array of Credit card type | required | Supported payment cards, should be used to enhance UX. |
| string | required | Merchant identifier for which PCI Proxy iframe is connected. |
| string | required | Currency code of default payment gateway in ISO 4217 format. |
Payment card storage type
PciProxy
Credit card type
MasterCard
Visa
Amex
Discover
DinersClub
Jcb
Maestro
...
Product
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the product. |
| string | optional | Unique identifier of the product category. |
| required | Name of the product localized into all supported languages. | |
| required | Description of the product localized into all supported languages. | |
| string | optional | Unique identifier of the product’s image. |
| boolean | required | Indicates whether the product should be added to order by default. |
| required | Object defining the pricing method and price values. | |
| string Product charging mode | required | Charging mode of the product. |
| string Product posting mode | required | Posting mode of the product. |
Pricing coproduct
Property | Type | Contract | Description |
---|---|---|---|
| string Pricing data discriminator | required | Determines type of value. |
| required | Structure of object depends on the Pricing data discriminator |
Pricing data discriminator
Absolute
- Data specific to absolutely priced product are represented by Multi-currency amount.Relative
- Data specific to relatively priced product are represented by Relative price data value.
Relative price data value
Property | Type | Contract | Description |
---|---|---|---|
| array of string | required | Unique identifiers of Products used to calculate the price of the relatively priced product. |
| number | required | Percentage of the relative price. |
| required | Target defining whether the price of a product should be calculated by multiplying gross value, tax value or net value of dependant products. | |
| array of string | required | Tax rate codes that should be applied to the price in order to calculate the taxes of the product. |
Relative price target
GrossValue
- The price of the product should be calculated from gross value of dependant productsTaxValue
- The price of the product should be calculated from tax value of dependant productsNetValue
- The price of the product should be calculated from net value of dependant products
Product charging mode
Once
PerTimeUnit
PerPersonPerTimeUnit
PerPerson
Product posting mode
Once
PerTimeUnit
Multi-currency amount
An object where name corresponds to ISO code and value represents a structure that holds gross price, net price and tax values.
Property | Type | Description |
---|---|---|
| Number | Net price + taxes |
| Number | Amount without taxes |
| Collection of Tax values | Tax values for the net value amount |
Tax value
Property | Type | Description |
---|---|---|
| string | Unique identifier of the rate. |
| Number | Amount of tax |
Room category
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the room category. |
| required | Name of the room category localized into all supported languages. | |
| required | Description of the room category localized into all supported languages. | |
| number | required | Number of normal beds in the room category. |
| number | required | Number of extra beds possible in the room category. |
| required | Type of the room category. |
Space type
Room
Dorm
Bed
...
Get availability
Get availability and pricing options for the specified hotel for the specified date interval. Further optional parameters can be supplied, such as room categories and voucher codes. The availability and pricing is returned for each applicable combination of occupancy and rate, for each available room category.
Request
[ApiBaseUrl]/api/distributor/v1/hotels/getAvailability
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Identification of the client as described in Authorization. |
| string | required | Unique identifier of the used Distributor configuration. |
| string | required | Unique identifier of hotel. |
| string | required | Reservation start date (arrival date) in ISO 8601 format. |
| string | required | Reservation end date (departure date) in ISO 8601 format. |
| array of string | optional | Unique identifiers of products which should be included into pricing calculations. |
| string | optional | ISO 4217 code of the currency. If specified the prices in response will contain only single currency based on the code provided. Supported currency codes |
| string | optional | Voucher code enabling special rate offerings. |
| array of Occupancy Data | required | Occupancy numbers for the reservations. |
|
|
|
|
|
|
|
|
| array of string | optional | Unique identifiers of categories for which should be the availability computed only. If omitted, availability of all categories is returned instead. |
| string | optional | Unique identifier of availability block, if present. When provided, only availability for this block is returned. |
Occupancy Data
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Age category identifier - see Where can I get Age Category ID?. |
| number | required | Number of people in the given age category. |
Response
Property | Type | Contract | Description |
---|---|---|---|
| array of Rate group | required | Information about all available rate groups. |
| array of Rate | required | Information about all available rates. |
| array of Room category availability | required | Availabilities of room categories. If a room category is not available, it is not included. |
Rate group
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the rate. |
| string Settlement type | required | Determines if system will charge reservation cost automatically or if you'd like employees to manually process payments. |
| string Settlement action | required | Determines how payment will be taken at time of automatic trigger. Valid if settlement is automatic only. |
| string Settlement trigger | required | Moment when amount is automatically charged, with offset applying to this time (for example, a 'Creation' trigger with no offset will charge the amount when items are created). If settlement is manual, a task will be created at this moment. |
| string | required | Start of the interval in ISO 8601 format which gets added before or after selected settlement trigger (for example, '-1 day' will charge the amount 1 day before). |
| number | optional | Percentage of the total extent cost which is charged automatically (for example, a |
| number | optional | Absolute value of settlement cost in settlement currency code. When provided |
| number | required | Settlement currency code |
| number | optional | Maximum number of time units that will be charged automatically (only applies to automatic settlements). The rest will be charged manually. |
Settlement type
Automatic
Manual
Settlement action
ChargeCreditCard
CreatePreauthorization
Settlement trigger
Confirmation
Start
End
StartDate
EndDate
Rate
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the rate. |
| required | Name of the rate localized into all supported languages. | |
| required | Description of the rate localized into all supported languages. | |
| boolean | required | Set to |
Room category availability
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the room category. |
| array of Room occupancy availability | required | Availabilities of rooms in the category by the room occupancy. |
| number | required | Number of available rooms from the room category. |
Room occupancy availability
Property | Type | Contract | Description |
---|---|---|---|
|
|
|
|
|
|
|
|
| array of OccupancyData | required | List of occupancy data. |
| array of Pricing | required | Pricing information. |
Pricing
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of a rate. |
| required | Price of the room. | |
| required | Max price of the room with the same parameters and conditions among other rates. Can be understood (and possibly displayed) as the value before discount. |
Room price
Property | Type | Contract | Description |
---|---|---|---|
| required | Total amount of the room for whole reservation. | |
| required | Average amount per time unit. |
Get payment configuration
Fetch payment configuration parameters for the specified hotel.
Request
[ApiBaseUrl]/api/distributor/v1/hotels/getPaymentConfiguration
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Identification of the client as described in Authorization. |
| string | required | Unique identifier of hotel. |
Response
Property | Type | Contract | Description |
---|---|---|---|
| required | Object that describes payment gateway of the enterprise. | |
| required | Object describing surcharge configuration used by the enterprise. |
Surcharge configuration
Property | Type | Contract | Description |
---|---|---|---|
| string | optional | Unique identifier of surcharge service. |
| required | Surcharge fees are additional fees charged by payment card company. |
Surcharge fees
Property | Type | Contract | Description |
---|---|---|---|
| string Credit card type | required | Credit card type. |
| number | required | Amount of the surcharge fee itself. |
Last updated