Reservations

Process group

[async] Use this operation to push a group of reservations or bookings to Mews. The operation is called Process Group because it supports multiple options for processing on multiple groups of reservations. As well as creating new reservations in Mews, you can modify existing reservations and make cancellations, all using the same endpoint. Mews will process the requests and confirm back the reservations asynchronously.

Rules to follow

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 two ways to cancel a reservation from a multi-reservation group:

      1. If the reservation.state is set to Reservation States.Cancelled.

      2. If the reservation is not included in the group definition message.

  • When cancelling a whole group, the reservations collection can be empty of all reservations provided as cancelled (as per case 1 above).

Request

  • 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 two space reservations plus cancellation of a third space reservation. The first reservation definition shows all details, the second reservation definition shows the minimal required details for creation / modification of a reservation. The third reservation definition shows the partial cancellation - cancelling the third space reservation.

{
    "clientToken": "[Channel manager client token]",
    "connectionToken": "[Token of a concrete connection]",
    "messageId": "MyWeddingMessage789456123",
    "channelId": "EXP-123456",
    "channelManagerId": "123456",
    "availabilityBlockCode": "Wedding123",
    "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": "john@smith.com",
        "firstName": "John",
        "lastName": "Smith",
        "title": "Mister",
        "nationalityCode": "US",
        "languageCode": "en-US",
        "telephone": "1-3526-88918"
    },
    "sources": [
        {
            "code": 1,
            "name": "Expedia",
            "type" : 0,
            "isPrimary": true
        },
        {
            "code": 2,
            "name": "ChoiceCRS",
            "type" : 0,
            "isPrimary": false
        }
    ],
    "company": {
        "id": "MEWS",
        "name": "Mews Systems, s.r.o.",
        "contact": {
            "email": "mews@mews.li",
            "phone": "+420 775 684 983",
            "address": {
                "zip": "110 00",
                "city": "Prague",
                "country": "Czech Republic",
                "addressLine1": "586 Ulice Test",
                "addressLine2": "Patro 2"
            }
        }
    },
    "travelAgency": {
        "iata": "65553",
        "name": "Best Travel Agency, s.r.o",
        "contact": {
            "email": "best@company.com",
            "phone": "+420 775 775 775",
            "address": {
                "zip": "132 45",
                "addressLine1": "Some other street 123",
                "addressLine2": "Some other detail",
                "city": "Some other city",
                "country": "US"
            }
        }
    },
    "paymentCard": {
        "cvv": "666",
        "expireDate": "1222",
        "holderName": "John Smith",
        "number": "4111111111111111",
        "type": 1
    },
    "paymentType": 1,
    "reservations": [
        {
            "guestCounts": [
                {
                    "code": "Adult",
                    "count": 1
                }
            ],
            "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": "jane@smith.com",
                    "firstName": "Jane",
                    "lastName": "Smith",
                    "title": "Misses",
                    "nationalityCode": "US",
                    "languageCode": "en-US",
                    "telephone": "1-369-81891",
                    "loyaltyCode": "PG60972345",
                    "loyaltyInfo": {
                        "membershipId": "PG60972345",
                        "programCode": "BWR"
                    }
                }
            ],
            "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
            }
        },
        {
            "guestCounts": [
                {
                    "code": "Adult",
                    "count": 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
            }
        },
        {
            "guestCounts": [
                {
                    "code": "Adult",
                    "count": 2
                }
            ],
            "code": "03",
            "from": "2020-05-06",
            "ratePlanCode": "FF",
            "spaceTypeCode": "DBL",
            "state": 3,
            "to": "2020-05-09"
        }
    ],
    "totalAmount": {
        "net": 486,
        "gross": 600
    }
}

Customer

Loyalty Info

Title

  • Mister

  • Misses

  • Miss

Company

Travel Agency

Contact

Payment card

Payment Card Types

Source

Source Types

Reservation

Codes: It is required that code remains the same within each booking modification message and partial modification message. If this can't be achieved because the channel doesn't provide it, simple generation of codes "01", "02", ... will suffice as long as those codes are generated in the same way for each message regarding that one booking.

Guest Count

Age Category Code

  • Infant

  • Child

  • Teenager

  • Adult

  • SeniorCitizen

Reservation States

Extra

Extra product cost

  • The total cost of the extra product should be sent in amount.

  • amount can include only gross, only net, or both gross and net.

  • from and to can define any interval within the reservation dates, but they cannot be the same date. For example, if a reservation is from 2025-10-12 to 2025-10-15, then the extra from and to cannot be specified as 2025-10-12 to 2025-10-12.

Negative amounts

  • The cost for an extra product can be negative, i.e. less than zero.

  • If a reservation night price is negative, the reservation will fail.

  • If extra product costs are negative, their value will be deducted from the reservation night price.

  • As long as the resulting reservation price (after deducting the cost of the extra products) is positive, all is well.

  • If the resulting reservation price (after deducting the cost of the extra products) is negative, the reservation will still pass and be processed, however this can create complications for the property and they may have to re-price it.

  • It is recommended to send extras per room or space, because it is less likely that the resulting reservation price will fall below zero.

Amount

Extra Pricing Types

Response

Synchronous simple response will determine whether the reservations or bookings were accepted for processing or not. Confirmation will be sent asynchronously using the Confirm booking operation.

Confirm group confirmation

Request

[PlatformAddress]/api/channelManager/v1/processGroupConfirmation

{
    "clientToken": "[Channel manager client token]",
    "connectionToken": "[Token of a concrete connection]",
    "relatedMessageId": "[Id of message which request relates to]",
    "success": true,
    "code": 123,
    "reservations": [
        {
            "code": "Ext123",
            "confirmationNumber": "Mews456"
        }
    ]
}

Reservation Confirmation

Response

Synchronous simple response is expected.

Last updated