Browse the help center

Update a placement's content replacement rule

Changes one rule as editing a row of the placement's Content replacement card does.

Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/placements/{placementId}/content-replacement/{ruleId}/update.do

Changes one rule as editing a row of the placement's Content replacement card does. A field not sent keeps its value; an empty 'replacement' makes the rule delete its target from the markup. A new 'target' follows the create rules: not blank, up to 255 characters, not a target another rule of the placement already has. Requires the PLACEMENT_CONTENT_REPLACEMENT permission and update rights on the placement's site. Parameters that were sent but not applied are listed in 'ignoredFields', each with its reason in 'ignoredFieldReasons'.

Path Params

placementId integer required

Placement id

4001

ruleId integer required

Rule id, as the list returns it

51

Form Params

replacement string

What every occurrence of the target becomes; may contain macros such as $$RANDOM$$. Empty or omitted on create removes the target from the markup.

https://cdn.northwind.example/

target string

The exact text to find in every ad markup the placement serves — literal, no wildcards or regex; up to 255 characters, unique within the placement. Required on create.

http://cdn.northwind.example/

Responses

200

Rule updated: {success, placementId, rule:{id, target, replacement}}

400

Field errors under 'errors': target blank, too long or already used; replacement too long

401

Authentication error

403

The role lacks PLACEMENT_CONTENT_REPLACEMENT, or no update rights on the placement's site

404

The placement does not exist or is deleted, or it has no rule with this id

Please disable Adblock
Are you using adblock? Disable it and reload the page to proceed to the destination page.

A registration has already been submitted from this page. Please try again in 10 minutes.