Skip to main content

Booking List API

This method is used to query existing bookings by stay date, creation date, booking reference, or guest email.

Booking list uses the request and response shape described below. Date filters are applied to booking and stay date fields. bookingReferenceID is matched against the booking references available for the reservation. If emailId is sent, it is applied to the returned reservation data when available. Pagination is applied to the available result set; limit and page define the requested page size and page number.

Endpoint​

POST https://mg.mescogo.com/gw/api/booking/book-list
PropertyValue
URIBaseURL/api/booking/book-list
MethodPOST
Content-Typeapplication/json

Request Parameters​

ParameterTypeDescription
FromDatestringStay start date filter. Format: YYYY-MM-DD. Required with ToDate.
ToDatestringStay end date filter. Format: YYYY-MM-DD. Required with FromDate.
CreatedFromstringOptional booking creation start date filter. Format: YYYY-MM-DD.
CreatedTostringOptional booking creation end date filter. Format: YYYY-MM-DD.
bookingReferenceIDstringOptional booking reference filter. Keep the exact property casing shown here.
emailIdstringOptional guest email filter. Keep the exact property casing shown here.
limitintegerRecords per page when pagination is used. Default: 10.
pageintegerPage number for the paginated booking list. Default: 1.

bookingReferenceID can be sent as a booking identifier, confirmation number, or client agency reference.

Authorization​

This endpoint requires a Basic Authorization header, using the same API client credentials as the other booking endpoints.

Example Request​

{
"FromDate": "2026-06-01",
"ToDate": "2026-06-30",
"CreatedFrom": "",
"CreatedTo": "",
"bookingReferenceID": "",
"emailId": "",
"limit": 10,
"page": 1
}

Successful Response​

{
"Status": {
"Code": 200,
"Description": ""
},
"BookingDetail": [
{
"Index": 1,
"BookingId": "1531561",
"ConfirmationNo": "1531561",
"BookingDate": "18.05.2026",
"Currency": "USD",
"AgencyName": "",
"BookingPrice": "250.5",
"TripName": "",
"HotelCode": "26090",
"CheckInDate": "2026-06-01",
"CheckOutDate": "2026-06-05",
"ClientReferenceNumber": "REQ-10023"
}
]
}

Response Parameters​

ParameterTypeDescription
StatusobjectResponse status
Status.CodeintegerAPI status code
Status.DescriptionstringResponse description
BookingDetailobject listMatching booking rows
BookingDetail[].IndexintegerRow index
BookingDetail[].BookingIdstringBooking identifier
BookingDetail[].ConfirmationNostringConfirmation number
BookingDetail[].BookingDatestringBooking process date
BookingDetail[].CurrencystringBooking currency
BookingDetail[].AgencyNamestringAgency name when available
BookingDetail[].BookingPricestringBooking price when available
BookingDetail[].TripNamestringTrip name when available
BookingDetail[].HotelCodestringMescoMG hotel code
BookingDetail[].CheckInDatestringStay start date
BookingDetail[].CheckOutDatestringStay end date
BookingDetail[].ClientReferenceNumberstringClient reference when available

Error Cases​

If FromDate or ToDate is empty or not in YYYY-MM-DD format, the API returns HTTP 200 with the payload below:

{
"StatusCode": 500,
"Message": "FromDate and ToDate Field Format should be YYYY-MM-DD",
"Error": "Error"
}

If a list/search request fails for part of the available result set, the response can still include rows that were processed successfully.

When processing fails before a usable response can be prepared, the API returns HTTP 200 with:

{
"StatusCode": 500,
"Message": "An error occurred during processing",
"Error": "An error occurred during processing"
}