Get campaign requirements
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>"
}
]
}Feedback Management
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.
GET
/
feedback
/
campaign
/
requirements
Get campaign requirements
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
Query Parameters
Response
Campaign requirements retrieved successfully
Was this page helpful?