Olery Developer Portal logo Olery Developer Portal

Method Path
GET https://agora.olery.com/v3/companies/:id/stats

Returns two key metrics, the review count and average overall rating (as time series and/or grouped by traveler segment)

You are limited to 1 request per second. Please use this endpoint responsibly. Requests with long time periods and multiple groupings are resource-intensive.

Output Format

The meta field contains general information about the property.

The aggregated data is returned as an Array of JSON objects in the data field. Each object has the following fields:

Field Data Types Description
review_count Integer Total number of reviews
overall_rating_average Float Average of the main rating of each review
date Date Start date of each time period, if per parameter is used
segment String Segment, if segment parameter is used

In case of grouping by per or segment the data is found in the stats object for each group.

Parameters

Parameter Parameter Type Data Types Required Description
id path Integer true ID of the company
start_date query Date true Start date in ISO 8601 format
end_date query Date true End date in ISO 8601 format
per query String false Date grouping (day, month, quarter, year)
segment query String false Segment grouping (origin-country, composition, language, source)

Example Call

https://agora.olery.com/v3/companies/38/stats?start_date=2018-01-01&end_date=2018-12-31&per=month&segment=language&auth_token=XXX

Example Output

{  
   "meta":{  
      "company":{  
         "id":38,
         "name":"Hotel ABC"
      }
   },
   "data":{  
      "review_count":468,
      "overall_rating_average":85.1004273504274
   }
}

Response Statuses

Status Code Reason
200 OK
404 Company not found
403 No access, no authentication token
400 Missing or incorrect dates