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
| Property | Value |
|---|---|
| URI | BaseURL/api/price/mg-hotel-prices |
| Method | POST |
| Content-Type | application/json |
π Request Parametersβ
| Parameter | Type | Description |
|---|---|---|
CheckIn | String | Accommodation check-in date. Format: YYYY-MM-DD |
CheckOut | String | Accommodation check-out date. Format: YYYY-MM-DD |
HotelCodes | String | Comma-separated MescoMG hotel codes. Maximum 50 hotel codes. |
GuestNationality | String | Default guest country code (ISO 3166-1 alpha-2). Example: Thailand: TH, Vietnam: VN |
PaxRooms | Object List | Required room occupancy list. Must contain at least one room. Each item contains Adults, Children, and ChildrenAges. |
PaxRooms[].Adults | Integer | Required. Supported range: 1-10 adults per room. |
PaxRooms[].Children | Integer | Must match ChildrenAges.length. If there are no children, send Children: 0 and ChildrenAges: []. |
PaxRooms[].ChildrenAges | Integer Array | Child ages for the room. Send an empty array when Children is 0. |
ResponseTime | Decimal | Required expected response time (seconds). |
IsDetailedResponse | Boolean | To get additional details such as day breakdown and detailed cancellation policies in search response. Default: false |
Filters | Object | Filters to narrow down the search response. Send this object; if no filters are needed, use the default values shown in the example. |
Filters.Refundable | Boolean | Only refundable room requirement. Default: false |
Filters.NoOfRooms | Integer | Filter maximum number of rooms you want to receive in response |
Filters.MealType | String | Filter by available meals. Values: Static Data => Board Types |
BookingCode | GUID | Price 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β
| Parameter | Type | Description |
|---|---|---|
Status | Object | Response status |
Status.Code | Integer | API code indicating response status |
Status.Description | String | Descriptive message |
HotelResult | Array | Information about hotels |
HotelResult[].HotelCode | Integer | MescoMG Hotel Code |
HotelResult[].Currency | String | Currency in customer's API profile |
HotelResult[].Rooms | Array | List of bookable rooms |
Rooms Structureβ
| Parameter | Type | Description |
|---|---|---|
Name | Array of String | List of room names |
RoomId | Integer | Room ID |
BookingCode | GUID | Booking code |
Inclusion | String | Inclusions |
DayRates | Array | Price breakdown for each day of stay at the hotel |
BasePrice | Decimal | Room base price |
TotalFare | Decimal | Total price of bookable unit |
TotalTax | Decimal | Total tax of bookable unit |
RoomPromotion | Array | List of promotions on rate |
CancelPolicies | Array | Detailed list of cancellation policies |
MealType | String | Meal type |
IsRefundable | Boolean | Is refundable |
WithTransfers | Boolean | Transfer included |
Supplements | Array | Section where additional taxes are listed |
CustomRow | Decimal | Custom row |
ValidityDate | DateTime | Booking code validity date |
CancelPolicies Structureβ
| Parameter | Type | Description |
|---|---|---|
Index | Integer | Sequential row number for the policy item when an index is returned. |
FromDate | String | Date and time from which the cancellation policy applies. |
ChargeType | String | Cancellation charge type. Returned values are percent, amount, nights, or unknown when the charge unit cannot be categorized. |
CancellationCharge | Decimal | Charge 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β
| Parameter | Type | Description |
|---|---|---|
Index | Integer | Indicates rate index |
Type | String | Supplement type |
Description | String | Supplement details |
Price | Decimal | Supplement charges |
Currency | String | Currency 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"
}
]
}
]
}