Service endpoint:
https://platform.oddbytes.com/api/v1/{accountID}/placementTargeting
Parameters
Parameter | Required | Description |
| Yes | Targeting level. Supported values: |
| Required for POST and DELETE when | Campaign or creative ID. Optional for GET; when omitted for |
| No | GET page size, up to |
| No | 1-based GET page number. Defaults to the first page. |
| Required for POST | Placement match type. Supported values: |
| Required for POST | Pattern matching mode. Supported values: |
| Required for POST | Array of URL/domain patterns. |
| Required for POST | Targeting behavior. Supported values: |
| Required for POST | Placement ad unit type. Supported values: |
| Required for POST | Write action. Supported values: |
| Required for DELETE | Array of |
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"
