Update Campaign
Update Campaign
PATCH
https://api.ocamba.com/api/v1/adex/campaigns/{id}
Updates the specific Campaign by setting the values of the parameters passed. Any parameters not provided will be left unchanged
Note
At least one of the updatable fields should be sent via HTTP body in order to change the current state of the campaign.
Path parameters
parametersRequest schema
bodyResponse schemas
•
204
No Content
curl -X PATCH \
"https://api.ocamba.com/api/v1/adex/campaigns/{id}" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"score": 50,
"status": "paused"
}'const url = 'https://api.ocamba.com/api/v1/adex/campaigns/{id}';
const options = {
method: 'PATCH',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"score": 50,
"status": "paused"
}
)
};
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/api/v1/adex/campaigns/{id}");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"score" => 50,
"status" => "paused"
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);Responses
204 No Content
Responses