# 2 way

## Get events list

Return the list of booking event which contain the booking and customer changes from different events of Experience Hotel.\
The two parameters in the URL are the start-date and end-date.

### Request&#x20;

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

{% code overflow="wrap" %}

```url
https://interface.experience-hotel.com/api/xp-store-bookings/events/list/2022-03-29/2022-03-30
```

{% endcode %}

### Response

```json
{
  "success": true,
  "message": {
    "event_ids": [
      2068416,
      2760370,
      2760372,
      2760408,
      2760447,
      2760514,
      2760526,
      2760548,
      2761263,
      2761265,
      2761280,
      2761287,
      2761318,
      2761321
    ],
    "server_timestamp": 1645351667
  }
}
```

## Get all events after a specific ID

Return the list of booking events that occurred after a given ID. This way you can use the last ID retrieved.

### Request&#x20;

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

{% code overflow="wrap" %}

```url
https://interface.experience-hotel.com/api/xp-store-bookings/events/list-after-event-id/123456
```

{% endcode %}

### Response

```json
{
  "success": true,
  "message": {
    "event_ids": [
      2068416,
      2760370,
      2760372,
      2760408,
      2760447,
      2760514,
      2760526,
      2760548,
      2761263,
      2761265,
      2761280,
      2761287,
      2761318,
      2761321
    ],
    "server_timestamp": 1645351667
  }
}// Some code
```

## Get the event details

Return the customers change details.

Event type available :

* welcome\_completed
* prestay\_reported
* midstay\_completed
* poststay\_reported
* customer\_updated

### Request&#x20;

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

{% code overflow="wrap" %}

```url
https://interface.experience-hotel.com/api/xp-store-bookings/events/details?event_ids[]=2068416&event_ids[]=2761321
```

{% endcode %}

**Params**

event\_ids\[]

### Response&#x20;

```json
{
  "success": true,
  "message": {
    "events": [
      {
        "event_id": 2068416,
        "event_type": "poststay_reported",
        "event_date": "2026-04-10T08:00:00+02:00",
        "customer_reference": "",
        "booking_reference": "48",
        "title": "Mr",
        "firstname": "John",
        "lastname": "Van Doe",
        "email": "john.vandoe@email.com",
        "phone": "+33612345678",
        "country": "FR",
        "language": "fr",
        "poststay_response": [
          {
            "group_id": 3605,
            "group_name": "Note générale",
            "question_id": 10974,
            "question_name": "general",
            "rating": 5,
            "rating_min": 1,
            "rating_max": 5,
            "text_pro": null,
            "text_con": null
          },
          {
            "group_id": 3601,
            "group_name": " Chambre et services",
            "question_id": 10963,
            "question_name": "roomquality",
            "rating": 5,
            "rating_min": 1,
            "rating_max": 5,
            "text_pro": "J'ai apprécié le matelas",
            "text_con": "La moquette laisse à désirer"
          },
          {
            "group_id": 3602,
            "group_name": " L'hôtel",
            "question_id": 10965,
            "question_name": "location",
            "rating": 1,
            "rating_min": 1,
            "rating_max": 5,
            "text_pro": "commentaire très positif",
            "text_con": "commentaire très négatif"
          }
        ]
      },
      {
        "event_id": 2761321,
        "event_type": "customer_updated",
        "event_date": "2026-04-12T14:22:00+02:00",
        "customer_reference": "3232",
        "booking_reference": "5540",
        "lastname": "Muller",
        "email": "demo@emailtest.com",
        "mobile_phone": "+33610112233",
        "country": "FR",
        "language": "fr"
      },
      {
        "event_id": 2111827,
        "event_type": "midstay_completed",
        "event_date": "2026-04-14T09:15:00+02:00",
        "customer_reference": "040872",
        "booking_reference": "055007",
        "title": "Mme",
        "firstname": "Sophie",
        "lastname": "Martin",
        "email": "sophie.martin@email.com",
        "country": "FR",
        "language": "fr"
      },
      {
        "event_id": 2111553,
        "event_type": "prestay_reported",
        "event_date": "2026-04-15T10:30:00+02:00",
        "customer_reference": "040652",
        "booking_reference": "054582",
        "title": "Mr",
        "firstname": "John",
        "lastname": "Van Doe",
        "email": "john.vandoe@email.com",
        "phone": "+33612345678",
        "mobile_phone": "+33612345678",
        "country": "FR",
        "language": "fr",
        "birthdate": "1985-03-15",
        "address": "12 rue de la Paix",
        "zipcode": "75002",
        "city": "Paris",
        "nationality": "NL",
        "experience_services": [
            {
                "name": "Bouquet de fleurs",
                "description": "...",
                "quantity": 2,
                "total_price": 50.00,
                "created_at": "2026-04-15T10:00:00"
            }
        ]
      },
      {
        "event_id": 2565899,
        "event_type": "welcome_completed",
        "event_date": "2026-04-16T11:45:00+02:00",
        "customer_reference": "061880",
        "booking_reference": "074545",
        "title": "Mme",
        "firstname": "xxxx",
        "lastname": "xxxx",
        "email": "xxxx",
        "phone": "xxxx",
        "mobile_phone": "xxxx",
        "birthdate": "xxxx-xx-xx",
        "nationality": "FR"
      }
    ],
    "server_timestamp": 1645353634
  }
}
```


---

# 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/reservations/pms-api/2-way.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.
