Skip to main content

Placement Targeting

Managing URL and domain placement targeting

Written by OddBytes

Service endpoint:

https://platform.oddbytes.com/api/v1/{accountID}/placementTargeting

Parameters

Parameter

Required

Description

itemLevel

Yes

Targeting level. Supported values: accounts, campaigns, creatives.

itemId

Required for POST and DELETE when itemLevel is campaigns or creatives

Campaign or creative ID. Optional for GET; when omitted for campaigns or creatives, all rows at that level are returned for the account.

limit

No

GET page size, up to 5000. Defaults to 5000.

page

No

1-based GET page number. Defaults to the first page.

placementMatchType

Required for POST

Placement match type. Supported values: URL, DOMAIN.

placementMatchingPattern

Required for POST

Pattern matching mode. Supported values: EXACT, CONTAIN, START_WITH, END_WITH.

placementMatchingPatterns

Required for POST

Array of URL/domain patterns.

placementTargeting

Required for POST

Targeting behavior. Supported values: INCLUDED, EXCLUDED.

placementAdunitTypes

Required for POST

Placement ad unit type. Supported values: ANY, POPUP, LIGHTBOX, TEXTLINK, PUSH, POSTCHECKOUT, VIDEO.

actionType

Required for POST

Write action. Supported values: APPEND, OVERRIDE.

placementRemove

Required for DELETE

Array of {list_id, rule_id} pairs.

Get Placement Targeting

GET returns up to 5000 placement targeting rows. When itemId is omitted for campaigns or creatives, all campaign-level or creative-level placement targeting rows for the account are returned.

curl -c cf.log -b cf.log \
"https://platform.oddbytes.com/api/v1/1744/placementTargeting?itemLevel=accounts"
curl -c cf.log -b cf.log \ 
"https://platform.oddbytes.com/api/v1/1744/placementTargeting?itemLevel=campaigns&limit=100&page=2"

Append Placement Targeting

curl -X POST \ 
--data '{"itemLevel":"campaigns","itemId":664115,"placementMatchType":"DOMAIN","placementMatchingPattern":"EXACT","placementMatchingPatterns":["example1.com","example2.com"],"placementTargeting":"INCLUDED","placementAdunitTypes":"ANY","actionType":"APPEND"}' \
-c cf.log -b cf.log \
"https://platform.oddbytes.com/api/v1/1744/placementTargeting"

Override Placement Targeting

curl -X POST \
--data '{"itemLevel":"creatives","itemId":991122,"placementMatchType":"URL","placementMatchingPattern":"CONTAIN","placementMatchingPatterns":["example.com/path"],"placementTargeting":"EXCLUDED","placementAdunitTypes":"ANY","actionType":"OVERRIDE"}' \
-c cf.log -b cf.log \
"https://platform.oddbytes.com/api/v1/1744/placementTargeting"

Delete Placement Targeting

curl -X DELETE \ 
--data '{"itemLevel":"campaigns","itemId":664115,"placementRemove":[{"list_id":12345,"rule_id":67890},{"list_id":12346,"rule_id":67891}]}' \
-c cf.log -b cf.log \
"https://platform.oddbytes.com/api/v1/1744/placementTargeting"

Did this answer your question?