Create a taxonomy element
curl --request POST \
--url https://thetradedesk.narrativeconnectors.com/taxonomies/elements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"buyable": true,
"data_rates": [
{
"cpm_rate": 123,
"percent_of_media_cost_rate": 4.995,
"advertiser_id": "<string>",
"type": "<string>"
}
],
"datasets": [
123
],
"display_name": "<string>",
"description": "<string>",
"parent_element_id": "<string>"
}
'import requests
url = "https://thetradedesk.narrativeconnectors.com/taxonomies/elements"
payload = {
"buyable": True,
"data_rates": [
{
"cpm_rate": 123,
"percent_of_media_cost_rate": 4.995,
"advertiser_id": "<string>",
"type": "<string>"
}
],
"datasets": [123],
"display_name": "<string>",
"description": "<string>",
"parent_element_id": "<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({
buyable: true,
data_rates: [
{
cpm_rate: 123,
percent_of_media_cost_rate: 4.995,
advertiser_id: '<string>',
type: '<string>'
}
],
datasets: [123],
display_name: '<string>',
description: '<string>',
parent_element_id: '<string>'
})
};
fetch('https://thetradedesk.narrativeconnectors.com/taxonomies/elements', 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://thetradedesk.narrativeconnectors.com/taxonomies/elements",
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([
'buyable' => true,
'data_rates' => [
[
'cpm_rate' => 123,
'percent_of_media_cost_rate' => 4.995,
'advertiser_id' => '<string>',
'type' => '<string>'
]
],
'datasets' => [
123
],
'display_name' => '<string>',
'description' => '<string>',
'parent_element_id' => '<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 := "https://thetradedesk.narrativeconnectors.com/taxonomies/elements"
payload := strings.NewReader("{\n \"buyable\": true,\n \"data_rates\": [\n {\n \"cpm_rate\": 123,\n \"percent_of_media_cost_rate\": 4.995,\n \"advertiser_id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"datasets\": [\n 123\n ],\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"parent_element_id\": \"<string>\"\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("https://thetradedesk.narrativeconnectors.com/taxonomies/elements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"buyable\": true,\n \"data_rates\": [\n {\n \"cpm_rate\": 123,\n \"percent_of_media_cost_rate\": 4.995,\n \"advertiser_id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"datasets\": [\n 123\n ],\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"parent_element_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thetradedesk.narrativeconnectors.com/taxonomies/elements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"buyable\": true,\n \"data_rates\": [\n {\n \"cpm_rate\": 123,\n \"percent_of_media_cost_rate\": 4.995,\n \"advertiser_id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"datasets\": [\n 123\n ],\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"parent_element_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"buyable": true,
"children": "<array>",
"connections": [
{
"created_at": "2023-11-07T05:31:56Z",
"dataset_id": 123,
"status": "archived",
"updated_at": "2023-11-07T05:31:56Z",
"type": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"data_rates": [
{
"batch": {
"id": "<string>",
"approval_status": "not_reviewed",
"created_at": "2023-11-07T05:31:56Z",
"estimated_process_at": "2023-11-07T05:31:56Z",
"processed_at": "2023-11-07T05:31:56Z",
"processing_status": "not_started",
"updated_at": "2023-11-07T05:31:56Z"
},
"cpm_rate": 123,
"element_id": "<string>",
"percent_of_media_cost_rate": 123,
"rate_type": "cpm",
"advertiser_id": "<string>",
"type": "<string>"
}
],
"description": "<string>",
"display_name": "<string>",
"element_id": "<string>",
"parent_element_id": "<string>",
"statistics": {
"active_ids_count": 123,
"active_ids_count_expanded": true,
"audience_size": 123,
"received_ids_count": 123,
"updated_at": "2023-11-07T05:31:56Z"
},
"status": "archived",
"updated_at": "2023-11-07T05:31:56Z",
"compliance_status": "Approved"
}{
"error": "<string>",
"error_description": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}taxonomies
Create a taxonomy element
Creates a draft taxonomy element. It is sent to The Trade Desk by the next synchronization request.
POST
/
taxonomies
/
elements
Create a taxonomy element
curl --request POST \
--url https://thetradedesk.narrativeconnectors.com/taxonomies/elements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"buyable": true,
"data_rates": [
{
"cpm_rate": 123,
"percent_of_media_cost_rate": 4.995,
"advertiser_id": "<string>",
"type": "<string>"
}
],
"datasets": [
123
],
"display_name": "<string>",
"description": "<string>",
"parent_element_id": "<string>"
}
'import requests
url = "https://thetradedesk.narrativeconnectors.com/taxonomies/elements"
payload = {
"buyable": True,
"data_rates": [
{
"cpm_rate": 123,
"percent_of_media_cost_rate": 4.995,
"advertiser_id": "<string>",
"type": "<string>"
}
],
"datasets": [123],
"display_name": "<string>",
"description": "<string>",
"parent_element_id": "<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({
buyable: true,
data_rates: [
{
cpm_rate: 123,
percent_of_media_cost_rate: 4.995,
advertiser_id: '<string>',
type: '<string>'
}
],
datasets: [123],
display_name: '<string>',
description: '<string>',
parent_element_id: '<string>'
})
};
fetch('https://thetradedesk.narrativeconnectors.com/taxonomies/elements', 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://thetradedesk.narrativeconnectors.com/taxonomies/elements",
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([
'buyable' => true,
'data_rates' => [
[
'cpm_rate' => 123,
'percent_of_media_cost_rate' => 4.995,
'advertiser_id' => '<string>',
'type' => '<string>'
]
],
'datasets' => [
123
],
'display_name' => '<string>',
'description' => '<string>',
'parent_element_id' => '<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 := "https://thetradedesk.narrativeconnectors.com/taxonomies/elements"
payload := strings.NewReader("{\n \"buyable\": true,\n \"data_rates\": [\n {\n \"cpm_rate\": 123,\n \"percent_of_media_cost_rate\": 4.995,\n \"advertiser_id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"datasets\": [\n 123\n ],\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"parent_element_id\": \"<string>\"\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("https://thetradedesk.narrativeconnectors.com/taxonomies/elements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"buyable\": true,\n \"data_rates\": [\n {\n \"cpm_rate\": 123,\n \"percent_of_media_cost_rate\": 4.995,\n \"advertiser_id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"datasets\": [\n 123\n ],\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"parent_element_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thetradedesk.narrativeconnectors.com/taxonomies/elements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"buyable\": true,\n \"data_rates\": [\n {\n \"cpm_rate\": 123,\n \"percent_of_media_cost_rate\": 4.995,\n \"advertiser_id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"datasets\": [\n 123\n ],\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"parent_element_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"buyable": true,
"children": "<array>",
"connections": [
{
"created_at": "2023-11-07T05:31:56Z",
"dataset_id": 123,
"status": "archived",
"updated_at": "2023-11-07T05:31:56Z",
"type": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"data_rates": [
{
"batch": {
"id": "<string>",
"approval_status": "not_reviewed",
"created_at": "2023-11-07T05:31:56Z",
"estimated_process_at": "2023-11-07T05:31:56Z",
"processed_at": "2023-11-07T05:31:56Z",
"processing_status": "not_started",
"updated_at": "2023-11-07T05:31:56Z"
},
"cpm_rate": 123,
"element_id": "<string>",
"percent_of_media_cost_rate": 123,
"rate_type": "cpm",
"advertiser_id": "<string>",
"type": "<string>"
}
],
"description": "<string>",
"display_name": "<string>",
"element_id": "<string>",
"parent_element_id": "<string>",
"statistics": {
"active_ids_count": 123,
"active_ids_count_expanded": true,
"audience_size": 123,
"received_ids_count": 123,
"updated_at": "2023-11-07T05:31:56Z"
},
"status": "archived",
"updated_at": "2023-11-07T05:31:56Z",
"compliance_status": "Approved"
}{
"error": "<string>",
"error_description": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}Body
application/json
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Narrative dataset id.
At most 256 characters; keep it under 50 for readability. Avoid tabs and the characters ', " and ^.
Omit to create a root element.
Response
Created
A dataset attached to a taxonomy element.
- Option 1
- Option 2
Show child attributes
Show child attributes
A data rate on a taxonomy element. The variant says who the rate applies to.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Null while the element is a draft.
Show child attributes
Show child attributes
Available options:
archived, active, draft, pending The Trade Desk compliance review status. Values use The Trade Desk's casing.
Available options:
Approved, Denied, NotInQueue, Pending Was this page helpful?

