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

url = "https://api.partoo.co/v2/reviews/quantitative-evolution"

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/quantitative-evolution', 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/quantitative-evolution",
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/quantitative-evolution"

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/quantitative-evolution")
.header("x-APIKey", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.partoo.co/v2/reviews/quantitative-evolution")

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
[
  {
    "date": "2019-11-29",
    "added": 50,
    "previous_sum": 20,
    "cum_sum": 70
  },
  {
    "date": "2019-12-05",
    "added": 34,
    "previous_sum": 70,
    "cum_sum": 104
  },
  {
    "date": "2019-12-12",
    "added": 4,
    "previous_sum": 104,
    "cum_sum": 108
  }
]
{
"errors": {
"json": {}
}
}
{
"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

bucket
enum<string>
default:week

Defining the time range of a data bucket.

This will determine the precision of the returned data. For example, if you choose day, you will receive the number of reviews for each day.

Available options:
day,
week,
month,
year
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

date
string<datetype>

Start date of the bucket

added
integer

Number of reviews added during the current bucket.

previous_sum
number<float>

Cumulative sum of the number of reviews for the previous bucket.

cum_sum
number<float>

Cumulative sum of the number of reviews.

Example:
[
{
"date": "2019-11-29",
"added": 50,
"previous_sum": 20,
"cum_sum": 70
},
{
"date": "2019-12-05",
"added": 34,
"previous_sum": 70,
"cum_sum": 104
},
{
"date": "2019-12-12",
"added": 4,
"previous_sum": 104,
"cum_sum": 108
}
]