Create External demand
Create External demand
POST
https://api.ocamba.com/v2/adex/external-demands
Create a new External demand objectRequest schema
bodycurl -X POST \
"https://api.ocamba.com/v2/adex/external-demands" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"partner_id": "1",
"name": "New external demand",
"settings": [
{
"label": "feed_id",
"type": "string",
"required": "1",
"possible_values": null,
"value": "5"
}
],
"bid_regulator": 100,
"status": "active",
"ipv6_support": "1",
"qps": {
"am": 1000,
"sg": 1000,
"ny": 1000
}
}'const url = 'https://api.ocamba.com/v2/adex/external-demands';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"partner_id": "1",
"name": "New external demand",
"settings": [
{
"label": "feed_id",
"type": "string",
"required": "1",
"possible_values": null,
"value": "5"
}
],
"bid_regulator": 100,
"status": "active",
"ipv6_support": "1",
"qps": {
"am": 1000,
"sg": 1000,
"ny": 1000
}
}
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v2/adex/external-demands");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"partner_id" => "1",
"name" => "New external demand",
"settings" => [
[
"label" => "feed_id",
"type" => "string",
"required" => "1",
"possible_values" => null,
"value" => "5"
]
],
"bid_regulator" => 100,
"status" => "active",
"ipv6_support" => "1",
"qps" => [
"am" => 1000,
"sg" => 1000,
"ny" => 1000
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);Responses
201 Created
{
"id": "1779",
"company_id": "6543210",
"partner_id": "1",
"name": "New external demand",
"settings": [
{
"label": "feed_id",
"type": "string",
"required": "1",
"possible_values": null,
"value": "5"
}
],
"bid_regulator": 100,
"status": "active",
"sync_status": "1",
"ipv6_support": "1",
"qps": {
"am": 1000,
"sg": 1000,
"ny": 1000
}
}
Responses