Skip to main content

Search API

This method is used for flexible room search requests. Some filters and special features can be applied before sending the availability request.

πŸ“ Endpoint​

POST https://mg.mescogo.com/gw/api/price/mg-hotel-prices
PropertyValue
URIBaseURL/api/price/mg-hotel-prices
MethodPOST
Content-Typeapplication/json

πŸ“‹ Request Parameters​

ParameterTypeDescription
CheckInStringAccommodation check-in date. Format: YYYY-MM-DD
CheckOutStringAccommodation check-out date. Format: YYYY-MM-DD
HotelCodesStringComma-separated MescoMG hotel codes. Maximum 50 hotel codes.
GuestNationalityStringDefault guest country code (ISO 3166-1 alpha-2). Example: Thailand: TH, Vietnam: VN
PaxRoomsObject ListRequired room occupancy list. Must contain at least one room. Each item contains Adults, Children, and ChildrenAges.
PaxRooms[].AdultsIntegerRequired. Supported range: 1-10 adults per room.
PaxRooms[].ChildrenIntegerMust match ChildrenAges.length. If there are no children, send Children: 0 and ChildrenAges: [].
PaxRooms[].ChildrenAgesInteger ArrayChild ages for the room. Send an empty array when Children is 0.
ResponseTimeDecimalRequired expected response time (seconds).
IsDetailedResponseBooleanTo get additional details such as day breakdown and detailed cancellation policies in search response. Default: false
FiltersObjectFilters to narrow down the search response. Send this object; if no filters are needed, use the default values shown in the example.
Filters.RefundableBooleanOnly refundable room requirement. Default: false
Filters.NoOfRoomsIntegerFilter maximum number of rooms you want to receive in response
Filters.MealTypeStringFilter by available meals. Values: Static Data => Board Types
BookingCodeGUIDPrice check is done with the booking code returned as a result of a previously sent price search query

BookingCode Notes​

  • If the booking code field is empty, it is perceived as a new price search
  • If filled, the price of the previously submitted price search query is checked
  • Each query has a validity date

πŸ“€ Example Request (Multiple Room)​

{
"CheckIn": "2026-12-29",
"CheckOut": "2026-12-31",
"HotelCodes": "26090",
"GuestNationality": "RU",
"PaxRooms": [
{
"Adults": 2,
"Children": 1,
"ChildrenAges": [4]
}
],
"ResponseTime": 1,
"IsDetailedResponse": true,
"Filters": {
"Refundable": false,
"NoOfRooms": 0,
"MealType": "All"
},
"BookingCode": ""
}

πŸ“₯ Response Parameters​

ParameterTypeDescription
StatusObjectResponse status
Status.CodeIntegerAPI code indicating response status
Status.DescriptionStringDescriptive message
HotelResultArrayInformation about hotels
HotelResult[].HotelCodeIntegerMescoMG Hotel Code
HotelResult[].CurrencyStringCurrency in customer's API profile
HotelResult[].RoomsArrayList of bookable rooms

Rooms Structure​

ParameterTypeDescription
NameArray of StringList of room names
RoomIdIntegerRoom ID
BookingCodeGUIDBooking code
InclusionStringInclusions
DayRatesArrayPrice breakdown for each day of stay at the hotel
BasePriceDecimalRoom base price
TotalFareDecimalTotal price of bookable unit
TotalTaxDecimalTotal tax of bookable unit
RoomPromotionArrayList of promotions on rate
CancelPoliciesArrayDetailed list of cancellation policies
MealTypeStringMeal type
IsRefundableBooleanIs refundable
WithTransfersBooleanTransfer included
SupplementsArraySection where additional taxes are listed
CustomRowDecimalCustom row
ValidityDateDateTimeBooking code validity date

CancelPolicies Structure​

ParameterTypeDescription
IndexIntegerSequential row number for the policy item when an index is returned.
FromDateStringDate and time from which the cancellation policy applies.
ChargeTypeStringCancellation charge type. Returned values are percent, amount, nights, or unknown when the charge unit cannot be categorized.
CancellationChargeDecimalCharge value. For percent, this is a percentage rate. For amount, this is a monetary amount in the room currency. For nights, this is the number of nights charged. For unknown, do not infer a percentage, amount, or night-count meaning from the value.

Supplements Structure​

ParameterTypeDescription
IndexIntegerIndicates rate index
TypeStringSupplement type
DescriptionStringSupplement details
PriceDecimalSupplement charges
CurrencyStringCurrency applicable for supplement charges

πŸ“₯ Example Response​

{
"Status": {
"Code": 200,
"Description": "Successful"
},
"HotelResult": [
{
"HotelCode": 26090,
"Currency": "USD",
"Rooms": [
{
"Name": ["Triple Room"],
"RoomId": 0,
"BookingCode": "0906c991-6d39-46d3-ad78-d198c6801b52",
"Inclusion": "",
"DayRates": [
[
{ "BasePrice": 102.1440 },
{ "BasePrice": 102.1440 }
]
],
"TotalFare": 218.11,
"TotalTax": 13.82,
"RoomPromotion": [],
"CancelPolicies": [
{
"FromDate": "2026-12-29T00:00:00",
"ChargeType": "percent",
"CancellationCharge": 100
},
{
"FromDate": "2026-12-27T00:00:00",
"ChargeType": "percent",
"CancellationCharge": 90
},
{
"FromDate": "2026-12-22T00:00:00",
"ChargeType": "percent",
"CancellationCharge": 50
},
{
"FromDate": "2026-12-15T00:00:00",
"ChargeType": "percent",
"CancellationCharge": 20
}
],
"MealType": "FB",
"IsRefundable": false,
"Supplements": [
{
"Index": 1,
"Type": "",
"Description": "City tax of 10% per night (Not included in price)",
"Price": 13.82,
"Currency": "USD"
},
{
"Index": 2,
"Type": "",
"Description": "Service tax of 8% per night (Included in price)",
"Price": 11.26,
"Currency": "USD"
},
{
"Index": 3,
"Type": "",
"Description": "Added taxes of 15% per room per night (Included in price)",
"Price": 22.8,
"Currency": "USD"
}
],
"WithTransfers": false,
"CustomRow": 14.29,
"ValidityDate": "2026-12-22T09:53:05.3847699+00:00"
}
]
}
]
}