Create Zone placement
Create Zone placement
POST
https://api.ocamba.com/v2/adex/zones/{id}/placements
Creates a new Zone placement objectPath parameters
parametersRequest schema
bodyResponse schemas
›
201
application/json
curl -X POST \
"https://api.ocamba.com/v2/adex/zones/{id}/placements" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"id": "TOP_LEFT",
"name": "My first placement",
"description": "Here goes description.",
"layouts": [
[
"banner"
]
],
"conf": {}
}'const url = 'https://api.ocamba.com/v2/adex/zones/{id}/placements';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"id": "TOP_LEFT",
"name": "My first placement",
"description": "Here goes description.",
"layouts": [
[
"banner"
]
],
"conf": {}
}
)
};
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/zones/{id}/placements");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"id" => "TOP_LEFT",
"name" => "My first placement",
"description" => "Here goes description.",
"layouts" => [
[
"banner"
]
],
"conf" => []
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);Responses
201 Created
Responses
Info
Placements are only available on display zones.