targetingKeywords
Target a campaign on the placement by keywords/phrases.
Request format
https://adfox.yandex.com/api/v1
? object=campaign
& action=targetPlace
& actionObject=targetingKeywords
& objectID=<integer>
& placeID=<integer>
& isRedefined=<integer>
& [keywordsLogic=<integer>]
& [keywords=<string>]
& [keywordsNotAllowed=<string>]
|
ID of the object that the action is performed on. |
|
Placement ID. |
|
Redefine targeting. Acceptable values:
|
|
Targeting method. Acceptable values:
Default value: |
|
Specify keywords or phrase for targeting the object. You can't target by both phrases and specific keywords at the same time. Entry format:
An entry can contain Russian and Latin letters, numbers, and any special characters. |
|
A keyword or words that can't be used in the banner request for serving the banner. Entry format:
An entry can contain Russian and Latin letters, numbers, and any special characters. |
* Required
Response format
<response>
<status>
<code>{integer}</code>
</status>
</response>
Response parameters
|
Request processing status. For the key, see Error handling. |
Sample request and response
Request:
https://adfox.yandex.com/api/v1?object=campaign&action=targetPlace&actionObject=targetingKeywords&objectID=474205&placeID=321&isRedefined=1
Response:
<response> <status> <code>0</code> </status> </response>
Other actions with the object
See more actions with the campaign
object:
- Add a campaign.
- Get a list of campaigns.
- Delete a campaign.
- Edit a campaign.
- Get a list of campaign banners.
- Place a campaign on a site, a site section, or a placement.
ID of the object that the action is performed on.
Placement ID.
Redefine targeting.
Acceptable values:
-
0
: Inherit targeting settings from a higher level. Level hierarchy from top to bottom:- Campaign.
- Campaign on the site.
- Campaign in the site section.
- Campaign on the placement.
- Banner.
-
1
: Cancel targeting settings at higher levels and use the settings of the current level.
Targeting method.
Acceptable values:
-
0
: by keywords. -
1
: by phrases.
Default value: 0
.
Specify keywords or phrase for targeting the object.
You can't target by both phrases and specific keywords at the same time.
Entry format:
-
Use a comma to separate phrases.
-
Use a space or comma to separate keywords.
An entry can contain Russian and Latin letters, numbers, and any special characters.
A keyword or words that can't be used in the banner request for serving the banner.
Entry format:
-
Use a comma to separate phrases.
-
Use a space or comma to separate keywords.
An entry can contain Russian and Latin letters, numbers, and any special characters.
Required