Skip to main content

Search API

This method searches the hotel and room inventory available through MescoGo for the requested dates and occupancy.

πŸ“ Endpoint​

POST {BaseURL}/api/price/mg-hotel-prices
PropertyValue
URI{BaseURL}/api/price/mg-hotel-prices
MethodPOST
Content-Typeapplication/json

Authorization​

Send the Basic Auth header described in Authentication.

πŸ“‹ Request Parameters​

ParameterTypeDescription
CheckInStringAccommodation check-in date. Format: YYYY-MM-DD
CheckOutStringAccommodation check-out date. Format: YYYY-MM-DD
HotelCodesStringComma-separated MescoGo hotel codes. Maximum 50 codes per request.
GuestNationalityStringGuest nationality as a two-letter ISO 3166-1 alpha-2 country code. RU is valid; send the guest's actual nationality. Availability, price, and cancellation conditions may vary by nationality.
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 maximum response time requested for the search, in seconds. Must be greater than 0.
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 even when no filter is needed.
Filters.RefundableBooleanOnly refundable room requirement. Default: false
Filters.NoOfRoomsIntegerMaximum number of rooms to return per hotel. 0 returns all matching rooms.
Filters.MealTypeStringMeal filter. Send All for no meal filter, or one or more meal codes separated by commas. See Board Types.
BookingCodeGUIDPrice check is done with the booking code returned as a result of a previously sent price search query

BookingCode Notes​

  • If BookingCode is empty, the request starts a new search.
  • If BookingCode contains a code returned by a previous search for the same API account, the current price and availability are checked for that room.
  • A returned room code is valid only until its ValidityDate. Start a new search after it expires.

πŸ“€ Example Request (Single 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[].HotelCodeIntegerMescoGo hotel code
HotelResult[].CurrencyStringCurrency of the returned prices. Prices are returned in USD.
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
CancelPoliciesArray or nullDetailed cancellation policies. Returned when IsDetailedResponse is true; otherwise this field may be null.
MealTypeStringMeal type
IsRefundableBooleanIs refundable
WithTransfersBooleanTransfer included
SupplementsArraySection where additional taxes are listed
CustomRowDecimalInformational commercial adjustment related to the room rate. It is already included in TotalFare; do not add it again.
ValidityDateDateTimeBooking code validity date

CancelPolicies Structure​

ParameterTypeDescription
FromDateStringDate and time from which the cancellation penalty applies, based on the hotel's local time. The value is not converted to UTC or the customer's local timezone; use it exactly as returned.
ChargeTypeStringCancellation charge type. Returned values can be percent, amount, nights, or unknown.
CancellationChargeDecimalCharge value. Interpret it according to ChargeType; when the type is unknown, do not infer a unit.

Supplements Structure​

ParameterTypeDescription
IndexIntegerIndicates rate index
TypeStringSupplement type
DescriptionStringSupplement details
PriceDecimalSupplement charges
CurrencyStringCurrency of supplement charges. Supplement prices are returned in USD.

πŸ“₯ Example Response​

{
"Status": {
"Code": 200,
"Description": "Successful"
},
"HotelResult": [
{
"HotelCode": 26090,
"Currency": "USD",
"Rooms": [
{
"Name": ["Triple Room"],
"RoomId": 0,
"BookingCode": "00000000-0000-4000-8000-000000000003",
"Inclusion": "",
"DayRates": [
[
{ "BasePrice": 102.1440 },
{ "BasePrice": 102.1440 }
]
],
"BasePrice": 102.144,
"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"
}
]
}
]
}

Example data note: The booking code and dates in this example are synthetic and illustrative. Do not copy them as live availability data.

When no matching rooms are available, the response uses the same Status / HotelResult shape with Status.Code 201 and an empty HotelResult array. Validation and processing errors may use a Status object with a body code such as 400, 404, or 500; handle the HTTP status separately from the body status.