ReferenceReviews

reviews query

Retrieves approved property reviews. The query enables partners to retrieve all reviews for a property and then filter reviews by

  • Review ID
  • Creation date
  • Expedia brand (site where the property is listed)
  • Update date
  • Review source
  • Reservation ID
  • Whether an owner or property manager response exists

You can also sort the reviews that are returned (for example, by creation date) and specify how they are sorted (in ascending or descending order).

Syntax

1query {
2 property(
3 id: String!,
4 idSource: IdSource
5 )
6 {
7 reviews(
8 pageSize: Int!
9 filter: ReviewFilter
10 orderBy: ReviewsOrderBy
11 after: String
13 }
14}

Examples

Use the interactive GraphQL explorer in the following sections to run a sample query. A test property ID is passed into the explorer; its test data is returned. The GraphQL explorer will help you get comfortable with the GraphQL:

  • For each query, a test property ID is passed into the explorer; its test data is returned.
  • Click Run Query to execute the query in the explorer on the page. You can modify the query to retrieve the desired fields, and the explorer provides a list of fields when you start typing.
  • Click API Explorer to launch the full explorer in another tab/window, which provides syntax highlighting, schema introspection, real-time error highlighting, and auto-completion, among other things.

Retrieving all reviews for a property

This query retrieves all reviews for a property and paginates the reviews, 10 per page.

Response

Retrieving a review by ID

This query retrieves a property’s reviews and then filters the results by a specific review ID.

Response

Arguments

NameDescription

id

Required.

Expedia ID (EID) or supplier ID (external ID in the partner's system) of the property. When retrieve units, you must specify the Expedia property ID.

Type: String

idSource

Source system of the ID. EXPEDIA is the default value.

Type: IdSource

Types


Name
Type
Boolean
Boolean

The Boolean scalar type represents true or false.

DateInput
InputObject

Date range used to filter reviews.

FieldDescription
fromNot nullable.

Beginning date in this format: YYYY-MM-DD.

Type: LocalDate
toNot nullable.

End date in this format: YYYY-MM-DD.

Type: LocalDate
ID
ID

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

IdNode
Object

Known IDs in the source system.

FieldDescription
id

ID in the source system.

Type: ID
idSourceNot nullable.

Source of the ID.

Type: IdSource
IdSource
Enum

Source of a given ID.

NameDescription
EXPEDIA

Expedia is the source of the ID.

SUPPLIER

Connectivity provider or lodging partner is the source of the ID. This value is not supported for use in promotions.

VRBO

Unsupported.

Int
Int

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

LocalDate
LocalDate

A type representing a date in ISO 8601 format: YYYY-MM-DD (such as 2007-12-03).

Locale
Locale

A type that represents a string that conforms to the BCP-47 (RFC 5646) standard. Example: en-GB.

LocalizedString
Object

Localized text and its locale code.

FieldDescription
localeNot nullable.

Locale code used to localize the text, which conforms to the BCP-47 (RFC 5646) standard, such as fr-FR.

Type: Locale
valueNot nullable.

Localized text.

Type: String
OwnerResponse
Object

Review response submitted by the partner.

FieldDescription
bodyNot nullable.

Localized response text.

Type: LocalizedString
createdDateTimeNot nullable.

Date and time (in UTC, format: YYYY-MM-DDThh:mm:ssTZD) when this response was created.

Type: String
lastUpdatedDateTimeNot nullable.

Date and time (in UTC, format: YYYY-MM-DDThh:mm:ssTZD) when this response was updated.

Type: String
statusNot nullable.

Status of the response. The following values may be returned: APPROVED, BEFORE_SUBMITTED_FOR_MODERATION, QUEUED_FOR_LANG_DETECT, REJECTED, BEFORE_SUBMITTED_TO_ES, SUBMITTED, and REMOVEDBYCLIENT.

Be aware that reviews may be pending for up to 14 days depending on lodging partner actions and review content.

Type: String
Property
Object

Representation of a physical property, including its units, reservations, and promotions.

FieldDescription
reviewsNot nullable.

Reviews provided by travelers for the property that match the specified arguments. You can specify these arguments:

  • filter (type: ReviewFilter), which provides additional arguments to filter the reviews that are returned by the query.
  • pageSize (type: Int!), which is required and specifies the maximum number of reviews on each page (up to 100) returned by the response. For example, if there are 15 reviews on a property, you can retrieve two pages if this argument is set to 10 (page 1 includes 10 reviews, page 2 includes 5 reviews).
  • after (type: String), which is the cursor from the previous query response that marked the end of the previous page of results.
  • orderBy (type: ReviewsOrderBy), which provides the sort order of results; only one field should be specified. If not specified, reviews are sorted by review creation dateTime.
Type: ReviewResponse
Rating
Object

Star rating of the specified category as submitted by the traveler.

FieldDescription
categoryNot nullable.

Category to which the rating applies. For reviews collected on Expedia sites, these are the categories:

  • ecoFriendliness
  • roomComfort
  • roomCleanliness
  • service
  • overall
  • hotelCondition
  • roomAmenitiesScore
  • areaAroundHotel

For reviews collected on Vrbo, these are the categories:

  • overall
  • cleanliness
  • house_rules
  • communication
Type: String
valueNot nullable.

Value of the rating, from 1 (terrible) to 5 (excellent).

Note: Ratings on Expedia points of sale other than Expedia.com are displayed using a 10-point scale, which is calculated by doubling the rating provided through the API. For example, if a traveler submits a 2, 4 is displayed on Hotels.com. Ratings on non-hotel points of sale are displayed using a 5-point scale.

Type: String
Review
Object

Review content, including its source, localized text, and reservation information to which it pertains.

FieldDescription
bodyNot nullable.

Localized review text.

Type: LocalizedString
brandNameV2

Brand (site) where the review was collected.

Type: ReviewBrand
createdDateTimeNot nullable.

Date and time (in UTC, format: YYYY-MM-DDThh:mm:ssTZD) when this review was created.

Type: String
idNot nullable.

Review ID.

Type: ID
isEligibleForResponse

Whether the partner can respond to the review. Reasons why a review is ineligible include:

  • The review was imported and cannot be responded to
  • The window within which a partner can respond has expired
  • A response has been submitted and approved (moderated) and the partner is no longer allowed to submit a response
Type: Boolean
lastUpdatedDateTimeNot nullable.

Date and time (in UTC, format: YYYY-MM-DDThh:mm:ssTZD) when this review was last updated.

Type: String
media

Unsupported at this time. Media URLs and caption uploaded with the review, if any.

Type: ReviewMedia
propertyId

Property IDs.

Type: Array of IdNode
reservationType: ReviewReservation
response

Review response submitted by the partner (using the setReviewResponse mutation).

Type: OwnerResponse
source

Source of the review; values include PLATFORM and IMPORTED.

Type: String
starRatingsNot nullable.

Overall rating for this review, typically on a 1-5 point scale.

Type: Array of Rating
statusNot nullable.

Status of the review.

Type: String
title

Localized review title (headline).

Type: LocalizedString
ReviewBrand
Enum

Brand names (sites) where reviews are collected.

NameDescription
EXPEDIA
HOTELS
TRAVELOCITY
ORBITZ
CHEAP_TICKETS
WOTIF
EBOOKERS
MR_JET
LASTMINUTE
VRBO

Unsupported

HOTWIRE
OTHER

Unsupported

ReviewFilter
InputObject

Additional arguments to filter the reviews that are returned by the query.

FieldDescription
brandNames

Expedia brand for which the review was created. Supported for non-Vrbo properties only.

Type: Array of non nullable ReviewBrand
createdDate

Date range when reviews were created.

Type: DateInput
hasOwnerResponse

Whether an owner or property manager response exists for the review.

Type: Boolean
reservation

Reservation details.

Type: ReviewReservationFilterInput
reviewId

Expedia or Vrbo ID of the review.

Type: String
source

Source of the review ID. To retrieve native reviews, specify PLATFORM. To retrieve imported reviews, specify IMPORTED.

Type: String
updatedDate

Date range when reviews were updated.

Type: DateInput
ReviewGuest
Object

Information about the traveler who left the review. If no name is provided for the review, Anonymous is listed as the review's name.

FieldDescription
firstNameNot nullable.

First name of the traveler.

Type: String
lastNameNot nullable.

Last name (surname) of the traveler.

Type: String
ReviewMedia
Object

Unsupported at this time. Media URLs and caption uploaded with the review, if any.

FieldDescription
caption

Image caption.

Type: LocalizedString
highResolutionUrl

URL of the full image.

Type: String
thumbnailUrl

URL of the image's thumbnail.

Type: String
ReviewReservation
Object

Reservation details associated with the review.

FieldDescription
checkInDate

Reservation check-in date.

Type: LocalDate
checkOutDate

Reservation checkout date.

Type: LocalDate
primaryGuest

Guest information.

Type: ReviewGuest
reservationIdsNot nullable.

IDs of the reservation.

Type: Array of non nullable IdNode
status

Status of the reservation.

Type: String
ReviewReservationFilterInput
InputObject

Reservation details that are used to filter results.

FieldDescription
reservationIds

Review IDs and their sources.

Type: Array of non nullable ReviewReservationIdNodeInput
ReviewReservationIdNodeInput
InputObject

Reservation ID and its source.

FieldDescription
idNot nullable.

Reservation ID.

Type: ID
idSourceNot nullable.

Source of the ID.

Type: IdSource
ReviewResponse
Object

Reviews retrieved by the query.

FieldDescription
cursor

Next page cursor for the next page of results (null if no more pages are available).

Type: String
reviewsNot nullable.

Review content, including each review's source, localized text, and reservation information to which it pertains.

Type: Array of Review
totalCountNot nullable.

Total number of reviews returned that meet the search criteria.

Type: Int
ReviewsOrderBy
InputObject

How reviews are sorted; only one field should be specified. If not specified, reviews are sorted by review creation dateTime.

FieldDescription
createdDateTime

Sort order based on review creation dateTime in ascending or descending order.

Type: SortOrder
lastUpdatedDateTime

Sort order based on review updated dateTime in ascending or descending order.

Type: SortOrder
ownerResponseCreatedDateTime

Sort order based on dateTime of when the owner response was created in ascending or descending order.

Type: SortOrder
ownerResponseLastUpdatedDateTime

Sort order based on dateTime when the owner response was updated in ascending or descending order.

Type: SortOrder
reservationCheckInDate

Sort order based on reservation check-in date in ascending or descending order.

Type: SortOrder
reservationCheckOutDate

Sort order based on reservation checkout date in ascending or descending order.

Type: SortOrder
SortOrder
Enum

How to sort results.

NameDescription
ASC

Sort results in ascending order (oldest to newest).

DESC

Sort results in descending order (newest to oldest).

String
String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.