Channel Manager API
  • Mews Channel Manager API
  • Usage guidelines
    • Authentication
    • Requests
    • Responses
    • Environments
    • Compliance
  • Concepts
    • Restrictions
  • Use cases
    • Channels
    • Inventory updates
  • API Operations (Mews)
    • Configuration
    • Availability blocks
    • Inventory
    • Reservations
  • API Operations (CHM)
    • Availability blocks
    • Inventory
    • Reservations
    • Notifications
  • Your integration journey
    • Certification
    • Certification tests
  • Deprecations
  • Changelog
    • Changelog 2023
    • Changelog 2022
    • Changelog 2021
    • Changelog 2020
    • Changelog 2019
    • Changelog 2018
    • Changelog 2017
Powered by GitBook
On this page
  1. API Operations (Mews)

Configuration

PreviousAPI Operations (Mews)NextAvailability blocks

Last updated 9 months ago

Was this helpful?

CtrlK
  • Get properties
  • Request
  • Response
  • Get configuration
  • Request
  • Response
  • Get channels
  • Request
  • Response

Was this helpful?

Get properties

This operation is used to get the list of available properties and their connection details, based on your Client Token and an employee email address. A valid email address must be supplied which corresponds to an employee of the enterprise to which the properties belong. The system will verify the email address and return the list of properties and connections (including Connection Tokens) for which the owner of the email address has access.

Request

[PlatformAddress]/api/channelManager/v1/getProperties

{
    "clientToken": "[Channel manager client token]",
    "email": "chm-api@mews.li"
}
Property
Type
Contract
Description

clientToken

string

required

Client token of the channel manager.

email

string

required

Verified email of an enterprise employee held on the Mews system.

Response

This sample response shows that the owner of the email address has access to two properties: Sample Hostel and White House Hotel. Sample Hostel has two connections to this channel manager, whilst White House Hotel has no connections.

{
    "success": true,
    "properties": [
        {
            "id": "sample-hostel",
            "name": "Sample Hostel",
            "connections": [

Property
Type
Contract
Description

properties

collection

required

List of available properties.

Property Info

Property
Type
Contract
Description

name

string

required

Name of the property.

id

string

required

Unique ID of the property.

connections

collection

optional

Connection Info

Property
Type
Contract
Description

token

string

required

Connection Token for the connection.

name

string

optional

Name of the connection.

Get configuration

This operation returns the configuration of the given property connection.

Request

[PlatformAddress]/api/channelManager/v1/getConfiguration

{
    "clientToken": "[Channel manager client token]",
    "connectionToken": "[Token of a concrete connection]",
    "extent": {
        "includeUnsynchronizedRates": true,
        "includeUnsynchronizedCategories": true,
        "includeProducts": true,
        "includeCompanies": true,
        "includeAgeCategories": true
    }
}
Property
Type
Contract
Description

clientToken

string

required

Client token of the channel manager.

connectionToken

string

required

Connection token of a property connection.

extent

object

optional

Configuration Extent

Property
Type
Contract
Description

includeUnsynchronizedRates

bool

optional

If true, unsynchronized will be returned as well. Unsynchronized rate plan means that Mews will not push prices and restrictions for that rate plan, but when a reservation comes with the rate plan code, Mews will link the correct rate plan with the reservation.

includeProducts

bool

optional

If true, products mapped to a channel manager rate plan will be returned. Products mapped to a channel manager rate plan means that Mews sends a total price combining nightly price and product price in requests.

includeCompanies

bool

optional

Response

This is an example of a successful response. In case an error occurred, the response will contain only the Error object.

{
    "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": "reception@whh.com",
        "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.mews-demo.com/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.mews-demo.com/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",
            "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",
            "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"
            }
        }
    ],
    "ageCategories": [
        {
            "code": "10",
            "name": "Adult",
            "minimumAge": null,
            "maximumAge": null
        },
        {
            "code": "8",
            "name": "Child",
            "minimumAge": 0,
            "maximumAge": 18
        }
    ],
    "success": true
}
Property
Type
Contract
Description

connectionToken

string

required

Token of the connection.

property

object

required

Details of the property.

ratePlans

collection

required

Property

Property
Type
Contract
Description

name

string

required

Name of the property.

description

string

optional

Description of the property.

languageCode

string

required

Pricing Mode types

Code
Description

0

Gross

1

Net

Address

Property
Type
Contract
Description

addressLine1

string

optional

First line of the address.

addressLine2

string

optional

Second line of the address.

city

string

optional

Image

Property
Type
Contract
Description

type

int

required

code.

url

string

required

Public URL of the image.

Image types

Code
Description

1

Logo

2

Photo

Rate Plan

Property
Type
Contract
Description

code

string

required

Mapping code of the rate plan.

name

string

required

Name of the rate plan.

currencyCode

string

required

Payment types

Code
Description
Notes

1

Prepaid

When guest has already paid to the Channel (i.e. OTA).

2

Preauthorized

When the booking is covered by a guarantee (preauthorization or a payment card).

3

OnSite

When guest will pay on site.

Rate types

Code
Description

0

Private

1

Public

Cancellation Policy

Property
Type
Contract
Description

applicability

int

required

code.

offset

string

optional

Offset specifying a "shift" from the moment given by applicability when the cancellation policy starts to apply. Format "[days]DT[hours]H[minutes]M" inspired by . E.g. "-1DT2H0M" means "-1 day and 2 hours before applicability moment", "0DT2H0M" means "2 hours after applicability moment".

penalty

object

required

Cancellation Policy Applicability

Code
Description
Notes

1

Creation

Cancellation policy applies from the moment the booking is created.

2

Start

Cancellation policy applies from the moment the booking starts (i.e. time included).

3

Start Date

Cancellation policy applies from the 0:00 on the day when the booking starts (i.e. time is not included).

Cancellation Penalty

Property
Type
Contract
Description

absolute

object

required

Defines absolute fee penalty.

relative

object

required

Defines relative (i.e. %) fee penalty.

Absolute Cancellation Penalty

Property
Type
Contract
Description

amount

decimal

required

Defines the amount of the absolute fee. Sent in gross.

currencyCode

string

required

three-letter currency code of the absolute fee.

Relative Cancellation Penalty

Property
Type
Contract
Description

value

decimal

required

Defines the % value of the relative fee (e.g 0.3 for "30%").

nights

decimal

optional

Determines maximum number of nights included in the relative fee calculation, empty means "all nights".

Space Categories

Property
Type
Contract
Description

code

string

required

Mapping code of the space type.

name

string

required

Name of the space type.

description

string

optional

Space Classifications

Code
Description

1

Apartment

2

Bungalow

3

Chalet

4

Double Room

5

Holiday Home

6

Mobile Home

Bed Types

Code
Description

1

Single bed

2

Twin bed

3

Double bed

4

Queen bed

5

King bed

6

Sofa bed

Inventory Mappings

Property
Type
Contract
Description

ratePlanCode

string

required

Mapping code of the rate plan

spaceTypeCode

string

required

Mapping code of the space type related to the rate plan.

Products

Property
Type
Contract
Description

code

string

required

Mapping code of the product.

name

string

required

Name of the product.

description

string

optional

Product Mapping

Property
Type
Contract
Description

ratePlanCode

string

required

Mapping code of the rate plan.

productCode

string

required

Mapping code of the product related to the rate plan.

Companies

Property
Type
Contract
Description

id

string

optional

Company identifier. Not supported yet.

iata

string

optional

Related to Travel Agencies only.

name

string

required

Travel Agencies

Property
Type
Contract
Description

id

string

optional

Company identifier. Not supported yet.

iata

string

optional

IATA code.

name

string

required

Age categories

Property
Type
Contract
Description

code

string

required

Mapping code of age category.

name

string

required

Display name.

minimumAge

int

optional

Get channels

Get the list of all supported channels (including OTAs or Online Travel Agents) plus their assigned mapping codes.

Note: The mapping code is not a continuous sequence of numbers, there are some gaps. Gaps arise because OTAs get merged over time or otherwise disappear. New Channels will always be added to the bottom of the list, so you can easily keep track. Please check the list periodically to update your channels list.

Request

[PlatformAddress]/api/channelManager/v1/getChannels

{
      "clientToken": "[Channel manager client token]"
}
Property
Type
Contract
Description

clientToken

string

required

Client token of the channel manager.

Response

{
    "channels": [
        {
            "code": 1,
            "name": "Booking.com"
        },
        {
            "code": 2,
            "name": "Expedia"
        },
        ...
    ]
}
Property
Type
Contract
Description

channels

collection

required

All mapped channels.

Channel

Property
Type
Contract
Description

code

int

required

Mapping code of channel.

name

string

required

Name of channel.

{
"token": "[1st connectionToken]",
"name": "Connection for dorms"
},
{
"token": "[2nd connectionToken]",
"name": "Connection for beds"
},
{
"token": "[3rd connectionToken]"
}
]
},
{
"id": "whh",
"name": "White House Hotel"
}
]
}

List of supported connections.

Specifies what to include in the return data.

If true, mapped profiles for companies (e.g. Microsoft) and travel agencies (e.g. Expedia) will be returned. A company profile needs to be mapped with a Channel code. To map a travel agency, follow the guide Setting up travel agencies.

includeUnsynchronizedCategories

bool

optional

If true, unsynchronized space categories will be returned as well. Unsynchronized space category means that Mews will not push availability for that space category, but when a reservation comes with the space category code, Mews will link the correct space category with the reservation.

includeAgeCategories

bool

optional

If true, age categories mapped to a channel manager integration will be returned.

Rate plans of the property.

spaceCategories

Space Categories collection

required

Space categories (space types) of the property.

inventoryMappings

Inventory Mappings collection

required

Defines relations between rate plans and space categories.

ageCategories

Age categories collection

optional

Age categories of the property.

Language code of the default language of the property. All names and descriptions are in this language.

timeZoneIdentifier

string

required

Property time zone identifier.

websiteUrl

string

optional

Website of the property.

email

string

optional

Email contact of the property.

telephone

string

optional

Phone contact of the property.

spaceCount

int

required

Total count of spaces sold/offered by the property.

pricingMode

int

required

Pricing Mode type. Determines whether net or gross prices are sent to the channel manger.

address

Address object

optional

Address of the property.

images

Image object

optional

Images associated with the property, e.g. brand logos and exterior photographs.

City.

region

string

optional

Region.

zip

string

optional

Zip code.

country

string

optional

ISO 3166-1 alpha-2 country code - two letter country code or ISO 3166-1 alpha-3 country code - three letter country code.

latitude

decimal

optional

Latitude - from range [-90, 90].

longitude

decimal

optional

Longitude - from range [-180, 180].

ISO-4217 three-letter currency code of the rate plan price.

description

string

optional

Description of the rate plan.

paymentType

int

required

Payment type code. Deprecated!

cancellationPolicies

Cancellation Policy collection

optional

Cancellation policies of the rate plan.

isSynchronized

bool

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).

rateType

int

required

Determines whether rate plan is private (available for channel reservations only) or public (bookable via Mews Distributor as well).

Defines penalty that applies based on the cancellation policy.

Description of the space type.

spaceCount

int

required

Number of sold/offered spaces of the type.

bedCount

int

optional

Number of beds of the space type - required if the type describes some room type. Represents default occupancy.

extraBedCount

int

optional

Number of extra beds of the space type.

classification

int

required

Space classification code.

bedType

int

optional

Bed Type - required if the type describes some room type.

images

Image object

optional

Images of the space type. These are always image type 2 because they are photos, not logos.

7

Quadruple Room

8

Dormitory Bed

9

Single Room

10

Studio

11

Suite

12

Tent

13

Triple Room

14

Twin Room

15

Villa

16

Dormitory

17

Site

18

Office

19

MeetingRoom

20

ParkingSpot

21

Desk

22

TeamArea

24

CaravanOrRv

25

UnequippedCampsite

Description of the product.

unitAmount

Amount object

required

A product cost.

currencyCode

string

required

ISO-4217 three-letter currency code of the product.

netValue

decimal

required

Tax exclusive product cost.

grossValue

decimal

required

Tax inclusive product cost.

cancellationPolicies

Cancellation Policy collection

optional

Cancellation policies of the rate plan.

taxValues

object

required

Identifies legal environment specific taxes.

code

string

required

Tax code corresponding to legal environment.

value

decimal

required

Tax amount.

pricing

string

required

Identified in pricing types.

Company name.

contact

string

optional

Company contact.

phone

string

optional

Company phone number.

addresses

Address object

optional

Company address.

channel

Channel

optional

Mapping channel of the company.

Travel Agency name.

contact

string

optional

Travel Agency contact.

phone

string

optional

Travel Agency phone number.

addresses

Address object

optional

Travel Agency address.

channel

Channel

optional

Mapping channel of the company.

Minimal age for the age category.

maximumAge

int

optional

Maximal age for the age category.

Property Info
Connection Info
Configuration extent
Rate plans
Update Prices
Property
RatePlan
Image type
Cancellation Policy Applicability
ISO 8601 for durations
Cancellation Penalty
Absolute Cancellation Penalty
Relative Cancellation Penalty
ISO-4217
Channel