Update Settings

Update Settings

PATCH https://api.ocamba.com/v2/adex/settings
Updates the Settings. Any parameters not provided will be left unchanged

Request schema

body

Response schemas

204
No Content
curl -X PATCH \
 "https://api.ocamba.com/v2/adex/settings" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "company_id": "6197120",
  "general": {
    "campaign_search_algo": "round-robin",
    "campaign_priority": "local",
    "exchange_num": 1
  },
  "ad_unit_size": {
    "use_only_iab": 1
  },
  "currency": {
    "default": "USD",
    "multiplier": 1.12,
    "currencies": [
      "USD"
    ]
  },
  "domains": [
    {
      "name": "MyGroup",
      "click": "t.ocmant.com",
      "impression": "t.ocmant.com",
      "conversion": "t.ocmant.com",
      "feed": "feed.ocmxr.com",
      "push": "push.ocmxr.com"
    }
  ]
}'
const url = 'https://api.ocamba.com/v2/adex/settings';
const options = {
  method: 'PATCH',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "company_id": "6197120",
      "general": {
        "campaign_search_algo": "round-robin",
        "campaign_priority": "local",
        "exchange_num": 1
      },
      "ad_unit_size": {
        "use_only_iab": 1
      },
      "currency": {
        "default": "USD",
        "multiplier": 1.12,
        "currencies": [
          "USD"
        ]
      },
      "domains": [
        {
          "name": "MyGroup",
          "click": "t.ocmant.com",
          "impression": "t.ocmant.com",
          "conversion": "t.ocmant.com",
          "feed": "feed.ocmxr.com",
          "push": "push.ocmxr.com"
        }
      ]
    }
  )
};

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/settings");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "company_id" => "6197120",
    "general" => [
      "campaign_search_algo" => "round-robin",
      "campaign_priority" => "local",
      "exchange_num" => 1
    ],
    "ad_unit_size" => [
      "use_only_iab" => 1
    ],
    "currency" => [
      "default" => "USD",
      "multiplier" => 1.12,
      "currencies" => [
        "USD"
      ]
    ],
    "domains" => [
      [
        "name" => "MyGroup",
        "click" => "t.ocmant.com",
        "impression" => "t.ocmant.com",
        "conversion" => "t.ocmant.com",
        "feed" => "feed.ocmxr.com",
        "push" => "push.ocmxr.com"
      ]
    ]
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

204 No Content

Responses
Note
USD currency can’t be removed. In order to edit the multiplier you need to involve more currencies.