Inventory

Update prices

This method is used when Mews updates prices of rate plans. Mews always pushes both gross and net prices, the channel manager chooses which of these to use.

Request

[ChannelManagerApiAddress]/updatePrices

{
    "clientToken": "[Mews Client token]",
    "connectionToken": "[Token of a concrete connection]",
    "messageId": "66511e1d-2405-4e49-914b-b0c800d802c9",
    "responseUrl": "https://api.mews-demo.com/api/channelManager/v1/processRateConfirmation",
    "ratePrices": [
        {
            "spaceTypeCode": "D1",
            "ratePlanCode": "FF",
            "prices": [
                {
                    "grossAmount": 100.00,
                    "netAmount": 93.46,
                    "currencyCode": "EUR",
                    "guestCount": 1
                },
                {
                    "grossAmount": 100.00,
                    "netAmount": 93.46,
                    "currencyCode": "EUR",
                    "guestCount": 2
                },
                {
                    "grossAmount": 100.00,
                    "netAmount": 93.46,
                    "currencyCode": "EUR",
                    "guestCount": 3
                },
                {
                    "grossAmount": 100.00,
                    "netAmount": 93.46,
                    "currencyCode": "EUR",
                    "guestCount": 4
                }
            ],
            "agePrices": [
                {
                    "grossAmount": 100.0,
                    "netAmount": 100.0,
                    "currencyCode": "EUR",
                    "guestCount": 1,
                    "ageCategoryCode": "Adult"
                },
                {
                    "grossAmount": 100.0,
                    "netAmount": 100.0,
                    "currencyCode": "EUR",
                    "guestCount": 2,
                    "ageCategoryCode": "Child"
                }
            ],
            "from": "2020-02-05",
            "to": "2020-02-07"
        }
    ],
    "dependentRates": [
        {
            "rateCode": "123456",
            "baseRateCode": "789",
            "adjustments": [
                {
                    "startDate": "2020-02-05",
                    "endDate": "2020-02-07",
                    "relativeValue": 10.0,
                    "absoluteValue": 10
                }
            ]
        }
    ]
}

Dependent Rate

Adjustment

Rate Price

Dates: from and to represent the first and last date on which the price applies. The prices are the same for each date between from and to. So "from": "2021-12-24", "to": "2021-12-25" means, the price applies on nights 2021-12-24/25 and 2021-12-25/26, but not anymore for night 2021-12-26/27.

Price

Age price

Response

Synchronous simple response is expected to determine whether the update was accepted or not and whether will be synchronous or asynchronous.

Update availability

This method is used when Mews updates availability of space types.

Request

[ChannelManagerApiAddress]/updateAvailability

{
    "clientToken": "[Mews Client token]",
    "connectionToken": "[Token of a concrete connection]",
    "messageId": "66511e1d-2405-4e49-914b-b0c800d802c9",
    "responseUrl": "https://api.mews-demo.com/api/channelManager/v1/processAvailabilityConfirmation",
    "availabilities": [
        {
            "spaceTypeCode": "QD",
            "from": "2020-01-01",
            "to": "2020-01-31",
            "availability": 10
        },
        {
            "spaceTypeCode": "KD",
            "from": "2020-01-01",
            "to": "2020-01-30",
            "availability": 5
        }
    ]
}

Availability

Dates: from and to represent the first and last date on which the availability applies. The availiablity is the same for each date between from and to. So "from": "2021-12-24", "to": "2021-12-25" means, the availability applies on nights 2021-12-24/25 and 2021-12-25/26, but not anymore for night 2021-12-26/27.

Response

Synchronous simple response is expected to determine whether the update was accepted or not and whether will be synchronous or asynchronous.

Update restrictions

This method is used by Mews to push restrictions updates to the channel manager. Note there is no operation to add or delete restrictions, everything is done through Update restrictions. Thus any existing restrictions with the same scope and time period are overridden by the updated restrictions.

Restrictions

Restrictions can be a little complicated, and for historical reasons they work differently in the API than they do in Mews Operations. For this reason, care is advised. For a full explanation of restrictions and the issues around them, as well as extended examples using the API, see Concepts > Restrictions. This is recommended reading if you implement this API operation.

Request

[ChannelManagerApiAddress]/updateRestrictions

{
    "clientToken": "[Mews Client token]",
    "connectionToken": "[Token of a concrete connection]",
    "messageId": "66511e1d-2405-4e49-914b-b0c800d802c9",
    "responseUrl": "https://api.mews-demo.com/api/channelManager/v1/processRestrictionConfirmation",
    "restrictions": [
        {
            "spaceTypeCode": "QD",
            "ratePlanCode": "FF",
            "from": "2020-01-01",
            "to": "2020-01-31",
            "state": [
                1
            ],
            "minLos": 1,
            "maxLos": 7
        },
        {
            "spaceTypeCode": "KD",
            "ratePlanCode": "NR",
            "from": "2020-01-01",
            "to": "2020-01-01",
            "state": [
                2,
                8
            ]
        }
    ]
}

Restriction

Dates: from and to represent the first and last date on which the restriction applies. The restriction is the same for each date between from and to. So "from": "2021-12-24", "to": "2021-12-25" means the restriction applies on nights Dec 24/25 and Dec 25/26, but not any more for night Dec 26/27.

Restriction State

Response

Synchronous simple response is expected to determine whether the update was accepted or not and whether will be synchronous or asynchronous.

Last updated