Appearance
Aggregations
This page shows the different endpoints available for fetching aggregation data
Get Aggregations
This endpoint will return aggregated results for all taxonomies and topics, based on the parameters of the request. The same endpoint will be used to get aggregated results for either a company_uuid, site_uuid or sector_id. The request payload should only specify one of the three identifiers (company, site or sector). Results can be filtered to specific review sources, if this is omitted from the request then all sources will be included
URL
POST - https://depot-api.feeditback.com/statistics/aggregation
Request
json
{
"company_uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx", // The uuid of the company - required if site_uuid and sector_id are blank
"site_uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx", // The uuid of the site - required if company_uuid and sector_id are blank
"sector_uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx", // The sector uuid
"date_from": "yyyy-mm-dd", // Date range on which to base stats on - Required
"date_to": "yyyy-mm-dd", // Date range on which to base stats on - Required
"review_source": "google" // Google or Tripadvisor - Optional
}Response
json
{
"company_uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx", // The uuid of the company - if company_uuid was passed in the request
"site_uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx", // The uuid of the site - if site_uuid was passed in the request and company_uuid was not
"sector_uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx", // The sector uuid - if the company_uuid and site_uuid were not present and sector_id was passed
"average_rating": 3.5, // the calculated average rating score for the date range and subject requested (company, site, sector)
"review_count": 5, // total number of reviews these stats are based on for the date range and subject requested (company, site, sector)
"latest_aggregation_timestamp": "yyyy-mm-dd HH:mm:ss", // Datetime of the most recent aggregation calculation.
"taxonomies": [
{
"id": 1, // Taxonomy Id
"name": "xxxxxxxx", // Name of taxonomy
"promoters": 1, // summed calculation of promoters for this taxonomy for the date range and subject requested (company, site or sector)
"passives": 1, // summed calculation of passives for this taxonomy for the date range and subject requested (company, site or sector)
"detractors": 1, // summed calculation of detractors for this taxonomy for the date range and subject requested (company, site or sector)
"score": 1,
"topics": [
{
"id": 1, // Topic Id
"name": "xxxxxxxx", // Name of topic
"promoters": 1, // summed calculation of promoters for this topic for the date range and subject requested (company, site or sector)
"passives": 1, // summed calculation of passives for this topic for the date range and subject requested (company, site or sector)
"detractors": 1, // summed calculation of detractors for this topic for the date range and subject requested (company, site or sector)
"score": 1
}
] // Topics objects belonging to each Taxonomy all are returned
}
] // Taxonomies objects all are returned
}