curl --request GET \
--url https://api.partoo.co/v2/feedback/campaign/requirements \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/feedback/campaign/requirements"
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/feedback/campaign/requirements', 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/feedback/campaign/requirements",
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/feedback/campaign/requirements"
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/feedback/campaign/requirements")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/feedback/campaign/requirements")
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{
"feedback_form_id": "5a3f8c2e1b4d7f9a0c6e2b18",
"feedback_email_template_id": 42,
"recipient_fields": [
"email_address",
"unsubscribe_url"
],
"variable_fields": [
"first_name",
"store_code"
]
}{
"errors": {
"authentication": "User not authenticated"
}
}{
"errors": {
"authorization": "Operation not allowed"
}
}{
"detail": "Form not found."
}{
"detail": [
{
"loc": [
"<unknown>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get campaign requirements
The Feedback Management API is currently in BETA, therefore the following endpoints are subject to modification, given a 2 week notice.
If you are planning to use any of them, please notify us so we will be able to keep you informed about upcoming changes.
Returns the recipient fields and template variables needed to prepare a feedback email campaign for the given feedback form and email template.
Use this endpoint before Send a feedback email campaign to determine which keys to include in each recipient payload.
curl --request GET \
--url https://api.partoo.co/v2/feedback/campaign/requirements \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/feedback/campaign/requirements"
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/feedback/campaign/requirements', 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/feedback/campaign/requirements",
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/feedback/campaign/requirements"
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/feedback/campaign/requirements")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/feedback/campaign/requirements")
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{
"feedback_form_id": "5a3f8c2e1b4d7f9a0c6e2b18",
"feedback_email_template_id": 42,
"recipient_fields": [
"email_address",
"unsubscribe_url"
],
"variable_fields": [
"first_name",
"store_code"
]
}{
"errors": {
"authentication": "User not authenticated"
}
}{
"errors": {
"authorization": "Operation not allowed"
}
}{
"detail": "Form not found."
}{
"detail": [
{
"loc": [
"<unknown>"
],
"msg": "<string>",
"type": "<string>"
}
]
}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.
Query Parameters
ID of the feedback form to associate with the campaign
ID of the email template to inspect
Response
Campaign requirements retrieved successfully
ID of the feedback form associated with the campaign
"5a3f8c2e1b4d7f9a0c6e2b18"
ID of the email template used to compute campaign requirements
42
Recipient-level fields supported by the send endpoint.
This list currently includes email_address and unsubscribe_url.
email_address, unsubscribe_url ["email_address", "unsubscribe_url"]
Template variable names recipients should provide under variables,
sorted alphabetically.
["first_name", "store_code"]
Was this page helpful?