curl --request GET \
--url https://api.partoo.co/v2/business/search/stats \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/business/search/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/business/search/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/business/search/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/business/search/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/business/search/stats")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/business/search/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{
"average_completion_rate": 72,
"counts": {
"low": 2,
"mid": 10,
"high": 22
}
}{
"errors": {
"json": {}
}
}{
"errors": {
"authentication": "User not authenticated"
}
}Get completion rate stats from your businesses
This endpoint works in the same way as the operation/searchBusinesses endpoint, but instead of returning data on all returned businesses, this endpoint returns completion rate statistics aggregated across all businesses.
The statistics returned are the average completion rate for all businesses that fit the given filters, as well as the count of businesses with a low, medium, and high respectively. The thresholds for low, medium, and high can be found below in the response details.
Note that this endpoint works in the exact same way as operation/searchBusinesses (with the exception of parameters that format the output, such as order_by and pagination), but the return value is different.
curl --request GET \
--url https://api.partoo.co/v2/business/search/stats \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/business/search/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/business/search/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/business/search/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/business/search/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/business/search/stats")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/business/search/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{
"average_completion_rate": 72,
"counts": {
"low": 2,
"mid": 10,
"high": 22
}
}{
"errors": {
"json": {}
}
}{
"errors": {
"authentication": "User not authenticated"
}
}Authorizations
Query Parameters
Filter by groups, using the access logic with the and/or depending on the groups sections
Defines the current status of the business.
Openindicates the business is up and running.Closedmeans that the business has definitely closed.Opening Soonindicates the business is open with an opening date set in the future.Temporarily closedmeans that the business is temporarily closed.
⚠️ To get all businesses with the status open, regardless of whether the opening_date has passed yet or not, submit both the open and opening_soon options in the filter: status=open,opening_soon.
open, closed, opening_soon, closed_temporarily "open"
Was this page helpful?