banner
Clone a banner.
A new banner is created by cloning. It may inherit different sets of parameters from the original banner:
- Banner parameters only.
- Banner parameters and placement.
- Banner parameters, placement, and targeting.
- Banner parameters, placement, targeting, and limits on impressions and clicks.
The differences between the new banner and the parent banner:
- Start date is set to the cloning date.
- End date is reset.
- Statistics aren't copied.
Request format
https://adfox.yandex.com/api/v1
? object=campaign
& action=clone
& actionObject=banner
& objectID=<integer>
& listIDs=<integer>
& targetCampaignID=<integer>
& cloneTypeID=<integer>
& [name{BANNERID}=<string>]
|
ID of the campaign that you want to clone the banner from. |
|
ID of the banner to clone. Use a comma to separate object IDs in the list. |
|
ID of the campaign to clone the banner to. See also: |
|
Object cloning type. Acceptable values:
|
|
The parameter name If the name isn't passed, the new banner gets the same name as the original one. When you clone multiple banners, pass a separate For example: |
* Required
Response format
<response>
<status>
<code>{integer}</code>
<ID>{integer}</ID>
</status>
</response>
Response parameters
|
Request processing status. For the key, see Error handling. |
|
New banner ID. |
|
When cloning multiple banners, some of which were created with templates that don't support loader codes, only banners with templates with the To check whether the template supports loader codes, use the method for getting template data. The |
Sample request and response
Request:
https://adfox.yandex.com/api/v1?object=campaign&action=clone&actionObject=banner&objectID=562830&listIDs=1642949,1642950&targetCampaignID=562831&cloneTypeID=3&name1642949=clone1&name1642950=clone2
Response:
<response> <status> <code>0</code> <ID>4235079,4235080</ID> </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 campaign that you want to clone the banner from.
ID of the banner to clone.
Use a comma to separate object IDs in the list.
ID of the campaign to clone the banner to.
See also:
Object cloning type.
Acceptable values:
-
0
: Only the banner content is cloned. The other settings are reset and inherited from the campaign. -
1
: The banner content and placement settings are cloned. The other settings are reset and inherited from the campaign. -
2
: The banner content, placement, and targeting settings are cloned. The limits on impressions and clicks are reset and inherited from the campaign. -
3
: The banner content, placement settings, targeting, and limits are cloned.
The parameter name {BANNERID}
is the original banner ID, and the parameter value is the new banner name.
If the name isn't passed, the new banner gets the same name as the original one.
When you clone multiple banners, pass a separate name{BANNERID}
parameter for every new banner.
For example: name1111=clone1&name1112=clone2
.
Required