# Reviews

Review is the way to share your stay experience with others, and it can be used not only by future travelers but also by competing hotels to see what others are saying about them so that they may improve their services.

People are more likely to book a room in a hotel that has a large number of reviews. They always keen to get an idea of what the experience will be like before actually booking it.

For hoteliers, positive reviews and the customer satisfaction are most important factors because they can encourage the business.

* Su Review API allows delivery of guest reviews to property.
* Reviews only shared for guests with booking.
* API applicable for supported channel(s).

***

## <mark style="color:yellow;">Collection of Reviews from OTA</mark>

The reviews received from OTA are delivered to partner by post method. Reviews are posted to an endpoint provided by partner. Please note reviews can only be delivered to a single dedicated endpoint. Upon receipt, partners will need to filter reviews based on property ID.

{% hint style="info" %}
Only one endpoint is required to support both Reviews API and Messaging API. Meaning, both Reviews and Messages are posted to the same endpoint.
{% endhint %}

### <mark style="color:yellow;">Endpoint</mark>

**END POINT:** Please provide endpoint for reviews delivery.

**Authorization String:** Partner to allocate with Basic Authorization credentials.

***

#### <mark style="color:yellow;">Attributes</mark>

`message` <mark style="color:orange;">**string (Optional)**</mark>

This is message in the review.

***

`guestid` <mark style="color:orange;">**string (Optional)c**</mark>

The unique guest ID as assigned by the provider (OTA) upon creation.

> ID can be both numeric, alphanumeric and may have special character such as hyphen ( - ).

***

`bookingid` <mark style="color:orange;">**string (Optional)**</mark>

Booking ID of the Booking.

> ID can be both numeric, alphanumeric and may have special character such as hyphen ( - ). For Airbnb, if communication started before booking is made, the parameter will be the thread ID.

***

`listingid` <mark style="color:orange;">**string (Optional)**</mark>

Property ID of the hotel (Channel Hotel ID).

***

`bookingflag` <mark style="color:orange;">**string (Optional)**</mark>

The flag of the booking.

> Values can be either B or T (B = Booking, T = Thread). Please note if there is no booking ID, the value will the same for both booking and thread ID.

***

`messageid` <mark style="color:orange;">**string (Optional)**</mark>

This is message id for the particular message.

***

`channel_id` <mark style="color:orange;">**string (Optional)**</mark>

Generated while delivering reviews from OTA.

> Airbnb Channel ID: 244

***

`threadid` <mark style="color:orange;">**string (Optional)**</mark>

The thread id created when communication takes place between guest and client,

> ID can be both numeric, alphanumeric and may have special character such as hyphen ( - ).

***

**User details**

User\_details contains the information about the user such as roles and name of users.

***

#### <mark style="color:blue;">**roles array (Optional)**</mark>

These are the different roles.

***

#### <mark style="color:blue;">**users array (Optional)**</mark>

These are the name of users.

***

#### <mark style="color:blue;">**attachment array (Optional)**</mark>

These are the attachments with the review if any.

***

#### <mark style="color:purple;">Review object</mark>

Review received from OTA.

#### <mark style="color:yellow;">**Attributes**</mark>

***

`action` <mark style="color:orange;">**string (Optional)**</mark>

Action on the review, for example review\_published.

***

`reviewid` <mark style="color:orange;">**string (Optional)**</mark>

Id of the review.

***

`reviewerid` <mark style="color:orange;">**string (Optional)**</mark>

Unique identity of the reviewer.

***

`reviewer_role` <mark style="color:orange;">**string (Optional)**</mark>

Role of the reviewer.

***

`revieweeid` <mark style="color:orange;">**string (Optional)**</mark>

Unique identity of the reviewee.

***

`reviewee_role` <mark style="color:orange;">**string (Optional)**</mark>

Role of the reviewee.

***

`listing_id` <mark style="color:orange;">**string (Optional)**</mark>

Unique identity of the listing.

***

`private_feedback` <mark style="color:orange;">**string (Optional)**</mark>

Private feedback if any.

***

`public_review` <mark style="color:orange;">**string (Optional)**</mark>

Public review if any.

***

`hidden` <mark style="color:orange;">**string (Optional)**</mark>

If the review is hidden or shown.

***

`submitted` <mark style="color:orange;">**string (Optional)**</mark>

If the review is submitted or in other state.

***

`submitted_at` <mark style="color:orange;">**string (Optional)**</mark>

Time and date when the review is submitted.

***

`expires_at` <mark style="color:orange;">**string (Optional)**</mark>

Time and date when the review gets expired.

***

`booking_id` <mark style="color:orange;">**string (Optional)**</mark>

Booking id for which the review is posted.

***

`ratings` <mark style="color:orange;">**string (Optional)**</mark>

Rating given by the reviewer.

***

`hotelcode` <mark style="color:orange;">**string (Optional)**</mark>

It is the Hotel ID or Property ID assigned in Su.

Su Property ID.

### <mark style="color:yellow;">**Sample Request**</mark>

```json
{
	"message": "",
	"guestid": "229895150",
	"bookingid": "HM2ABCQQFK",
	"listingid": "26789052",
	"bookingflag": "RG",
	"messageid": "419122356925038040162840360849",
	"channel_id": "244",
	"threadid": "419122356925038040",
	"user_details": {
		"roles": [],
		"users": []
	},
	"booking_details": {},
	"attachment": [],
	"review": {
		"action": "review_published",
		"reviewid": 419122356988838000,
		"reviewerid": 54970082,
		"reviewer_role": "host",
		"revieweeid": 229665005,
		"reviewee_role": "guest",
		"listing_id": "26789052",
		"private_feedback": "TQVM boleh datang lagi ya ð",
		"public_review": "Great guest!.",
		"hidden": false,
		"submitted": true,
		"submitted_at": "2021-08-07T05:06:49.279Z",
		"expires_at": "2021-08-15T06:41:18.403Z",
		"booking_id": "HM2ABCQQFK",
		"ratings": []
	},
	"hotelcode": "abc123"
}
```

***

### <mark style="color:yellow;">Response</mark>

{% hint style="info" %}
If acknowledgement is not received as required, system will try to repost the review 3 times. After 3 attempts, review will be removed from queue.
{% endhint %}

#### <mark style="color:green;">**Sample Success Response**</mark>

```json
{
 "status": "Success"
}
```

***

## <mark style="color:yellow;">Review Response API</mark>

* API allows respond to guests' reviews to property.
* Reviews only shared for guests with booking can be responded.
* API applicable for supported channel(s).

***

**Response to Reviews Collection from OTA**

Once reviews received from OTA, will be delivered to partner by post method. Reviews made from guest to host can be responded using API.

{% hint style="info" %}
Only reviews received / initiated from guest can be responded.
{% endhint %}

### <mark style="color:yellow;">Endpoint</mark>

<mark style="color:green;background-color:green;">**`POST`**</mark>&#x20;

<div align="left"><figure><img src="https://958347541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9bn2UcBkeqtqixkl5eF%2Fuploads%2FHpyoT0sTR5VA3RkkSOl8%2FSandbox%20image.png?alt=media&#x26;token=45811e1e-b22d-413a-a355-32135a85258e" alt="" width="56"><figcaption></figcaption></figure></div>

{% code overflow="wrap" %}
```url
https://connect-sandbox.su-api.com/SUAPI/jservice/OTA_ReplyReview
```
{% endcode %}

***

#### <mark style="color:yellow;">Attributes</mark>

***

`hotelid` <mark style="color:orange;">**string (Optional)**</mark>

It is the Hotel ID or Property ID assigned in Su.

> Su Property ID.

***

`channelid` <mark style="color:orange;">**string (Optional)**</mark>

Generated while delivering reviews from OTA.

> Airbnb Channel ID: 244

***

`replytext` <mark style="color:orange;">**string (Optional)**</mark>

The response to the review.

***

`listingid` <mark style="color:orange;">**string (Optional)**</mark>

Property ID of the hotel (Channel Hotel ID).

***

`locationid` <mark style="color:orange;">**string (Optional)**</mark>

Account / Host ID of the channel (Airbnb).

***

`reviewid` <mark style="color:orange;">**string (Optional)**</mark>

ID of the review allocated which is being responded.

### <mark style="color:yellow;">**Sample Request**</mark>

{% code overflow="wrap" %}
```json
{
    "hotelid": "new1",
    "channelid": "244",
    "replytext": "Hello, Thank you for your review. We will get back to you with more details.",
    "listingid": "38740008",
    "locationid": "111201086",
    "reviewid": "11001"
}
```
{% endcode %}

***

### <mark style="color:yellow;">Response</mark>

#### <mark style="color:green;">**Sample Success Response**</mark>

```json
{
 "status": "Success"
}
```
