Skip to main content
GET
/
reviews
/
stats
Global reviews statistics
curl --request GET \
  --url https://api.partoo.co/v2/reviews/stats \
  --header 'x-APIKey: <api-key>'
import requests

url = "https://api.partoo.co/v2/reviews/stats"

headers = {"x-APIKey": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-APIKey': '<api-key>'}};

fetch('https://api.partoo.co/v2/reviews/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.partoo.co/v2/reviews/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-APIKey: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.partoo.co/v2/reviews/stats"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-APIKey", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.partoo.co/v2/reviews/stats")
.header("x-APIKey", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.partoo.co/v2/reviews/stats")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-APIKey"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "answer_time": 10493.90997409,
  "average": 3.0394,
  "treated": 9,
  "not_treated": 10,
  "answered": 8,
  "satisfied": 10,
  "neutral": 6,
  "dissatisfied": 3,
  "total": 19
}
{
"errors": {
"authentication": "User not authenticated"
}
}
{
"errors": {
"authorization": "Operation not allowed"
}
}
{
"errors": {
"json": "Resource not found"
}
}

Authorizations

x-APIKey
string
header
required

The authentication system on Partoo API is using API Key that should be put in the header of the request (the name of the header is x-APIKey). An api_key is linked to a user. This user's role will give you different access level to the API features.

Query Parameters

business__in
string[]

Filter by business ids

Return the reviews of the businesses given in list.

Business id

keywords
string[]

Filter by keywords

Return all the reviews with not-nullable content, that contain the provided list of keywords.

Note: This is the content of the review and not the content of the reply.

The filter accepts both simple and composed words. To indicate it's a composed keyword, add the + as separator. For example:

  • keywords=bonjour returns all reviews containing the keyword bonjour
  • keywords=good+service returns all reviews containing the combined keyword good service, without splitting the keyword. No reviews containing just good or just service will be returned.
  • keywords=bonjour,good+service: returns all reviews that contain either just bonjour, either just good service or both keywords at the same time.
Example:

"bonjour,good+service"

update_date__gte
string<datetime>

Filter by update_date

Return all the reviews whose update_date >= given_date.

For example : update_date__gte=2019-01-01T00:00:00 will return all reviews from the first January of 2019 until today.

Note : The update dates are stored in UTC.

Example:

"2017-08-01T00:00:00"

update_date__lte
string<datetime>

Filter by update_date

Return all the reviews whose update_date <= given_date.

For example : update_date__lte=2020-01-01T00:00:00 will return all reviews from the date of the first review until the first january of 2020.

Note : The update dates are stored in UTC.

Example:

"2017-08-02T00:00:00"

Response

OK

answer_time
number<float>

Average reviews answer time in seconds. Only measured for reviews with a comment from Google partner. It returns the time between the update date of a review and the creation date of its comments.

Example:

10493.90997409

average
number<float>

Average reviews rating.

Required range: 0 <= x <= 5
Example:

3.0394

treated
number<integer>

Total number of treated reviews.

Example:

9

not_treated
number<integer>

Total number of non treated reviews.

Example:

10

answered
number<integer>

Total number of answered reviews (reviews with a comment).

Example:

8

satisfied
number<integer>

Total number of reviews of type satisfied.

Satisfied reviews are defined by a rating of 4 or more for google_my_business and tripadvisor or recommended for facebook.

Example:

10

neutral
number<integer>

Total number of reviews of type neutral.

Neutral reviews are defined by a rating of 3 for google_my_business and tripadvisor.

Example:

6

dissatisfied
number<integer>

Total number of reviews of type dissatisfied.

Dissatisfied reviews are defined by a rating of 2 or less for google_my_business and tripadvisor or not recommended for facebook.

Example:

3

total
number<integer>

Total number of reviews.

Example:

19