Reject Recommendation
curl --request POST \
--url http://localhost:8000/api/v1/analysis/recommendations/{analysis_type}/{recommendation_id}/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_rejected_reason": "<string>",
"newly_created_positive_keyword": {
"text": "<string>",
"id": 123,
"ad_group": {
"id": 123,
"name": "<string>",
"status": "<string>"
},
"campaign": {
"id": 123,
"name": "<string>",
"status": "<string>"
},
"user_provided_reason": "<string>"
}
}
'import requests
url = "http://localhost:8000/api/v1/analysis/recommendations/{analysis_type}/{recommendation_id}/reject"
payload = {
"user_rejected_reason": "<string>",
"newly_created_positive_keyword": {
"text": "<string>",
"id": 123,
"ad_group": {
"id": 123,
"name": "<string>",
"status": "<string>"
},
"campaign": {
"id": 123,
"name": "<string>",
"status": "<string>"
},
"user_provided_reason": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_rejected_reason: '<string>',
newly_created_positive_keyword: {
text: '<string>',
id: 123,
ad_group: {id: 123, name: '<string>', status: '<string>'},
campaign: {id: 123, name: '<string>', status: '<string>'},
user_provided_reason: '<string>'
}
})
};
fetch('http://localhost:8000/api/v1/analysis/recommendations/{analysis_type}/{recommendation_id}/reject', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/api/v1/analysis/recommendations/{analysis_type}/{recommendation_id}/reject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user_rejected_reason' => '<string>',
'newly_created_positive_keyword' => [
'text' => '<string>',
'id' => 123,
'ad_group' => [
'id' => 123,
'name' => '<string>',
'status' => '<string>'
],
'campaign' => [
'id' => 123,
'name' => '<string>',
'status' => '<string>'
],
'user_provided_reason' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/api/v1/analysis/recommendations/{analysis_type}/{recommendation_id}/reject"
payload := strings.NewReader("{\n \"user_rejected_reason\": \"<string>\",\n \"newly_created_positive_keyword\": {\n \"text\": \"<string>\",\n \"id\": 123,\n \"ad_group\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"status\": \"<string>\"\n },\n \"campaign\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"status\": \"<string>\"\n },\n \"user_provided_reason\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8000/api/v1/analysis/recommendations/{analysis_type}/{recommendation_id}/reject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_rejected_reason\": \"<string>\",\n \"newly_created_positive_keyword\": {\n \"text\": \"<string>\",\n \"id\": 123,\n \"ad_group\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"status\": \"<string>\"\n },\n \"campaign\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"status\": \"<string>\"\n },\n \"user_provided_reason\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/api/v1/analysis/recommendations/{analysis_type}/{recommendation_id}/reject")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_rejected_reason\": \"<string>\",\n \"newly_created_positive_keyword\": {\n \"text\": \"<string>\",\n \"id\": 123,\n \"ad_group\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"status\": \"<string>\"\n },\n \"campaign\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"status\": \"<string>\"\n },\n \"user_provided_reason\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"is_manually_generated": true,
"keyword": "<string>",
"match_type": "<string>",
"reason": "<string>",
"campaign": {
"id": 123,
"name": "<string>",
"status": "<string>"
},
"date_regenerated": "2023-11-07T05:31:56Z",
"date_added": "2023-11-07T05:31:56Z",
"date_updated": "2023-11-07T05:31:56Z",
"id": 123,
"budget_saving": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Analysis
Reject Recommendation
Reject a recommendation.
POST
/
api
/
v1
/
analysis
/
recommendations
/
{analysis_type}
/
{recommendation_id}
/
reject
Reject Recommendation
curl --request POST \
--url http://localhost:8000/api/v1/analysis/recommendations/{analysis_type}/{recommendation_id}/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_rejected_reason": "<string>",
"newly_created_positive_keyword": {
"text": "<string>",
"id": 123,
"ad_group": {
"id": 123,
"name": "<string>",
"status": "<string>"
},
"campaign": {
"id": 123,
"name": "<string>",
"status": "<string>"
},
"user_provided_reason": "<string>"
}
}
'import requests
url = "http://localhost:8000/api/v1/analysis/recommendations/{analysis_type}/{recommendation_id}/reject"
payload = {
"user_rejected_reason": "<string>",
"newly_created_positive_keyword": {
"text": "<string>",
"id": 123,
"ad_group": {
"id": 123,
"name": "<string>",
"status": "<string>"
},
"campaign": {
"id": 123,
"name": "<string>",
"status": "<string>"
},
"user_provided_reason": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_rejected_reason: '<string>',
newly_created_positive_keyword: {
text: '<string>',
id: 123,
ad_group: {id: 123, name: '<string>', status: '<string>'},
campaign: {id: 123, name: '<string>', status: '<string>'},
user_provided_reason: '<string>'
}
})
};
fetch('http://localhost:8000/api/v1/analysis/recommendations/{analysis_type}/{recommendation_id}/reject', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/api/v1/analysis/recommendations/{analysis_type}/{recommendation_id}/reject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user_rejected_reason' => '<string>',
'newly_created_positive_keyword' => [
'text' => '<string>',
'id' => 123,
'ad_group' => [
'id' => 123,
'name' => '<string>',
'status' => '<string>'
],
'campaign' => [
'id' => 123,
'name' => '<string>',
'status' => '<string>'
],
'user_provided_reason' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/api/v1/analysis/recommendations/{analysis_type}/{recommendation_id}/reject"
payload := strings.NewReader("{\n \"user_rejected_reason\": \"<string>\",\n \"newly_created_positive_keyword\": {\n \"text\": \"<string>\",\n \"id\": 123,\n \"ad_group\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"status\": \"<string>\"\n },\n \"campaign\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"status\": \"<string>\"\n },\n \"user_provided_reason\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8000/api/v1/analysis/recommendations/{analysis_type}/{recommendation_id}/reject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_rejected_reason\": \"<string>\",\n \"newly_created_positive_keyword\": {\n \"text\": \"<string>\",\n \"id\": 123,\n \"ad_group\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"status\": \"<string>\"\n },\n \"campaign\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"status\": \"<string>\"\n },\n \"user_provided_reason\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/api/v1/analysis/recommendations/{analysis_type}/{recommendation_id}/reject")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_rejected_reason\": \"<string>\",\n \"newly_created_positive_keyword\": {\n \"text\": \"<string>\",\n \"id\": 123,\n \"ad_group\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"status\": \"<string>\"\n },\n \"campaign\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"status\": \"<string>\"\n },\n \"user_provided_reason\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"is_manually_generated": true,
"keyword": "<string>",
"match_type": "<string>",
"reason": "<string>",
"campaign": {
"id": 123,
"name": "<string>",
"status": "<string>"
},
"date_regenerated": "2023-11-07T05:31:56Z",
"date_added": "2023-11-07T05:31:56Z",
"date_updated": "2023-11-07T05:31:56Z",
"id": 123,
"budget_saving": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The types of analyses.
Available options:
keyword_pause, negative_keyword, double_check_keywords_to_pause, headline, description, budget_migration, pause_hours, pause_locations, search_terms Body
application/json
Response
Successful Response
- RecommendedNegativeKeywordsSchema
- RecommendKeywordPauseSchema
- RecommendedHeadlineSchema
- RecommendedDescriptionSchema
The schema for recommended negative keywords.
The status of a recommendation.
Available options:
pending, applied, auto_applied, rejected Schema for campaign information related to a keyword
Show child attributes
Show child attributes
⌘I