Reservations
Process group
[async
] This operation allows Mews to push a group of reservations or bookings to the Channel Manager. The operation supports creations, modifications, and partial or complete cancellations. Confirmation is done asynchronously.
Request
[ChannelManagerApiAddress]/processGroup
{
"clientToken": "[Channel manager client token]",
"connectionToken": "[Token of a concrete connection]",
"messageId": "66511e1d-2405-4e49-914b-b0c800d802c9",
"responseUrl": "https://api.mews-demo.com/api/channelManager/v1/processGroupConfirmation",
"channelId": "EXP-123456",
"channelManagerId": "123456",
"availabilityBlockCode": "Channel-manager-Wedding123",
"availabilityBlockConfirmationNumber": "Mews-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",
"loyaltyCode": "PG60972345",
"loyaltyInfo": {
"membershipId": "PG60972345",
"programCode": "BWR",
"tierCode": "Gold"
}
},
"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"
}
}
},
"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"
}
],
"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,
"timeState": 1,
"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"
},
"paymentCardData": {
"identifier": "12345678-1011-1213-1415-161718192021"
"expireDate": "1222",
"holderName": "John Smith",
"obfuscatedNumber": "41111*******1111",
"type": 1
}
],
"totalAmount": {
"net": 486,
"gross": 600
}
}
Confirm booking
This method is used when Mews confirms a booking sent via Process group. It is used to send confirmation of success as well as confirmation of failure.
Request
[ChannelManagerApiAddress]/confirmGroup
Confirmation of success:
{
"clientToken": "[Mews Client token]",
"connectionToken": "[Token of a concrete connection]",
"relatedMessageId": "MyWeddingMessage789456123",
"channelManagerId": "123456",
"reservations": [
{
"code": "01",
"confirmationNumber": "PMS-001"
}
]
}
Confirmation of failure:
{
"clientToken": "[Mews Client token]",
"connectionToken": "[Token of a concrete connection]",
"relatedMessageId": "MyWeddingMessage789456123",
"channelManagerId": "123456",
"error": {
"code": 4,
"message": "There is no space type with mapping code 'ST'."
}
}
Reservation Confirmation
Response
Simple response is expected to determine whether the update was accepted or not.
Last updated