Search for post
curl --request GET \
--url https://api.partoo.co/v2/posts \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/posts"
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/posts', 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/posts",
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/posts"
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/posts")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/posts")
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,
"posts": [
{
"id": 34,
"business_id": "5409c35a97bbc544d8e26737",
"post_type": "news",
"summary": "Wonderful post summary !",
"schedule_time": "2020-01-01T12:00:00+02:00",
"expiration_time": "2020-01-01T12:00:00+02:00",
"validation_time": "2020-01-01T12:00:00+02:00",
"post_medias": [
{
"media_url": [
"https://example.com/1.png",
"https://example.com/2.png"
]
}
],
"created_at": "2019-08-01T19:15:54.256000+02:00",
"updated_at": "2019-09-01T15:12:35.256000+02:00",
"created_on_partoo": false,
"updated_on_partoo": false,
"business_info": "Rick - HQ - 157 boulevard Macdonald, Paris",
"post_insight": [
{
"name": "facebook__posts",
"click_count": 1512,
"view_count": 2012
}
],
"post_status": [
{
"name": "facebook__posts",
"state": "live",
"link": "www.partoo.co"
}
],
"offer_terms": "These are the conditions",
"offer_code": "PROMO25",
"cta_link": "www.partoo.co",
"cta_type": "book"
}
]
}{
"errors": {
"authentication": "User not authenticated"
}
}{
"errors": {
"authorization": "Operation not allowed"
}
}{
"errors": {
"json": "Resource not found"
}
}Posts
Search for post
This endpoint lets you browse through all your posts.
GET
/
posts
Search for post
curl --request GET \
--url https://api.partoo.co/v2/posts \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/posts"
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/posts', 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/posts",
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/posts"
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/posts")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/posts")
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,
"posts": [
{
"id": 34,
"business_id": "5409c35a97bbc544d8e26737",
"post_type": "news",
"summary": "Wonderful post summary !",
"schedule_time": "2020-01-01T12:00:00+02:00",
"expiration_time": "2020-01-01T12:00:00+02:00",
"validation_time": "2020-01-01T12:00:00+02:00",
"post_medias": [
{
"media_url": [
"https://example.com/1.png",
"https://example.com/2.png"
]
}
],
"created_at": "2019-08-01T19:15:54.256000+02:00",
"updated_at": "2019-09-01T15:12:35.256000+02:00",
"created_on_partoo": false,
"updated_on_partoo": false,
"business_info": "Rick - HQ - 157 boulevard Macdonald, Paris",
"post_insight": [
{
"name": "facebook__posts",
"click_count": 1512,
"view_count": 2012
}
],
"post_status": [
{
"name": "facebook__posts",
"state": "live",
"link": "www.partoo.co"
}
],
"offer_terms": "These are the conditions",
"offer_code": "PROMO25",
"cta_link": "www.partoo.co",
"cta_type": "book"
}
]
}{
"errors": {
"authentication": "User not authenticated"
}
}{
"errors": {
"authorization": "Operation not allowed"
}
}{
"errors": {
"json": "Resource not found"
}
}Authorizations
Query Parameters
Filters Posts based on their start datetime.
The start datetime represents the moment on which a Post of type event/offer will become available. In case of Posts of type news, the start_datetime it will be compare to the creation date of the Post, as the field is not present in this context.
Example:
"2020-11-06T23:59:59"
Filter Posts based on their end datetime.
The end datetime represents the date on which the Post of type event/offer will expire. In case of Posts of type news, the end_datetime it will be compare to exactly one week after the creation date of the Post, as the field is not present in this context.
Example:
"2020-11-06T23:59:59"
Was this page helpful?