Skip to main content
GET
/
business
/
search
/
stats
Get completion rate stats from your businesses
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

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

query
string

Parameter to fuzzy search businesses on city, zipcode and name

business__in
string[]

Filter by business ids. Use a comma-separated list to provide multiple ids.

Example:

"a1c9f37b4deca92f83b61d02,9f4e2a8c0d73b154e621bc97,c73b15e9fa42d60b3a8c21ef"

org_id
integer

Filter by organization ID. Only PROVIDER users can use this filter. If you are not a PROVIDER, this will default to the ID of your organization.

groups
integer[]

Filter by groups, using the access logic with the and/or depending on the groups sections

See the Groups and Sections description

country
string

Filter by country - ISO 3166 alpha2 code (i.e. “FR” for France)

name
string

Filter by name

status
enum<string>
default:open

Defines the current status of the business.

  • Open indicates the business is up and running.
  • Closed means that the business has definitely closed.
  • Opening Soon indicates the business is open with an opening date set in the future.
  • Temporarily closed means 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.

Available options:
open,
closed,
opening_soon,
closed_temporarily
Example:

"open"

zipcode
string

Filter by zipcode

city
string

Filter by city

code
string

Filter by code

modified__gte
number

Filter by modified attribute (modified >= modified_gte)

features__in
enum<string>

Filter businesses that have all the features provided, separated by commas.

Available options:
diffusion,
feedback_management,
messages,
posts,
review_invite,
review_management
Example:

"diffusion,review_management"

features__notin
enum<string>

Filter businesses that do not have all the features provided, separated by commas.

Available options:
diffusion,
feedback_management,
messages,
posts,
review_invite,
review_management
Example:

"diffusion,review_management"

subscribed_to_rm
boolean

Filter by current subscription to review_management.

  • If true, only businesses subscribed to review_management will be included.
  • If false, only businesses not subscribed to review_management will be included.

Equivalent to using features__in=review_management.

subscribed_to_pm
boolean

Filter by current subscription to presence_management.

  • If true, only businesses subscribed to presence_management will be included.
  • If false, only businesses not subscribed to presence_management will be included.

Equivalent to using features__in=diffusion.

subscribed_to_rb
boolean

Filter by current subscription to review_booster.

  • If true, only businesses subscribed to review_booster will be included.
  • If false, only businesses not subscribed to review_booster will be included.

Equivalent to using features__in=review_invite.

subscribed_to_bm
boolean

Filter by current subscription to messages.

  • If true, only businesses subscribed to messages will be included.
  • If false, only businesses not subscribed to messages will be included.

Equivalent to using features__in=messages.

completion_rate__gte
integer

Filter by completion_rate attribute (completion_rate >= completion_rate__gte)

Required range: 0 <= x <= 100
completion_rate__lte
integer

Filter by completion_rate attribute (completion_rate <= completion_rate__lte)

Required range: 0 <= x <= 100
completion_rate
enum<string>

Filter by completion_rate attribute. You can separate the values by a comma, as done in the example.

Available options:
low,
mid,
high
Example:

"low,mid"

has_promo
boolean
  • If true, include only businesses having promotional offers.
  • If false, include only businesses not having any promotional offer.
connected_to_gmb_location
boolean
  • If true, only businesses currently linked to a Google location will be included.
  • If false, only businesses not linked to any Google location will be included.
connected_to_facebook_location
boolean
  • If true, only businesses currently linked to a Facebook location will be included.
  • If false, only businesses not linked to any Facebook location will be included.

Response

OK

average_completion_rate
integer

The average completion rate of all businesses that fit the filters given in paramers.

Example:

72

counts
object