This part defines the API on the Mews side.
This environment is meant to be used during building, testing, and certification of the client applications. Test properties are based in the Netherlands and accept EUR
currency.
Platform Address - https://demo.mews.li
Reservation Push Endpoint - unique to the environment and listed under Process Group
Client Token - will be provided by Mews upon request.
Connection Token - will be provided by Mews upon request.
Test Property - user credentials will be provided by Mews upon request.
The property is configured to accept following test credit cards:
Accepted Test Credit Cards:
Expiration date: 08/2021 or 10/2022
Card holder name: any value is accepted
CVV: any value, except for 000
is accepted
Types and Numbers:
Visa: 4111111111111111
MasterCard: 5555444433331111
Amex: 370000000000002
Diners: 36006666333344
Discover: 6445644564456445
Platform Address - https://www.mews.li
Reservation Push Endpoint - unique to the environment and listed under Process Group
Client Token - will be provided to you by Mews following certification in the test environment (e.g. C66EF7B239D24632943D115EDE9CB810-JJ549OU4JF94692C940F6B5A8F9453D
)
Connection Token - will be provided to you by Mews or property on request or via Get Properties API call (e.g. NF9R27B239D24632943D115EDE9CFH3-EA00F8FD8294692C940F6B5A8F9453D
)
[sync
] This method is used to obtain properties based on the email
of an employee of the Mews enterprise (hotel, hostel or apartment group). It is required that the email
is verified to belong to an employee on whose behalf the API call is made. Response returns list of all enterprises, where employee has access in Mews, and the connectionToken
s of all connections for the requesting clientToken
.
{"clientToken": "[Channel manager client token]","email": "[email protected]"}
Property | Type | | Description |
|
| required | Client token of the channel manager. |
|
| required | Verified email of a Mews employee. |
This sample response shows that there are 2 properties where the employee with provided email works. First Sample Hotel property has 3 named connections with the channel manager, second White House Hotel has no connection yet.
{"success": true,"properties": [{"id": "sample-hostel","name": "Sample Hostel","connections": [{"token": "[1st connectionToken]","name": "Connection for dorms"},{"token": "[2nd connectionToken]","name": "Connection for beds"},{"token": "[3rd connectionToken]"}]},{"id": "whh","name": "White House Hotel"}]}
Property | Type | | Description |
| | required | List of all properties to connect. |
Property | Type | | Description |
|
| required | Name of the property. |
|
| required | Unique id of the property. |
| | optional | List of all existing connections. |
Property | Type | | Description |
|
| required | Token of the existing connection. |
|
| optional | Name of the existing connection. |
Returns configuration of the enterprise and the client.
[sync
] Returns configuration of a concrete connection
{"clientToken": "[Channel manager client token]","connectionToken": "[Token of a concrete connection]","extent": {"includeUnsynchronizedRates": true,"includeUnsynchronizedCategories": true,"includeProducts": true,"includeCompanies": true}}
Property | Type | | Description |
|
| required | Client token of the channel manager. |
|
| required | Token of a concrete connection. |
| | optional | Allows to specify certain data to be included in the response. |
Property | Type | | Description |
|
| optional | If |
|
| optional | If |
|
| optional | If |
|
| optional | If |
This is example of a successful response. In case an error occurred, the response will contain only Error
object with details.
{"connectionToken": "[Token of the connection]","property": {"name": "White House Hotel","description": "A 5* hotel with a White House view.","languageCode": "en-US","timeZoneIdentifier": "America/New_York","websiteUrl": "http://www.whh.com","email": "[email protected]","telephone": "+1 202-456-1111","spaceCount": 21,"pricingMode": 0,"address": {"addressLine1": "White House Hotel","addressLine2": "Pennsylvania Ave","city": "Washington, DC","country": "US","latitude": 38.8976763,"longitude": -77.0365298,"region": "DC","zip": "20500"},"images": [{"type": 1,"url": "http://images2.onionstatic.com/onion/5239/1/16x9/600.jpg"}]},"spaceCategories": [{"code": "DEL","name": "Deluxe Room","isSynchronized": false,"description": "Our deluxe rooms with a mountain view.","classification": 9,"bedType": 5,"bedCount": 2,"extraBedCount": 1,"spaceCount": 4,"images": [{"url": "https://cdn.demo.mews.li/Media/Image/78e5d3db-7af6-46b7-96ed-b598c447be19","type": 2}]},{"code": "STA","name": "Standard Room","isSynchronized": true,"description": "Standard Room with Shared Facilities.","classification": 9,"bedType": 4,"bedCount": 2,"extraBedCount": 0,"spaceCount": 7,"images": [{"url": "https://cdn.demo.mews.li/Media/Image/bffcb480-32d5-4784-9c71-aec792b3ef89","type": 2}]}],"ratePlans": [{"code": "NR","name": "Non Refundable","description": "This is our lowest price available. However full payment is required at the time of booking. ","currencyCode": "EUR","paymentType": 1,"isSynchronized": true,"rateType": 1,"cancellationPolicies": [{"offset": "-100DT0H0M","applicability": 2,"penalty": {"relative": {"value": 1.00000000,"nights": null},"absolute": {"amount": 0.00,"currencyCode": "EUR"}}}]},{"code": "FF","name": "Fully Flexible","description": "This rate is the most flexible rate we offer. Bookings can be cancelled up to 48 hours in advance of your arrival date by 2.30 pm (and 7 days before the arrival dates of the 29th, 30th and 31st of December), without charge. The total price of the reservation will be charged 48 hours before arrival. ","currencyCode": "EUR","paymentType": 3,"isSynchronized": false,"rateType": 1,"cancellationPolicies": [{"offset": "-1DT0H0M","applicability": 2,"penalty": {"relative": {"value": 1.00000000,"nights": null},"absolute": {"amount": 0.00,"currencyCode": "EUR"}}}]}],"inventoryMappings": [{"ratePlanCode": "FF","spaceTypeCode": "KD"},{"ratePlanCode": "FF","spaceTypeCode": "QD"},{"ratePlanCode": "NR","spaceTypeCode": "KD"},{"ratePlanCode": "NR","spaceTypeCode": "QD"},{"ratePlanCode": "ROM","spaceTypeCode": "KD"}],"products": [{"code": "AUR","name": "Aurora watch","description": "","pricing": 3,"unitAmount": {"currencyCode": "EUR","netValue": 16.53,"grossValue": 20.0,"taxValues": [{"code": "CZ-S","value": 3.47}]}}],"productMappings": [{"ratePlanCode": "NR","productCode": "AUR"},{"ratePlanCode": "FF","productCode": "L"}],"companies": [{"id": "","iata": "","name": "Some corporation","email": null,"contact": "Some contact","phone": "","addresses": [{"addressLine1": "Some street","addressLine2": "","city": "Some city","zip": "111111","region": null,"country": null,"longitude": null,"latitude": null}],"channel": {"code": 438,"name": "Some Channel Name"}}],"travelAgencies": [{"id": "","iata": "11111111","name": "Expedia","email": null,"contact": "Some contact","phone": "","addresses": [{"addressLine1": "Some street","addressLine2": "","city": "Some city","zip": "1111111","region": null,"country": null,"longitude": null,"latitude": null}],"channel": {"code": 2,"name": "Expedia"}}],"success": true}
Property | Type | | Description |
|
| required | Token of the connection. |
| | required | Details of the property. |
| | required | Rate plans of the property. |
| | required | Space types of the property. |
| | required | Defines relations between rate plans and space categories. |
Property | Type | | Description |
|
| required | Name of the property. |
|
| optional | Description of the property. |
|
| required | Language code of the default language of the property. All names and descriptions are in this language. |
|
| required | Identifier of the property time zone. |
|
| optional | Website of the property. |
|
| optional | Email contact of the property. |
|
| optional | Phone contact of the property. |
|
| required | Total count of spaces sold/offered by the property. |
|
| required | |
| | optional | Address of the property. |
| | optional | Images of the property that may contain logo or property exterior photos. |
Code | Description |
| Gross |
| Net |
Property | Type | | Description |
|
| optional | First line of the address. |
|
| optional | Second line of the address. |
|
| optional | City. |
|
| optional | Region. |
|
| optional | Zip code. |
|
| optional | ISO 3166-1 alpha-2 country code - two letter country code or ISO 3166-1 alpha-3 country code - three letter country code. |
|
| optional | Latitude - from range [-90, 90]. |
|
| optional | Longitude - from range [-180, 180]. |
Property | Type | | Description |
|
| required | |
|
| required | Public URL of the image. |
Code | Description |
| Logo |
| Photo |
Property | Type | | Description |
|
| required | Mapping code of the rate plan. |
|
| required | Name of the rate plan. |
|
| required | 3 letter currency code of the rate plan price. |
|
| optional | Description of the rate plan. |
|
| required | |
| | optional | Cancellation policies of the rate plan. |
|
| required | Determines whether rate plan is synchronized, i.e. that Mews pushes prices and restrictions for the rate plan. Otherwise, unsynchronized rate plan is used just for mapping correct rate plan for incoming reservations (as well as sychronized rate plan). |
|
| required | Determines whether rate plan is private (available for channel reservations only) or public (bookable via Mews Distributor as well). |
Code | Description | |
| Prepaid | When guest has already paid to the Channel (i.e. OTA). |
| Preauthorized | When the booking is covered by a guarantee (preauthorization or a payment card). |
| OnSite | When guest will pay on site. |
Code | Description |
| Private |
| Public |
Poperty | Type | | Description |
|
| required | |
|
| optional | Offset specifying a "shift" from the moment given by |
| | required | Defines penalty that applies based on the cancellation policy. |
Code | Description | |
| Creation | Cancellation policy applies from the moment the booking is created. |
| Start | Cancellation policy applies from the moment the booking starts (i.e. time included). |
| Start Date | Cancellation policy applies from the 0:00 on the day when the booking starts (i.e. time is not included). |
Property | Type | | Description |
| | required | Defines absolute fee penalty. |
| | required | Defines relative (i.e. %) fee penalty. |
Property | Type | | Description |
|
| required | Defines the amount of the absolute fee. Sent in |
|
| required | 3 letter currency code of the absolute fee. |
Property | Type | | Description |
|
| required | Defines the % value of the relative fee (e.g |
|
| optional | Determines maximum number of nights included in the relative fee calculation, empty means "all nights". |
Property | Type | | Description |
|
| required | Mapping code of the space type. |
|
| required | Name of the space type. |
|
| optional | Description of the space type. |
|
| required | Number of sold/offered spaces of the type. |
|
| optional | Number of beds of the space type - required if the type describes some room type. Represents default occupancy. |
|
| optional | Number of extra beds of the space type. |
|
| required | |
|
| optional | |
| | optional | Images of the space type. These are always image |
Code | Description |
| Apartment |
|
|
|
|
| Double Room |
|
|
|
|
|
|
| Dormitory Bed |
| Single Room |
| Studio |
| Suite |
|
|
| Triple Room |
| Twin Room |
| Villa |
| Dormitory |
Code | Description |
| Single bed |
| Twin bed |
| Double bed |
| Queen bed |
| King bed |
| Sofa bed |
Property | Type | | Description |
|
| required | Mapping code of the rate plan |
|
| required | Mapping code of the space type related to the rate plan. |
Property | Type | | Description |
|
| required | Mapping code of the product. |
|
| required | Name of the product. |
|
| optional | Description of the product. |
|
| required | A product cost. |
|
| required | 3 letter currency code of the product. |
|
| required | Tax exclusive product cost. |
|
| required | Tax inclusive product cost. |
| | optional | Cancellation policies of the rate plan. |
|
| required | Identifies legal environment specific taxes. |
|
| required | Tax code corresponding to legal environment. |
|
| required | Tax amount. |
|
| required | Identified in |
Property | Type | | Description |
|
| required | Mapping code of the rate plan. |
|
| required | Mapping code of the product related to the rate plan. |
Property | Type | | Description |
|
| optional |
|
|
| optional | Related to Travel Agencies only. |
|
| required | Company name. |
|
| optional | Company contact. |
|
| optional | Company phone number. |
|
| optional | Company address. |
|
| optional | Mapping code of the company. |
Property | Type | | Description |
|
| optional |
|
|
| optional | IATA code. |
|
| required | Travel Agency name. |
|
| optional | Travel Agency contact. |
|
| optional | Travel Agency phone number. |
|
| optional | Travel Agency address. |
|
| optional | Mapping code of the company. |
[sync
] This method can be used to update the rate plan - space type mapping relations in the connection.
All mapping relations need to be sent.
Mapping relations that are defined in Mews for the connection, but missing in the call, are deleted.
It is possible to create a new rate-space category combination for the rates and space categories that are already in Mews.
It is impossible to add a new rate or space category.
{"clientToken": "[Channel manager client token]","connectionToken": "[Token of a concrete connection]","inventoryMappings": [{"ratePlanCode": "FF","spaceTypeCode": "KD"},{"ratePlanCode": "FF","spaceTypeCode": "QD"}]}
Property | Type | | Description |
|
| required | Client token of the channel manager. |
|
| required | Token of a concrete connection. |
| | required | Defines all rate plan - space type mapping relations. |
Plain response is expected.
[async
] This method allows channel manager to request an ARI data update for certain space types and rate plans in addition to the changes automatically sent in the next delta update. The requested data will be sent by Mews asynchronously via push operations of channel manager API in the next delta update.
{"clientToken": "[Channel manager client token]","connectionToken": "[Token of a concrete connection]","from": "2018-01-01","to": "2018-02-01","ariType": [1,2,3],"spaceTypeCodes": ["KD","QD"],"ratePlanCodes": ["FF"]}
Property | Type | | Description |
|
| required | Client token of the channel manager. |
|
| required | Token of a concrete connection. |
|
| required | Start of requested update in format |
|
| required | End of requested update in format |
|
| optional | |
|
| optional |
|
|
| optional |
|
Code | Description |
| Availability |
| Prices |
| Restrictions |
Plain response will determine whether the ARI update was accepted for processing or not.
[async
] This operation allows the channel manager to push a reservation group (i.e. booking) to Mews. This option allows creations, modifications, and partial or complete cancellations. Mews will process and confirm the booking asynchronously.
Demo Environment: https://sandbox.pci-proxy.com/v1/push/0426f19b66715a93
Production Environment: https://api.pci-proxy.com/v1/push/b2721c9a0351d553
The example shows a valid group definition with 2 space reservations + cancellation of the 3rd space reservation. First reservation
definition shows all details, second reservation
definition shows the minimal required details for creation / modification of a reservation
. The 3rd reservation
definition shows the partial cancellation - cancelling the 3rd space reservation.
There are certain rules that need to be followed in order for Mews to process the group correctly:
It is required to send multiple related reservations in one group as part of one message.
The whole group is uniquely identified by channelManagerId
in Mews and in the channel manager extranet.
Each reservation should have a unique code within the group. The same code for the reservation should be provided in any following modification message.
Each reservation in the group can have different start
, end
, spaceTypeCode
, ratePlanCode
.
Group total cost group.totalAmount
is the sum of all reservation.totalAmount
objects in the group, which is the sum of all night amounts and total amounts of all extras
of the reservation
.
If for any reason the sum of the reservation.totalAmount
objects is different, Mews will automatically distribute the missing/additional amount to the nights, so the group.totalAmount
is achieved.
Reservation group
amounts should be either gross
or net
. Either both gross
and net
amounts, or one of them should be sent.
When modifying some reservations from a multi-reservation group, the whole group definition with all other unchanged reservations needs to be sent (i.e. Mews doesn't process diffs).
When cancelling a reservation from a multi-reservation group, all remaining reservations need to be present in the group definition as well.
There are 2 ways to cancel a reservation from a multi-reservation group.
A. If the reservation.state
is set to Reservation States.Cancelled
.
B. If the reservation is not included in the group definiton message.
When cancelling a whole group, the reservations
collection can be empty of all reservations provided as cancelled (as per case A above).
{"clientToken": "[Channel manager client token]","connectionToken": "[Token of a concrete connection]","channelId": "EXP-123456","channelManagerId": "123456","comments": ["Approximate arrival: 16:30.","Guest request a room with ocean view."],"currencyCode": "EUR","customer": {"address": {"addressLine1": "Some street 123","addressLine2": "Some other detail","city": "Some city","country": "US","latitude": 30,"longitude": 20,"region": "Some region","zip": "123 45"},"email": "[email protected]","firstName": "John","lastName": "Smith","nationalityCode": "US","languageCode": "en-US","telephone": "1-3526-88918"},"channel": {"code": 1,"name": "Expedia"},"company": {"id": "MEWS","iata": "65893","name": "Mews Systems, s.r.o.","contact": {"email": "[email protected]","phone": "+420 775 684 983","address": {"zip": "110 00","city": "Prague","country": "Czech Republic","addressLine1": "586 Ulice Test","addressLine2": "Patro 2"}}},"paymentCard": {"cvv": "666","expireDate": "1222","holderName": "John Smith","number": "4111111111111111","type": 1},"paymentType": 1,"reservations": [{"adultCount": 1,"childCount": 0,"code": "01","extras": [{"code": "1","count": 1,"amount": {"net": 16.2,"gross": 20},"from": "2021-05-06","to": "2021-05-07","pricing": 3}],"from": "2020-05-05","guests": [{"address": {"addressLine1": "Some other street 123","addressLine2": "Some other detail","city": "Some other city","country": "US","latitude": 30,"longitude": 20,"region": "Some other region","zip": "123 45"},"email": "[email protected]","firstName": "Jane","lastName": "Smith","nationalityCode": "US","languageCode": "en-US","telephone": "1-369-81891","loyaltyCode": "PG60972345"}],"amounts": [{"net": 81,"gross": 100},{"net": 97.2,"gross": 120},],"ratePlanCode": "FF","spaceTypeCode": "SGL","state": 1,"to": "2020-05-07","totalAmount": {"gross": 260,"net": 208}},{"adultCount": 2,"code": "02","from": "2020-05-06","amounts": [{"net": 81,"gross": 100},{"net": 97.2,"gross": 120},{"net": 97.2,"gross": 120}],"ratePlanCode": "NR","spaceTypeCode": "DBL","state": 2,"to": "2020-05-09","totalAmount": {"net": 275.4,"gross": 340}},{"adultCount": 2,"code": "03","from": "2020-05-06","ratePlanCode": "FF","spaceTypeCode": "DBL","state": 3,"to": "2020-05-09"}],"totalAmount": {"net": 486,"gross": 600}}
Property | Type | | Description |
|
| required (always) | Client token of the channel manager. |
|
| required (always) | Token of a concrete connection. |
|
| required (always) | Unique identification of the booking in the channel (i.e. OTA). |
|
| required (always) | Unique identification of the booking in the channel manager. |
|
| required (exc. Cancellation) | 3 letter code of currency of all prices within the booking. |
| | required (exc. Cancellation) | Total amount of the whole booking. |
|
| required (exc. Cancellation) | Payment Type code - determines whether the booking is prepaid or not. |
| | required (exc. Cancellation) | Represents the main booker. Does not necessarily mean that the person arrives to the property. |
| | optional | Represents the payment card of the |
| | optional | Represents the channel (i.e. Travel Agency). |
| | optional | Each reservation within the booking. Empty ( |
|
| optional | Represents any comments related to the booking. |
Property | Type | | Description |
|
| recommended | Email. |
|
| required | Last name. |
|
| optional | First name. |
|
| optional | Telephone. |
|
| optional | Loyalty code of the customer. |
|
| optional | ISO 3166-1 alpha-2 country code - two letter country code or ISO 3166-1 alpha-3 country code - three letter country code. |
|
| optional | Language code of the communication language of the customer. This language will be used as the default for communication with the customer. |
| | optional | Represents address. |
Property | Type | | Description |
|
| optional | Identifier of company. |
|
| optional | IATA number of travel agency. |
|
| optional | Name of company or travel agency. |
| | optional | Company or travel agency contact information. |
Property | Type | | Description |
|
| recommended | Contact email address. |
|
| optional | Contaact telephone number. |
| | optional | Contact address. |
Property | Type | | Description |
|
| required | Payment Card Type code. |
|
| required | Payment card number. Only numbers allowed. |
|
| required | Expiration date of card in |
|
| optional | Card CVV code. The value cannot be |
|
| optional | Card holder name. |
Code | Description |
| Visa |
| Master Card |
| American Express |
| Bank Card |
| Carte Bleu |
| Carte Blanche |
| Diners Club |
| Discover Card |
| Eurocard |
| Japanese Credit Bureau |
| Universal Air Travel |
| China Unionpay |
| Maestro |
Property | Type | | Description |
|
| required | Channel code. |
|
| required | Name of the Channel. |
Property | Type | | Description |
|
| required (always) | Unique code of the reservation within the whole booking. Any value but |
|
| required (exc. Cancellation) | Space type code of the reservation. |
|
| required (exc. Cancellation) | Rate type code of the reservation. |
|
| required (exc. Cancellation) | Start date in format |
|
| required (exc. Cancellation) | End date in format |
| | required (exc. Cancellation) | Total amount of the reservation. |
|
| required (exc. Cancellation) | Number of adults in the reservation. |
|
| optional (exc. Cancellation) | Number of children in the reservation. |
|
| optional | Reservation State code of reservation state. If not provided, Mews will handle the reservation as |
| | required (exc. Cancellation) | Collection of amounts for each night of the reservation. The count of amounts in this collection has to correspond with number of nights in the reservation. |
| | optional | Collection of extra ordered products for the reservation (e.g. Breakfast). Their total amount is included in the |
| | optional | Collection of guests that will arrive to the property. |
¹ It is required that the code remains the same within each booking modification message and partial modification message. If it can't be achieved because Channel doesn't provide it, simple generation of "01", "02", ... codes will suffice as long as those codes are generated in same way for each message regarding that one booking.
Code | Description |
| Created |
| Modified |
| Cancelled |
Total cost of the extra product should be sent in net
or gross
amounts.
Either both gross
and net
amounts, or one of them should be sent.
from
and to
dates cannot be the same, but it can be any other interval within the reservation dates. (e.g., reservation is from 2025-10-12 to 2025-10-15, extra from
and to
cannot be 2025-10-12 to 2025-10-12).
Property | Type | | Description |
|
| required | Mapping code of the extra product. |
| | required | Total amount of the extra product. |
|
| required | Count of extra products ordered. |
|
| optional (exc. Cancellation) | Start date in format |
|
| optional (exc. Cancellation) | End date in format |
|
| required | |
Property | Type | | Description |
|
| optional | Price with taxes excluded. |
|
| optional | Price with taxes included. |
Code | Description |
| Once per reservation. |
| Per person - for each guest of reservation. |
| Per night - for each night of reservation. |
| Per person per night - for each guest for each night of reservaion. |
Plain response will determine whether the booking was accepted for processing or not.
[sync
] This operation allows the channel manager to obtain all Channels with assigned mapping codes.
{"clientToken": "[Channel manager client token]"}
Property | Type | | Description |
|
| required (always) | Client token of the channel manager. |
{"channels": [{"code": 1,"name": "Booking.com"},...]}
Property | Type | | Description |
| | required | All mapped channels. |