campaign
Clone a campaign.
A new campaign created by cloning is a copy of the parent campaign that keeps all its settings, restrictions, targeting, and banners.
The differences between the new campaign and its parent campaign:
- Start date is set to the cloning date.
 - End date is reset for the campaign and all its banners.
 - Statistics aren't copied.
 
Request format
https://adfox.yandex.com/api/v1
  ? object=campaign
  & action=clone
  & actionObject=campaign
  & objectID=<integer>
  & name=<string>
  & [superCampaignID=<integer>]
  & [dateEnd=<YYYY-MM-DD HH:mm>]
        
    | 
 
  | 
 ID of the campaign to clone.  | 
| 
 
  | 
 New campaign's name.  | 
| 
 
  | 
 ID of the supercampaign to clone the campaign to. See also:  | 
| 
 
  | 
 Delivery end date. Date and time transmission format:  A mandatory parameter when copying a campaign with the ad running speed set to Spreading traffic evenly throughout the entire period or Spreading traffic evenly by general limit (automatic prolongation).  | 
* Required parameter.
Response format
<response>
<status>
  <code>{integer}</code>
  <ID>{integer}</ID>
</status>
</response>
        
    Response parameters
| 
 
  | 
 Request processing status. For the key, see Error handling.  | 
| 
 
  | 
 New campaign's ID.  | 
Sample request and response
Request:
https://adfox.yandex.com/api/v1?object=campaign&action=clone&actionObject=campaign&name=may_2021&objectID=474205Response:
<response> <status> <code>0</code> <ID>474205</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 to clone.
New campaign's name.
ID of the supercampaign to clone the campaign to.
See also:
Required
End date for delivering ads.
Date and time transmission format: YYYY-MM-DD HH:mm.
A mandatory parameter when copying a campaign with the ad running speed set to Spreading traffic evenly throughout the entire period or Spreading traffic evenly by general limit (automatic prolongation).