# Display reviews on your website

This API allows you to retrieve the reviews collected via the CRM Experience satisfaction surveys for  display on your website.

## Reviews created modified deleted

This method will return a list of review identifiers that have been created or modified over the selected period. This way you can maintain your website up to date, even with a review deleted inside the CRM.&#x20;

These identifiers can then be used with the [Reviews details](#reviews-details) method to retrieve the details of the review.

### Request&#x20;

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

{% code overflow="wrap" %}

```
https://interface.experience-hotel.com/api/xp-reviews/created-modified-deleted?date_start=2021-02-01&date_end=2022-02-08
```

{% endcode %}

| Param       | Format     | Required |
| ----------- | ---------- | -------- |
| date\_start | YYYY-MM-DD | Required |
| date\_end   | YYYY-MM-DD | Required |

### Response

Status Code 200 OK

```json
{
  "created_or_modified": [
    5808733,
    5808736
  ],
  "deleted": []
}
```

## Reviews details

This method will return the details of the reviews.\
It takes as parameter reviews identifiers retrieved with the created-modified-deleted method, **with a maximum of 25 identifiers per call.**

### Request&#x20;

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

{% code overflow="wrap" %}

```
https://interface.experience-hotel.com/api/xp-reviews/details?list=5808733,5808736
```

{% endcode %}

### Response

Status Code 200 OK

```json
{
  "reviews_details": [
    {
      "id": 5808733,
      "partner_property_id": null,
      "experience_property_id": 1234,
      "property_name": "Hotel Test",
      "publishable": 1,
      "reviewed_at": "2022-01-13",
      "arrival_date": "2022-02-10",
      "departure_date": "2022-02-20",
      "segment": "",
      "purpose": "",
      "rating_min": 0,
      "rating_max": 10,
      "customer": {
        "email": "poststay3@progress9.com",
        "firstname": "BERNARD",
        "lastname": "HOOVER",
        "country": "GB",
        "language": "en"
      },
      "booking_properties": [],
      "customer_properties": [],
      "review_free_text": "",
      "ratings": [
        {
          "internal_id": 11125,
          "code": "general",
          "rating": 10,
          "text_pro": "",
          "text_con": ""
        },
        {
          "internal_id": 11123,
          "code": "staff",
          "rating": 10,
          "text_pro": "Great Team !!!",
          "text_con": ""
        },
        {
          "internal_id": 11120,
          "code": "amenities",
          "rating": 10,
          "text_pro": "",
          "text_con": ""
        },
        {
          "internal_id": 12204,
          "code": "room_comfort",
          "rating": 10,
          "text_pro": "",
          "text_con": ""
        },
        {
          "internal_id": 11119,
          "code": "cleanliness",
          "rating": 10,
          "text_pro": "",
          "text_con": ""
        },
        {
          "internal_id": 11122,
          "code": "hotel_comfort",
          "rating": 10,
          "text_pro": "",
          "text_con": ""
        },
        {
          "internal_id": 11121,
          "code": "location",
          "rating": 10,
          "text_pro": "",
          "text_con": ""
        },
        {
          "internal_id": 11124,
          "code": "valueformoney",
          "rating": 10,
          "text_pro": "",
          "text_con": ""
        },
        {
          "internal_id": 13757,
          "code": "wifi",
          "rating": 10,
          "text_pro": "",
          "text_con": ""
        },
        {
          "internal_id": 12934,
          "code": "breakfast",
          "rating": 10,
          "text_pro": "Très bon !",
          "text_con": ""
        }
      ],
      "management_response": null
    }
  ]
}
```

### Fields available

| Fields                   | Type    | Description                                                                                                                                                                                                                       |
| ------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                       | Numeric | Experience CRM internal Id for the Satisfaction Survey                                                                                                                                                                            |
| partner\_property\_id    | Numeric | <p>Property management code at the partner. </p><p>If you need this field with your own property ID, you can send us the list of properties with their ID at your place, and we can send it back to you for each reservation.</p> |
| experience\_property\_id | Numeric | Experience CRM Id for the property                                                                                                                                                                                                |
| property\_name           | String  | Property Name in Experience CRM                                                                                                                                                                                                   |
| publishable              | Numeric | <p>0: The review cannot be shown on a website. <br>1: The review can be shown on a website.</p>                                                                                                                                   |
| reviewed\_at             | Date    |                                                                                                                                                                                                                                   |
| arrival\_date            | Date    | Guest arrival date                                                                                                                                                                                                                |
| departure\_date          | Date    | Guest departure date                                                                                                                                                                                                              |
| segment                  | String  | Segment of the Stay                                                                                                                                                                                                               |
| purpose                  | String  | Purpose of the Stay                                                                                                                                                                                                               |
| rating\_min              | Numeric | Minimum rating setup for the property                                                                                                                                                                                             |
| rating\_max              | Numeric | Maximum rating setup for the property                                                                                                                                                                                             |
| customer                 | Object  | See [Customer object](#customer-object)                                                                                                                                                                                           |
| booking\_properties      | Object  | Additional booking properties. Depending on the property config.                                                                                                                                                                  |
| customer\_properties     | Object  | Additional customer properties. Depending on the property config.                                                                                                                                                                 |
| review\_free\_text       | String  | General review comment                                                                                                                                                                                                            |
| ratings                  | Array   | Array of rating                                                                                                                                                                                                                   |
| management\_response     | String  | Response given by the property                                                                                                                                                                                                    |

### Customer object

| Fields    | Type   | Description         |
| --------- | ------ | ------------------- |
| email     | String | Guest email         |
| firstname | String | Guest firstname     |
| lastname  | String | Guest lastname      |
| country   | String | Guest country code  |
| language  | String | Guest language code |

### Ratings

Each rating object corresponds to a question asked to the guest in the Satisfaction survey.&#x20;

| Fields       | Type    | Description                                 |
| ------------ | ------- | ------------------------------------------- |
| internal\_id | Numeric | CRM Internal id for the question            |
| code         | String  | Analitycs code for the question             |
| rating       | Numeric | Rating given by the guest for this question |
| text\_pro    | String  | Positive comment                            |
| text\_con    | String  | Nagative comment                            |

## Reviews summary

This method can be used to get a summary of the average scores for each question in the CRM Experience satisfaction survey.

The average scores communicated with this method will concern all the answers obtained to the satisfaction survey for the selected period.

### Request

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

{% code overflow="wrap" %}

```url
https://interface.experience-hotel.com/api/xp-reviews/summary?date_start=2021-02-01&date_end=2022-02-08
```

{% endcode %}

| Param       | Format     | Required |
| ----------- | ---------- | -------- |
| date\_start | YYYY-MM-DD | Required |
| date\_end   | YYYY-MM-DD | Required |

### Response

Status Code 200 OK

```json
{
  "summary": [
    {
      "question_code": "general",
      "rating_count": 40,
      "rating_average": 8.3
    },
    {
      "question_code": "staff",
      "rating_count": 34,
      "rating_average": 9.2
    },
    {
      "question_code": "amenities",
      "rating_count": 35,
      "rating_average": 8.2
    },
    {
      "question_code": "room",
      "rating_count": 34,
      "rating_average": 8.2
    },
    {
      "question_code": "cleanliness",
      "rating_count": 35,
      "rating_average": 8.5
    },
    {
      "question_code": "hotel_comfort",
      "rating_count": 35,
      "rating_average": 8.5
    },
    {
      "question_code": "location",
      "rating_count": 35,
      "rating_average": 8.7
    },
    {
      "question_code": "valueformoney",
      "rating_count": 35,
      "rating_average": 8.7
    },
    {
      "question_code": "wifi",
      "rating_count": 31,
      "rating_average": 8.8
    }
  ]
}
```

|                 |         |                                    |
| --------------- | ------- | ---------------------------------- |
| question\_code  | String  | Analytic code for the question     |
| rating\_count   | Numeric | Number of answers for the question |
| rating\_average | Numeric | Average rating                     |


---

# 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/reporting/display-reviews-on-your-website.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.
