User businesses
curl --request GET \
--url https://api.partoo.co/v2/user/{user_id}/businesses \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/user/{user_id}/businesses"
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/user/{user_id}/businesses', 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/user/{user_id}/businesses",
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/user/{user_id}/businesses"
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/user/{user_id}/businesses")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/user/{user_id}/businesses")
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{
"page": 1,
"max_page": 10,
"count": 287,
"businesses": [
{
"id": "5409c35a97bbc544d8e26737",
"created": 1409925979.5,
"modified": 1561335111.681374,
"code": "CS-75019",
"status": "open",
"org_id": 42,
"groups": [
1,
2,
3
],
"name": "Corner shop",
"address": "<string>",
"address_full": "12 bis rue du coquelicot",
"address2": "<string>",
"city": "Paris",
"zipcode": "75019",
"region": "Ile-de-France",
"country": "FR",
"default_lang": "fr",
"open_hours": {
"monday": [
"10:00-14:00"
],
"tuesday": [
"10:00-14:00"
],
"wednesday": [
"10:00-14:00"
],
"thursday": [
"10:00-14:00"
],
"friday": [
"10:00-14:00"
],
"saturday": [
"10:00-14:00"
],
"sunday": [
"10:00-14:00"
]
},
"specific_hours": {
"open": [
{
"starts_at": "2020-01-20",
"ends_at": "2020-01-20",
"open_hours": [
"10:00-14:00"
]
}
],
"close": [
{
"starts_at": "2020-01-20",
"ends_at": "2020-01-22"
}
]
},
"description_short": "lorem ipsum",
"description_long": "lorem ipsum dolor sit amet",
"website_url": "https://www.corner-shop.co/",
"facebook_url": "https://www.facebook.com/the-corner-shop",
"twitter_url": "https://www.twitter.com/the-corner-shop",
"google_location_id": "<string>",
"facebook_page_id": "<string>",
"national_identification_number": "<string>",
"logo_url": "<string>",
"contacts": [
{
"name": "Hubert Bonisseur de la Bath",
"email": "hubert@oss117.fr",
"phone_numbers": [
"+33302060628"
],
"fax": "+33302060629"
}
],
"photos": {
"LOGO": "<string>",
"primary": "<string>",
"secondary": [
"<string>"
]
},
"lat": -3.585993,
"long": 47.870341,
"subscriptions": {
"presence_management": {
"active": true
},
"review_management": {
"active": true
},
"review_booster": {
"active": false
},
"messages": {
"active": false
}
},
"features": [
"business_edition",
"diffusion",
"review_management",
"review_invite",
"messages"
],
"completion_rate": 77,
"promos": [
{
"title": "<string>",
"description": "<string>",
"begin": 123,
"end": 123,
"term_of_use": "<string>",
"additional_informations": "<string>",
"images": [
"<string>"
],
"client_offer_url": "<string>",
"promo_url": "<string>"
}
]
}
]
}{
"errors": {
"json": {}
}
}{
"errors": {
"authentication": "User not authenticated"
}
}{
"errors": {
"authorization": "Operation not allowed"
}
}{
"errors": {
"json": "Resource not found"
}
}Users
User businesses
This endpoint lets you retrieve the list of businesses which the selected user has READ access to.
GET
/
user
/
{user_id}
/
businesses
User businesses
curl --request GET \
--url https://api.partoo.co/v2/user/{user_id}/businesses \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/user/{user_id}/businesses"
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/user/{user_id}/businesses', 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/user/{user_id}/businesses",
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/user/{user_id}/businesses"
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/user/{user_id}/businesses")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/user/{user_id}/businesses")
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{
"page": 1,
"max_page": 10,
"count": 287,
"businesses": [
{
"id": "5409c35a97bbc544d8e26737",
"created": 1409925979.5,
"modified": 1561335111.681374,
"code": "CS-75019",
"status": "open",
"org_id": 42,
"groups": [
1,
2,
3
],
"name": "Corner shop",
"address": "<string>",
"address_full": "12 bis rue du coquelicot",
"address2": "<string>",
"city": "Paris",
"zipcode": "75019",
"region": "Ile-de-France",
"country": "FR",
"default_lang": "fr",
"open_hours": {
"monday": [
"10:00-14:00"
],
"tuesday": [
"10:00-14:00"
],
"wednesday": [
"10:00-14:00"
],
"thursday": [
"10:00-14:00"
],
"friday": [
"10:00-14:00"
],
"saturday": [
"10:00-14:00"
],
"sunday": [
"10:00-14:00"
]
},
"specific_hours": {
"open": [
{
"starts_at": "2020-01-20",
"ends_at": "2020-01-20",
"open_hours": [
"10:00-14:00"
]
}
],
"close": [
{
"starts_at": "2020-01-20",
"ends_at": "2020-01-22"
}
]
},
"description_short": "lorem ipsum",
"description_long": "lorem ipsum dolor sit amet",
"website_url": "https://www.corner-shop.co/",
"facebook_url": "https://www.facebook.com/the-corner-shop",
"twitter_url": "https://www.twitter.com/the-corner-shop",
"google_location_id": "<string>",
"facebook_page_id": "<string>",
"national_identification_number": "<string>",
"logo_url": "<string>",
"contacts": [
{
"name": "Hubert Bonisseur de la Bath",
"email": "hubert@oss117.fr",
"phone_numbers": [
"+33302060628"
],
"fax": "+33302060629"
}
],
"photos": {
"LOGO": "<string>",
"primary": "<string>",
"secondary": [
"<string>"
]
},
"lat": -3.585993,
"long": 47.870341,
"subscriptions": {
"presence_management": {
"active": true
},
"review_management": {
"active": true
},
"review_booster": {
"active": false
},
"messages": {
"active": false
}
},
"features": [
"business_edition",
"diffusion",
"review_management",
"review_invite",
"messages"
],
"completion_rate": 77,
"promos": [
{
"title": "<string>",
"description": "<string>",
"begin": 123,
"end": 123,
"term_of_use": "<string>",
"additional_informations": "<string>",
"images": [
"<string>"
],
"client_offer_url": "<string>",
"promo_url": "<string>"
}
]
}
]
}{
"errors": {
"json": {}
}
}{
"errors": {
"authentication": "User not authenticated"
}
}{
"errors": {
"authorization": "Operation not allowed"
}
}{
"errors": {
"json": "Resource not found"
}
}Authorizations
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.
Path Parameters
User id
Query Parameters
Page number.
Starts at 1. Any value lower than 1 will be considered as 1.
For the number of items per page, see the per_page query parameter.
Number of items to return per page. Currently limited to 100.
Required range:
1 <= x <= 100Was this page helpful?
⌘I