Get Strategy
curl --request GET \
--url https://api.heralded.ai/v1/brands/{brand_id}/strategy \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.heralded.ai/v1/brands/{brand_id}/strategy"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.heralded.ai/v1/brands/{brand_id}/strategy', 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.heralded.ai/v1/brands/{brand_id}/strategy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.heralded.ai/v1/brands/{brand_id}/strategy"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.heralded.ai/v1/brands/{brand_id}/strategy")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heralded.ai/v1/brands/{brand_id}/strategy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"focus": {
"competitors": [
{
"audience_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "<string>",
"kind": "topic",
"market": "<string>",
"name": "<string>",
"tracked": true
}
],
"limit": 3,
"markets": [
{
"audience_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "<string>",
"kind": "topic",
"market": "<string>",
"name": "<string>",
"tracked": true
}
],
"topics": [
{
"audience_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "<string>",
"kind": "topic",
"market": "<string>",
"name": "<string>",
"tracked": true
}
]
},
"goal": {
"ended_at": "2023-11-07T05:31:56Z",
"goal": "<string>",
"measure": {
"baseline": {
"mentioned": 123,
"recommended": 123,
"understood": 123
},
"baseline_at": "2023-11-07T05:31:56Z",
"measured_at": "2023-11-07T05:31:56Z",
"mentioned": {
"answers": 123,
"basis": "ai",
"change": {
"baseline": {
"first_answer_at": "2023-11-07T05:31:56Z",
"last_answer_at": "2023-11-07T05:31:56Z",
"reports": 123
},
"cells_unpaired": 123,
"compared_engines": [
"<string>"
],
"delta": 123,
"direction": "up",
"high": 123,
"low": 123,
"real": true,
"state": "calibrating"
},
"denominator": 123,
"high": 123,
"low": 123,
"numerator": 123,
"state": "<string>",
"trend": [
{
"answers": 123,
"at": "2023-11-07T05:31:56Z",
"break": {
"at": "2023-12-25",
"comparable": true,
"engines_added": [
"<string>"
],
"engines_removed": [
"<string>"
],
"parts": [
"<string>"
]
},
"breaks": [
{
"added": [],
"part": "<string>",
"removed": [],
"value": "<string>"
}
],
"high": 123,
"key": {
"answer_pack_version": 123,
"ecommerce": true,
"engines": [
"<string>"
],
"keyword_set_hash": "<string>",
"markets": {},
"passes": 123,
"score_version": "<string>",
"sells_to": "businesses",
"shopping_pack_version": 123,
"sides": [
"ai"
],
"understood_measure": "statements"
},
"low": 123,
"scan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "<string>",
"value": 123
}
],
"value": 123
},
"progress": "measured",
"recommended": {
"answers": 123,
"basis": "ai",
"change": {
"baseline": {
"first_answer_at": "2023-11-07T05:31:56Z",
"last_answer_at": "2023-11-07T05:31:56Z",
"reports": 123
},
"cells_unpaired": 123,
"compared_engines": [
"<string>"
],
"delta": 123,
"direction": "up",
"high": 123,
"low": 123,
"real": true,
"state": "calibrating"
},
"denominator": 123,
"high": 123,
"low": 123,
"numerator": 123,
"state": "<string>",
"trend": [
{
"answers": 123,
"at": "2023-11-07T05:31:56Z",
"break": {
"at": "2023-12-25",
"comparable": true,
"engines_added": [
"<string>"
],
"engines_removed": [
"<string>"
],
"parts": [
"<string>"
]
},
"breaks": [
{
"added": [],
"part": "<string>",
"removed": [],
"value": "<string>"
}
],
"high": 123,
"key": {
"answer_pack_version": 123,
"ecommerce": true,
"engines": [
"<string>"
],
"keyword_set_hash": "<string>",
"markets": {},
"passes": 123,
"score_version": "<string>",
"sells_to": "businesses",
"shopping_pack_version": 123,
"sides": [
"ai"
],
"understood_measure": "statements"
},
"low": 123,
"scan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "<string>",
"value": 123
}
],
"value": 123
},
"understood": {
"answers": 123,
"basis": "ai",
"change": {
"baseline": {
"first_answer_at": "2023-11-07T05:31:56Z",
"last_answer_at": "2023-11-07T05:31:56Z",
"reports": 123
},
"cells_unpaired": 123,
"compared_engines": [
"<string>"
],
"delta": 123,
"direction": "up",
"high": 123,
"low": 123,
"real": true,
"state": "calibrating"
},
"denominator": 123,
"high": 123,
"low": 123,
"numerator": 123,
"state": "<string>",
"trend": [
{
"answers": 123,
"at": "2023-11-07T05:31:56Z",
"break": {
"at": "2023-12-25",
"comparable": true,
"engines_added": [
"<string>"
],
"engines_removed": [
"<string>"
],
"parts": [
"<string>"
]
},
"breaks": [
{
"added": [],
"part": "<string>",
"removed": [],
"value": "<string>"
}
],
"high": 123,
"key": {
"answer_pack_version": 123,
"ecommerce": true,
"engines": [
"<string>"
],
"keyword_set_hash": "<string>",
"markets": {},
"passes": 123,
"score_version": "<string>",
"sells_to": "businesses",
"shopping_pack_version": 123,
"sides": [
"ai"
],
"understood_measure": "statements"
},
"low": 123,
"scan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "<string>",
"value": 123
}
],
"value": 123
}
},
"prompts": 123,
"reason": "goal_set",
"revision": 123,
"started_at": "2023-11-07T05:31:56Z",
"target": {
"date": "2023-12-25",
"value": 50
}
},
"moving_away_from": [
"<string>"
],
"revisions": [
{
"ended_at": "2023-11-07T05:31:56Z",
"goal": "<string>",
"prompts": 123,
"reason": "goal_set",
"revision": 123,
"started_at": "2023-11-07T05:31:56Z",
"target": {
"date": "2023-12-25",
"value": 50
}
}
]
}{
"code": "invalid_cursor",
"detail": "The cursor is invalid or belongs to a different query.",
"instance": "example-request-id",
"status": 400,
"title": "Bad Request",
"type": "https://docs.heralded.ai/errors-and-limits#invalid_cursor"
}{
"code": "invalid_token",
"detail": "The Authorization header carries no API key Heralded knows: it is missing, mistyped, revoked or expired.",
"instance": "example-request-id",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.heralded.ai/errors-and-limits#invalid_token"
}{
"code": "not_found",
"detail": "Nothing here that this API key can read.",
"instance": "example-request-id",
"status": 404,
"title": "Not Found",
"type": "https://docs.heralded.ai/errors-and-limits#not_found"
}{
"code": "workspace_archived",
"detail": "The API key's organization is archived.",
"instance": "example-request-id",
"status": 409,
"title": "Conflict",
"type": "https://docs.heralded.ai/errors-and-limits#workspace_archived"
}{
"code": "invalid_request",
"detail": "The request's parameters are invalid; `errors` names each one.",
"errors": [
{
"loc": [
"query",
"limit"
],
"msg": "Input should be less than or equal to 100",
"type": "less_than_equal"
}
],
"instance": "example-request-id",
"status": 422,
"title": "Unprocessable Content",
"type": "https://docs.heralded.ai/errors-and-limits#invalid_request"
}{
"code": "rate_limited",
"detail": "This caller is past its requests for the minute. Retry after the seconds in Retry-After.",
"instance": "example-request-id",
"rate_limit": {
"limit": 120,
"remaining": 0,
"reset": 60,
"window": 60
},
"status": 429,
"title": "Too Many Requests",
"type": "https://docs.heralded.ai/errors-and-limits#rate_limited"
}Settings and workspaces
Get Strategy
The goal with its revisions, baseline, current figures and target, the focus stars and the labels the brand is moving away from. Recommended, Mentioned and Understood are read on the goal’s own questions; nothing compares across revisions.
GET
/
v1
/
brands
/
{brand_id}
/
strategy
Get Strategy
curl --request GET \
--url https://api.heralded.ai/v1/brands/{brand_id}/strategy \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.heralded.ai/v1/brands/{brand_id}/strategy"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.heralded.ai/v1/brands/{brand_id}/strategy', 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.heralded.ai/v1/brands/{brand_id}/strategy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.heralded.ai/v1/brands/{brand_id}/strategy"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.heralded.ai/v1/brands/{brand_id}/strategy")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heralded.ai/v1/brands/{brand_id}/strategy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"focus": {
"competitors": [
{
"audience_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "<string>",
"kind": "topic",
"market": "<string>",
"name": "<string>",
"tracked": true
}
],
"limit": 3,
"markets": [
{
"audience_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "<string>",
"kind": "topic",
"market": "<string>",
"name": "<string>",
"tracked": true
}
],
"topics": [
{
"audience_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "<string>",
"kind": "topic",
"market": "<string>",
"name": "<string>",
"tracked": true
}
]
},
"goal": {
"ended_at": "2023-11-07T05:31:56Z",
"goal": "<string>",
"measure": {
"baseline": {
"mentioned": 123,
"recommended": 123,
"understood": 123
},
"baseline_at": "2023-11-07T05:31:56Z",
"measured_at": "2023-11-07T05:31:56Z",
"mentioned": {
"answers": 123,
"basis": "ai",
"change": {
"baseline": {
"first_answer_at": "2023-11-07T05:31:56Z",
"last_answer_at": "2023-11-07T05:31:56Z",
"reports": 123
},
"cells_unpaired": 123,
"compared_engines": [
"<string>"
],
"delta": 123,
"direction": "up",
"high": 123,
"low": 123,
"real": true,
"state": "calibrating"
},
"denominator": 123,
"high": 123,
"low": 123,
"numerator": 123,
"state": "<string>",
"trend": [
{
"answers": 123,
"at": "2023-11-07T05:31:56Z",
"break": {
"at": "2023-12-25",
"comparable": true,
"engines_added": [
"<string>"
],
"engines_removed": [
"<string>"
],
"parts": [
"<string>"
]
},
"breaks": [
{
"added": [],
"part": "<string>",
"removed": [],
"value": "<string>"
}
],
"high": 123,
"key": {
"answer_pack_version": 123,
"ecommerce": true,
"engines": [
"<string>"
],
"keyword_set_hash": "<string>",
"markets": {},
"passes": 123,
"score_version": "<string>",
"sells_to": "businesses",
"shopping_pack_version": 123,
"sides": [
"ai"
],
"understood_measure": "statements"
},
"low": 123,
"scan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "<string>",
"value": 123
}
],
"value": 123
},
"progress": "measured",
"recommended": {
"answers": 123,
"basis": "ai",
"change": {
"baseline": {
"first_answer_at": "2023-11-07T05:31:56Z",
"last_answer_at": "2023-11-07T05:31:56Z",
"reports": 123
},
"cells_unpaired": 123,
"compared_engines": [
"<string>"
],
"delta": 123,
"direction": "up",
"high": 123,
"low": 123,
"real": true,
"state": "calibrating"
},
"denominator": 123,
"high": 123,
"low": 123,
"numerator": 123,
"state": "<string>",
"trend": [
{
"answers": 123,
"at": "2023-11-07T05:31:56Z",
"break": {
"at": "2023-12-25",
"comparable": true,
"engines_added": [
"<string>"
],
"engines_removed": [
"<string>"
],
"parts": [
"<string>"
]
},
"breaks": [
{
"added": [],
"part": "<string>",
"removed": [],
"value": "<string>"
}
],
"high": 123,
"key": {
"answer_pack_version": 123,
"ecommerce": true,
"engines": [
"<string>"
],
"keyword_set_hash": "<string>",
"markets": {},
"passes": 123,
"score_version": "<string>",
"sells_to": "businesses",
"shopping_pack_version": 123,
"sides": [
"ai"
],
"understood_measure": "statements"
},
"low": 123,
"scan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "<string>",
"value": 123
}
],
"value": 123
},
"understood": {
"answers": 123,
"basis": "ai",
"change": {
"baseline": {
"first_answer_at": "2023-11-07T05:31:56Z",
"last_answer_at": "2023-11-07T05:31:56Z",
"reports": 123
},
"cells_unpaired": 123,
"compared_engines": [
"<string>"
],
"delta": 123,
"direction": "up",
"high": 123,
"low": 123,
"real": true,
"state": "calibrating"
},
"denominator": 123,
"high": 123,
"low": 123,
"numerator": 123,
"state": "<string>",
"trend": [
{
"answers": 123,
"at": "2023-11-07T05:31:56Z",
"break": {
"at": "2023-12-25",
"comparable": true,
"engines_added": [
"<string>"
],
"engines_removed": [
"<string>"
],
"parts": [
"<string>"
]
},
"breaks": [
{
"added": [],
"part": "<string>",
"removed": [],
"value": "<string>"
}
],
"high": 123,
"key": {
"answer_pack_version": 123,
"ecommerce": true,
"engines": [
"<string>"
],
"keyword_set_hash": "<string>",
"markets": {},
"passes": 123,
"score_version": "<string>",
"sells_to": "businesses",
"shopping_pack_version": 123,
"sides": [
"ai"
],
"understood_measure": "statements"
},
"low": 123,
"scan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "<string>",
"value": 123
}
],
"value": 123
}
},
"prompts": 123,
"reason": "goal_set",
"revision": 123,
"started_at": "2023-11-07T05:31:56Z",
"target": {
"date": "2023-12-25",
"value": 50
}
},
"moving_away_from": [
"<string>"
],
"revisions": [
{
"ended_at": "2023-11-07T05:31:56Z",
"goal": "<string>",
"prompts": 123,
"reason": "goal_set",
"revision": 123,
"started_at": "2023-11-07T05:31:56Z",
"target": {
"date": "2023-12-25",
"value": 50
}
}
]
}{
"code": "invalid_cursor",
"detail": "The cursor is invalid or belongs to a different query.",
"instance": "example-request-id",
"status": 400,
"title": "Bad Request",
"type": "https://docs.heralded.ai/errors-and-limits#invalid_cursor"
}{
"code": "invalid_token",
"detail": "The Authorization header carries no API key Heralded knows: it is missing, mistyped, revoked or expired.",
"instance": "example-request-id",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.heralded.ai/errors-and-limits#invalid_token"
}{
"code": "not_found",
"detail": "Nothing here that this API key can read.",
"instance": "example-request-id",
"status": 404,
"title": "Not Found",
"type": "https://docs.heralded.ai/errors-and-limits#not_found"
}{
"code": "workspace_archived",
"detail": "The API key's organization is archived.",
"instance": "example-request-id",
"status": 409,
"title": "Conflict",
"type": "https://docs.heralded.ai/errors-and-limits#workspace_archived"
}{
"code": "invalid_request",
"detail": "The request's parameters are invalid; `errors` names each one.",
"errors": [
{
"loc": [
"query",
"limit"
],
"msg": "Input should be less than or equal to 100",
"type": "less_than_equal"
}
],
"instance": "example-request-id",
"status": 422,
"title": "Unprocessable Content",
"type": "https://docs.heralded.ai/errors-and-limits#invalid_request"
}{
"code": "rate_limited",
"detail": "This caller is past its requests for the minute. Retry after the seconds in Retry-After.",
"instance": "example-request-id",
"rate_limit": {
"limit": 120,
"remaining": 0,
"reset": 60,
"window": 60
},
"status": 429,
"title": "Too Many Requests",
"type": "https://docs.heralded.ai/errors-and-limits#rate_limited"
}Response
Successful Response