# Example Request/Response

#### Request

**Header**&#x20;

Authorization: Basic \[API key]&#x20;

Example&#x20;

```
Authorization: Basic dhxHaThFUDg6czVJYUR5bGw= 
```

**Body**

```json
{
    "hotelid": "HT24001234"
}
```

The required node hotelid contains the pelican's hotel id for which the pelican wishes to check for reservation information.

#### Response Model — No pending new, modified, cancelled reservations

In this case no messages are pending in queue for the property based on the parameters provided in Step 1.

```json
{
    "reservations": []
}
```

#### Response Model — New reservation confirmation

```json
{
    "reservations": [{
            "booked_at": "2024-02-23",
            "commissionamount": "0",
            "currencycode": "IDR",
            "paymenttype": "Channel Collect",
            "hotel_id": "HT24001234",
            "hotel_name": "Grand Ocean",
            "customer": {
                "address": "Street View 345",
                "cc_expiration_date": "0225",
                "cc_name": "John Doe",
                "cc_number": "4111111111111111",
                "cc_type": "VI",
                "city": "Jakarta",
                "state": "",
                "countrycode": "ID",
                "email": "john.doe@mail.com",
                "first_name": "John",
                "last_name": "Doe",
                "remarks": "Approximate time of arrival: between 17:00 and 18:00",
                "telephone": "+62 51212345",
                "zip": "11230"
            },
            "rooms": [{
                    "arrival_date": "2024-03-11",
                    "departure_date": "2024-03-13",
                    "guest_name": "John Doe",
                    "first_name": "John",
                    "last_name": "Doe",
                    "id": "RO24000001",
                    "numberofguests": "2",
                    "numberofchildren": "0",
                    "numberofadults": "2",
                    "roomstaystatus": "new",
                    "roomreservation_id": "1708675354433",
                    "totalbeforetax": 359504.13,
                    "totaltax": 75495.87,
                    "totalprice": 435000,
                    "price": [{
                            "date": "2024-03-11",
                            "rate_id": "TN24000002",
                            "mealplan_id": "15",
                            "mealplan": "Room only",
                            "tax": 31500,
                            "pricebeforetax": 150000,
                            "priceaftertax": 181500
                        }, {
                            "date": "2024-03-12",
                            "rate_id": "TN24000002",
                            "mealplan_id": "15",
                            "mealplan": "Room only",
                            "tax": 31500,
                            "pricebeforetax": 150000,
                            "priceaftertax": 181500
                        }
                    ],
                    "addons": [{
                            "name": "Breakfast",
                            "nights": "2",
                            "priceperunit": 18000.00,
                            "pricemode": "4",
                            "price": 72000
                        }
                    ]
                }
            ],
            "affiliation": {
                "pos": "BookHotel.com",
                "source": "BookHotel.com",
                "OTA_Code": "1"
            },
            "channel_booking_id": "4282618470",
            "processed_at": "2024-02-23 08:02:26",
            "id": "4282618470_HT24001234",
            "reservation_notif_id": "170867534138555979264",
            "modified_at": "2024-02-23",
            "status": "new",
            "totalprice": 435000,
            "totaltax": 75495.87,
            "totalroom": 300000,
            "totalroomtax": 63000,
            "totaladdon": 59504.13,
            "totaladdontax": 12495.87
        }
    ]
}
```

#### Response Model — Modified reservation

```json
{
    "reservations": [{
            "booked_at": "2024-02-23",
            "commissionamount": "0",
            "currencycode": "IDR",
            "paymenttype": "Channel Collect",
            "hotel_id": "HT24001234",
            "hotel_name": "Grand Ocean",
            "customer": {
                "address": "Street View 345",
                "cc_expiration_date": "0225",
                "cc_name": "John Doe",
                "cc_number": "4111111111111111",
                "cc_type": "VI",
                "city": "Jakarta",
                "state": "",
                "countrycode": "ID",
                "email": "john.doe@mail.com",
                "first_name": "John",
                "last_name": "Doe",
                "remarks": "Approximate time of arrival: between 17:00 and 18:00",
                "telephone": "+62 51212345",
                "zip": "11230"
            },
            "rooms": [{
                    "arrival_date": "2024-03-11",
                    "departure_date": "2024-03-13",
                    "guest_name": "John Doe",
                    "first_name": "John",
                    "last_name": "Doe",
                    "id": "RO24000001",
                    "numberofguests": "2",
                    "numberofchildren": "0",
                    "numberofadults": "2",
                    "roomstaystatus": "modified",
                    "roomreservation_id": "1708675354433",
                    "totalbeforetax": 359504.13,
                    "totaltax": 75495.87,
                    "totalprice": 435000,
                    "price": [{
                            "date": "2024-03-11",
                            "rate_id": "TN24000002",
                            "mealplan_id": "15",
                            "mealplan": "Room only",
                            "tax": 31500,
                            "pricebeforetax": 150000,
                            "priceaftertax": 181500
                        }, {
                            "date": "2024-03-12",
                            "rate_id": "TN24000002",
                            "mealplan_id": "15",
                            "mealplan": "Room only",
                            "tax": 31500,
                            "pricebeforetax": 150000,
                            "priceaftertax": 181500
                        }
                    ],
                    "addons": [{
                            "name": "Breakfast",
                            "nights": "2",
                            "priceperunit": 18000.00,
                            "pricemode": "4",
                            "price": 72000.00
                        }
                    ]
                }
            ],
            "affiliation": {
                "pos": "BookHotel.com",
                "source": "BookHotel.com",
                "OTA_Code": "1"
            },
            "channel_booking_id": "4282618470",
            "processed_at": "2024-02-23 08:12:26",
            "id": "4282618470_HT24001234",
            "reservation_notif_id": "170867534138555979265",
            "modified_at": "2024-02-23",
            "status": "modified",
            "totalprice": 435000,
            "totaltax": 75495.87,
            "totalroom": 300000,
            "totalroomtax": 63000,
            "totaladdon": 59504.13,
            "totaladdontax": 12495.87

        }
    ]
}
```

#### Response Model — Cancelled reservation

```json
{
    "reservations": [{
            "booked_at": "2024-02-23",
            "commissionamount": "0",
            "currencycode": "IDR",
            "paymenttype": "Channel Collect",
            "hotel_id": "HT24001234",
            "hotel_name": "Grand Ocean",
            "customer": {
                "address": "Street View 345",
                "cc_expiration_date": "0225",
                "cc_name": "John Doe",
                "cc_number": "4111111111111111",
                "cc_type": "VI",
                "city": "Jakarta",
                "state": "",
                "countrycode": "ID",
                "email": "john.doe@mail.com",
                "first_name": "John",
                "last_name": "Doe",
                "remarks": "Approximate time of arrival: between 17:00 and 18:00",
                "telephone": "+62 51212345",
                "zip": "11230"
            },
            "rooms": [{
                    "arrival_date": "2024-03-11",
                    "departure_date": "2024-03-13",
                    "guest_name": "John Doe",
                    "first_name": "John",
                    "last_name": "Doe",
                    "id": "RO24000001",
                    "numberofguests": "2",
                    "numberofchildren": "0",
                    "numberofadults": "2",
                    "roomstaystatus": "cancelled",
                    "roomreservation_id": "1708675354433",
                    "totalbeforetax": 359504.13,
                    "totaltax": 75495.87,
                    "totalprice": 435000,
                    "price": [{
                            "date": "2024-03-11",
                            "rate_id": "TN24000002",
                            "mealplan_id": "15",
                            "mealplan": "Room only",
                            "tax": 31500,
                            "pricebeforetax": 150000,
                            "priceaftertax": 181500
                        }, {
                            "date": "2024-03-12",
                            "rate_id": "TN24000002",
                            "mealplan_id": "15",
                            "mealplan": "Room only",
                            "tax": 31500,
                            "pricebeforetax": 150000,
                            "priceaftertax": 181500
                        }
                    ],
                    "addons": [{
                            "name": "Breakfast",
                            "nights": "2",
                            "priceperunit": 18000,
                            "pricemode": "4",
                            "price": 72000
                        }
                    ]
                }
            ],
            "affiliation": {
                "pos": "BookHotel.com",
                "source": "BookHotel.com",
                "OTA_Code": "1"
            },
            "channel_booking_id": "4282618470",
            "processed_at": "2024-02-24 08:12:26",
            "id": "4282618470_HT24001234",
            "reservation_notif_id": "170867534138555979266",
            "modified_at": "2024-02-24",
            "status": "cancelled",
            "totalprice": 435000,
            "totaltax": 75495.87,
            "totalroom": 300000,
            "totalroomtax": 63000,
            "totaladdon": 59504.13,
            "totaladdontax": 12495.87
        }
    ]
}
```

#### Response Model — Multiple room reservation

```json
{
    "reservations": [{
            "booked_at": "2024-02-23",
            "commissionamount": "0",
            "currencycode": "IDR",
            "paymenttype": "Channel Collect",
            "hotel_id": "HT24001234",
            "hotel_name": "Grand Ocean",
            "customer": {
                "address": "Street View 345",
                "cc_expiration_date": "0225",
                "cc_name": "John Doe",
                "cc_number": "4111111111111111",
                "cc_type": "VI",
                "city": "Jakarta",
                "state": "",
                "countrycode": "ID",
                "email": "john.doe@mail.com",
                "first_name": "John",
                "last_name": "Doe",
                "remarks": "Approximate time of arrival: between 17:00 and 18:00",
                "telephone": "+62 51212345",
                "zip": "11230"
            },
            "rooms": [{
                    "arrival_date": "2024-03-11",
                    "departure_date": "2024-03-13",
                    "guest_name": "John Doe",
                    "first_name": "John",
                    "last_name": "Doe",
                    "id": "RO24000001",
                    "numberofguests": "2",
                    "numberofchildren": "0",
                    "numberofadults": "2",
                    "roomstaystatus": "new",
                    "roomreservation_id": "1708675354471",
                    "totalbeforetax": 359504.13,
                    "totaltax": 75495.87,
                    "totalprice": 435000,
                    "price": [{
                            "date": "2024-03-11",
                            "rate_id": "TN24000002",
                            "mealplan_id": "15",
                            "mealplan": "Room only",
                            "tax": 31500,
                            "pricebeforetax": 150000,
                            "priceaftertax": 181500
                        }, {
                            "date": "2024-03-12",
                            "rate_id": "TN24000002",
                            "mealplan_id": "15",
                            "mealplan": "Room only",
                            "tax": 31500,
                            "pricebeforetax": 150000,
                            "priceaftertax": 181500
                        }
                    ],
                    "addons": [{
                            "name": "Breakfast",
                            "nights": "2",
                            "priceperunit": 18000,
                            "pricemode": "4",
                            "price": 72000
                        }
                    ]
                },
                {
                    "arrival_date": "2024-03-11",
                    "departure_date": "2024-03-13",
                    "guest_name": "John Doe",
                    "first_name": "John",
                    "last_name": "Doe",
                    "id": "RO24000001",
                    "numberofguests": "2",
                    "numberofchildren": "0",
                    "numberofadults": "2",
                    "roomstaystatus": "new",
                    "roomreservation_id": "1708675354472",
                    "totalbeforetax": 359504.13,
                    "totaltax": 75495.87,
                    "totalprice": 435000,
                    "price": [{
                            "date": "2024-03-11",
                            "rate_id": "TN24000002",
                            "mealplan_id": "15",
                            "mealplan": "Room only",
                            "tax": 31500,
                            "pricebeforetax": 150000,
                            "priceaftertax": 181500
                        }, {
                            "date": "2024-03-12",
                            "rate_id": "TN24000002",
                            "mealplan_id": "15",
                            "mealplan": "Room only",
                            "tax": 31500,
                            "pricebeforetax": 150000,
                            "priceaftertax": 181500
                        }
                    ],
                    "addons": [{
                            "name": "Breakfast",
                            "nights": "2",
                            "priceperunit": 18000,
                            "pricemode": "4",
                            "price": 72000
                        }
                    ]
                }
            ],
            "affiliation": {
                "pos": "BookHotel.com",
                "source": "BookHotel.com",
                "OTA_Code": "1"
            },
            "channel_booking_id": "4282618471",
            "processed_at": "2024-02-23 08:12:37",
            "id": "4282618471_HT24001234",
            "reservation_notif_id": "170867534138555979271",
            "modified_at": "2024-02-23",
            "status": "new",
            "totalprice": 870000,
            "totaltax": 150991.74,
            "totalroom": 600000,
            "totalroomtax": 126000,
            "totaladdon": 119008.26,
            "totaladdontax": 24991.74
        }
    ]
}
```

#### Sample Response - Errors due to invalid parameters

```json
{
    "Status": "Fail",
    "Errors": {
      "Code": "950",
      "ShortText": "Reservation Not Found"
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.pelicansolution.com/pelican-booking-channel-integration/reservation/example-request-response.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
