Create Campaign targeting
Create Campaign targeting
POST
https://api.ocamba.com/api/v1/adex/targeting
Creates a new Campaign targeting object
Request schema
bodyPOST https://api.ocamba.com/api/v1/adex/targeting HTTP/1.1
Host: api.ocamba.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
{
"country": {
"item": [
"RS",
"US",
"JP"
],
"list": [
"12",
"131"
],
"op": "include"
},
"category": {
"item": [
"IAB1",
"IAB1-1",
"IAB1-2"
],
"list": [
"1231",
"3213"
],
"op": "include"
},
"connection": {
"item": [
"0",
"1",
"2"
],
"op": "include"
},
"device_tracking": {
"is_turned_on": 0
},
"device_manufacturer": {
"item": [
"5",
"4",
"2"
],
"op": "include"
},
"device_type": {
"item": [
"mobile"
],
"op": "include"
},
"ip": {
"item": [
"123.523.123.4",
"123.523.123.4/12",
"2001:0db8:85a3:33a1:ff12:8a2e:0370:7334/23",
"2301:01b8:f5a3:43a1:afc2:8c2e:0370:7334"
],
"list": [
"193"
],
"op": "include"
},
"referrer": {
"item": [
"4231",
"5341"
],
"list": [
"193"
],
"op": "include"
},
"subid": {
"item": [
"fut_t10_18-24-MULTI_GG"
],
"list": [
"193"
],
"op": "include"
},
"traffic": {
"item": [
"1",
"2",
"3"
],
"op": "include"
},
"browser": {
"id": 12,
"version": [
"78"
],
"op": "exact"
},
"os": {
"id": 12,
"version": [
"1.5"
],
"op": "exact"
},
"publisher": {
"item": [
"123413",
"6242163"
],
"op": "include"
},
"has_user_data": {
"is_turned_on": 0
},
"user_data": {
"item": null,
"op": "include"
},
"subscribed_age": {
"time_unit": "day",
"from": 10,
"to": 15
},
"time": {
"item": [
"0 14 1 * *"
],
"op": "include"
},
"tag": {
"item": [
""
],
"op": "include"
},
"containers": {
"item": [
""
],
"op": "include"
},
"language": {
"item": [
"sr"
],
"op": "include"
}
}
curl -X POST "https://api.ocamba.com/api/v1/adex/targeting" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"country":{"item":["RS","US","JP"],"list":["12","131"],"op":"include"},"category":{"item":["IAB1","IAB1-1","IAB1-2"],"list":["1231","3213"],"op":"include"},"connection":{"item":["0","1","2"],"op":"include"},"device_tracking":{"is_turned_on":0},"device_manufacturer":{"item":["5","4","2"],"op":"include"},"device_type":{"item":["mobile"],"op":"include"},"ip":{"item":["123.523.123.4","123.523.123.4/12","2001:0db8:85a3:33a1:ff12:8a2e:0370:7334/23","2301:01b8:f5a3:43a1:afc2:8c2e:0370:7334"],"list":["193"],"op":"include"},"referrer":{"item":["4231","5341"],"list":["193"],"op":"include"},"subid":{"item":["fut_t10_18-24-MULTI_GG"],"list":["193"],"op":"include"},"traffic":{"item":["1","2","3"],"op":"include"},"browser":{"id":12,"version":["78"],"op":"exact"},"os":{"id":12,"version":["1.5"],"op":"exact"},"publisher":{"item":["123413","6242163"],"op":"include"},"has_user_data":{"is_turned_on":0},"user_data":{"item":null,"op":"include"},"subscribed_age":{"time_unit":"day","from":10,"to":15},"time":{"item":["0 14 1 * *"],"op":"include"},"tag":{"item":[""],"op":"include"},"containers":{"item":[""],"op":"include"},"language":{"item":["sr"],"op":"include"}}'
fetch("https://api.ocamba.com/api/v1/adex/targeting", {
method: "POST",
headers: { Authorization: `Bearer ${TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify(
{
"country": {
"item": [
"RS",
"US",
"JP"
],
"list": [
"12",
"131"
],
"op": "include"
},
"category": {
"item": [
"IAB1",
"IAB1-1",
"IAB1-2"
],
"list": [
"1231",
"3213"
],
"op": "include"
},
"connection": {
"item": [
"0",
"1",
"2"
],
"op": "include"
},
"device_tracking": {
"is_turned_on": 0
},
"device_manufacturer": {
"item": [
"5",
"4",
"2"
],
"op": "include"
},
"device_type": {
"item": [
"mobile"
],
"op": "include"
},
"ip": {
"item": [
"123.523.123.4",
"123.523.123.4/12",
"2001:0db8:85a3:33a1:ff12:8a2e:0370:7334/23",
"2301:01b8:f5a3:43a1:afc2:8c2e:0370:7334"
],
"list": [
"193"
],
"op": "include"
},
"referrer": {
"item": [
"4231",
"5341"
],
"list": [
"193"
],
"op": "include"
},
"subid": {
"item": [
"fut_t10_18-24-MULTI_GG"
],
"list": [
"193"
],
"op": "include"
},
"traffic": {
"item": [
"1",
"2",
"3"
],
"op": "include"
},
"browser": {
"id": 12,
"version": [
"78"
],
"op": "exact"
},
"os": {
"id": 12,
"version": [
"1.5"
],
"op": "exact"
},
"publisher": {
"item": [
"123413",
"6242163"
],
"op": "include"
},
"has_user_data": {
"is_turned_on": 0
},
"user_data": {
"item": null,
"op": "include"
},
"subscribed_age": {
"time_unit": "day",
"from": 10,
"to": 15
},
"time": {
"item": [
"0 14 1 * *"
],
"op": "include"
},
"tag": {
"item": [
""
],
"op": "include"
},
"containers": {
"item": [
""
],
"op": "include"
},
"language": {
"item": [
"sr"
],
"op": "include"
}
}
)
}).then(r => r.json());
$ch = curl_init("https://api.ocamba.com/api/v1/adex/targeting");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer $token",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"country" => [
"item" => [
"RS",
"US",
"JP"
],
"list" => [
"12",
"131"
],
"op" => "include"
],
"category" => [
"item" => [
"IAB1",
"IAB1-1",
"IAB1-2"
],
"list" => [
"1231",
"3213"
],
"op" => "include"
],
"connection" => [
"item" => [
"0",
"1",
"2"
],
"op" => "include"
],
"device_tracking" => [
"is_turned_on" => 0
],
"device_manufacturer" => [
"item" => [
"5",
"4",
"2"
],
"op" => "include"
],
"device_type" => [
"item" => [
"mobile"
],
"op" => "include"
],
"ip" => [
"item" => [
"123.523.123.4",
"123.523.123.4/12",
"2001:0db8:85a3:33a1:ff12:8a2e:0370:7334/23",
"2301:01b8:f5a3:43a1:afc2:8c2e:0370:7334"
],
"list" => [
"193"
],
"op" => "include"
],
"referrer" => [
"item" => [
"4231",
"5341"
],
"list" => [
"193"
],
"op" => "include"
],
"subid" => [
"item" => [
"fut_t10_18-24-MULTI_GG"
],
"list" => [
"193"
],
"op" => "include"
],
"traffic" => [
"item" => [
"1",
"2",
"3"
],
"op" => "include"
],
"browser" => [
"id" => 12,
"version" => [
"78"
],
"op" => "exact"
],
"os" => [
"id" => 12,
"version" => [
"1.5"
],
"op" => "exact"
],
"publisher" => [
"item" => [
"123413",
"6242163"
],
"op" => "include"
],
"has_user_data" => [
"is_turned_on" => 0
],
"user_data" => [
"item" => null,
"op" => "include"
],
"subscribed_age" => [
"time_unit" => "day",
"from" => 10,
"to" => 15
],
"time" => [
"item" => [
"0 14 1 * *"
],
"op" => "include"
],
"tag" => [
"item" => [
""
],
"op" => "include"
],
"containers" => [
"item" => [
""
],
"op" => "include"
],
"language" => [
"item" => [
"sr"
],
"op" => "include"
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
Responses
200 OK
HTTP/1.1 200 OK
Content-Type: application/json
Responses