# Guest reservations

The **`guest-reservations`** endpoint allows partners to retrieve a list of reservations associated with a specific customer. By utilizing the authentication token obtained during the login process, partners can access reservation details securely. This endpoint is essential for providing insights into customers' past or upcoming stays, facilitating effective engagement with the loyalty program.

### Request

<mark style="color:green;">**GET**</mark>

```url
https://interface.experience-hotel.com/api/xp-guest-account/guest-reservations
```

To utilize this endpoint, partners must include the customer's authentication token in the request header:

* **Header**:
  * `x-guest-token`: The token assigned to the authenticated customer.

There are no URL parameters or payloads required in the body of the request.

### Response

Upon successful processing of the request, the API will respond as follows:

<mark style="color:green;">**`200 OK`**</mark>

If the customer has no reservations, the response will contain an empty array:

```json

[]

```

If the customer has reservations, the response will be a JSON array containing the details of each reservation. For example, a reservation might contain fields such as:

```json

[
    {
        "reference": "4284fdHE-qd68s4",
        "reservation_date": "2024-01-01 00:00:00",
        "arrival_date": "2024-01-02",
        "departure_date": "2024-01-04",
        "amount": 282,
        "room_type":"Double",
        "room_name":"123",
        "custom_fields": [
            {
                "name": "payment",
                "value": "pending"
            },
            {
                "name": "source-of-business",
                "value": "src"
            },
	],
        "hotel_name": "hotel test",
    }
]

```


---

# 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://experience-crm.gitbook.io/experience-crm-api/guests/guests-personal-space/guest-reservations.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.
