Create Bid modifier

Create Bid modifier

POST https://api.ocamba.com/v2/adex/bid-modifiers
Creates a new Bid modifier object

Tip
Fields percent_value and value are mutually exclusive.
Note
We recommend using containers instead of tags, as tags are deprecated. If both parameters are sent, containers will take priority.

Rate limits:

  • Burst: 10/s
  • Steady: 150/m

Request schema

body

Response schemas

curl -X POST \
 "https://api.ocamba.com/v2/adex/bid-modifiers" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "DemoBidModifiers",
  "description": "My first bid modifier",
  "pricing_model": "cpc",
  "ignore_bid_strategy": 1,
  "percent_value": 12.55,
  "value": 87.32,
  "max_value": 11.03,
  "targeting": {
    "countries": {
      "items": [
        "AF"
      ],
      "op": "in"
    }
  }
}'
const url = 'https://api.ocamba.com/v2/adex/bid-modifiers';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "name": "DemoBidModifiers",
      "description": "My first bid modifier",
      "pricing_model": "cpc",
      "ignore_bid_strategy": 1,
      "percent_value": 12.55,
      "value": 87.32,
      "max_value": 11.03,
      "targeting": {
        "countries": {
          "items": [
            "AF"
          ],
          "op": "in"
        }
      }
    }
  )
};

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/bid-modifiers");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "name" => "DemoBidModifiers",
    "description" => "My first bid modifier",
    "pricing_model" => "cpc",
    "ignore_bid_strategy" => 1,
    "percent_value" => 12.55,
    "value" => 87.32,
    "max_value" => 11.03,
    "targeting" => [
      "countries" => [
        "items" => [
          "AF"
        ],
        "op" => "in"
      ]
    ]
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

201 Created

{
  "id": "100123",
  "company_id": "2321414",
  "name": "DemoBidModifiers",
  "description": "My first bid modifier",
  "pricing_model": "cpc",
  "ignore_bid_strategy": 1,
  "percent_value": 12.55,
  "value": 87.32,
  "max_value": 11.03,
  "targeting": {
    "countries": {
      "items": [
        "AF"
      ],
      "op": "in"
    }
  },
  "create_time": "2023-07-04 07:12:47",
  "update_time": "2023-07-28 12:18:06"
}

400 Bad Request

{
  "code": 400,
  "title": "Bad request.",
  "message": "The request is not valid.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}

500 Internal Server Error

{
  "code": 500,
  "title": "Internal server error.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
Responses