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

url = "https://api.partoo.co/v2/publisher_states"

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

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

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

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
{
  "businesses": {
    "56465qz56d4q65zd4": {
      "business_formatted_address": "1 Rue du Général de Gaulle, 52330 Colombey-les-Deux-Églises",
      "business_id": "56465qz56d4q65zd4",
      "business_name": "La Boisserie",
      "publishers": {
        "apple_direct": {
          "error_type": null,
          "state": "success",
          "url_on_publisher": null
        },
        "facebook": {
          "error_type": "PUBLISHER_CONNEXION",
          "state": "to_configure",
          "url_on_publisher": "http://facebook/boisserie"
        }
      }
    }
  },
  "count": 1
}
{
  "errors": {
    "authentication": "User not authenticated"
  }
}
{
  "errors": {
    "authorization": "Operation not allowed"
  }
}

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. Use a comma-separated list to provide multiple ids.

Example:

"a1c9f37b4deca92f83b61d02,9f4e2a8c0d73b154e621bc97,c73b15e9fa42d60b3a8c21ef"

publishers
string[]

List of requested publisher names

Example:

"facebook,google_my_business"

states
enum<string>[]

List of the requested states

Available options:
success,
pending,
to_configure
Example:

"success,to_configure,pending"

per_page
integer
default:5

Number of items to return per page. Currently limited to 100.

Required range: 1 <= x <= 100
page
integer

Page requested

Example:

3

Response

OK

businesses
object
count
integer

number of businesses returned in response

Example:

1