Create Modifier
Create Modifier
POST
https://api.ocamba.com/v2/adex/campaigns/{id}/pricing/modifiers
Creates a new Modifier objectPath parameters
parametersRequest schema
bodycurl -X POST \
"https://api.ocamba.com/v2/adex/campaigns/{id}/pricing/modifiers" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"value": 15,
"countries": [
"RS"
]
}'const url = 'https://api.ocamba.com/v2/adex/campaigns/{id}/pricing/modifiers';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"value": 15,
"countries": [
"RS"
]
}
)
};
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/campaigns/{id}/pricing/modifiers");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"value" => 15,
"countries" => [
"RS"
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);Responses
201 Created
{
"id": "62469ddf-23e0-48fa-a9dd-0f1aa94ebe8f",
"value": 15,
"countries": [
"RS"
]
}
Responses
Tip
If you don’t know the campaign id, list the campaigns pricing to find it.