Update Macro

Update Macro

PATCH https://api.ocamba.com/v2/adex/macros/{id}
Updates an existing Macro object

Path parameters

parameters

Request schema

body

Response schemas

204
No Content
curl -X PATCH \
 "https://api.ocamba.com/v2/adex/macros/{id}" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "update_name",
  "description": "update desc",
  "value": "updateValue",
  "records": [
    {
      "fields": {
        "campaign_id": "5436620746",
        "creative_id": "1000594",
        "ssp_account_id": "24809540"
      },
      "value": "updated_record_value"
    }
  ]
}'
const url = 'https://api.ocamba.com/v2/adex/macros/{id}';
const options = {
  method: 'PATCH',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "name": "update_name",
      "description": "update desc",
      "value": "updateValue",
      "records": [
        {
          "fields": {
            "campaign_id": "5436620746",
            "creative_id": "1000594",
            "ssp_account_id": "24809540"
          },
          "value": "updated_record_value"
        }
      ]
    }
  )
};

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/macros/{id}");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "name" => "update_name",
    "description" => "update desc",
    "value" => "updateValue",
    "records" => [
      [
        "fields" => [
          "campaign_id" => "5436620746",
          "creative_id" => "1000594",
          "ssp_account_id" => "24809540"
        ],
        "value" => "updated_record_value"
      ]
    ]
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

204 No Content

Responses