campaign
Get a list of campaigns.
Request format
Note
Pagination available.
https://adfox.yandex.com/api/v1
  ? object=account
  & action=list
  & actionObject=campaign
  & [actionObjectID=<integer>]
  & [superCampaignID=<integer>]
  & [dateAddedFrom=<YYYY-MM-DD>]
  & [dateAddedTo=<YYYY-MM-DD>]
  & [show=<string>]
  & [search=<string>]
  & [criteriaID=<integer>]
  & [showMode=<string>]
        
    | 
 
  | 
 To get data for only one campaign, specify its ID. Default value:   | 
| 
 
  | 
 Filter by super campaign ID.  | 
| 
 
  | 
 Data filtering: show campaigns created after the specified date. Date format:   | 
| 
 
  | 
 Data filtering: show campaigns created before the specified date. Date format:   | 
| 
 
  | 
 This parameter is used to specify the degree of data completeness in the list of campaigns and to display the targeting settings of a certain campaign. Configuring data completeness in the list of campaigns: Acceptable values: 
 Default value:  Configuring the display of targeting settings of a certain campaign: Required parameter:  Forbidden:  Acceptable values: 
  | 
| 
 
  | 
 Filtering by substring in a super campaign name. An entry can contain Russian and Latin letters, numbers, and any special characters.  | 
| 
 
  | 
 Only required for getting data on custom targeting ( User characteristic ID. Acceptable values:   | 
| 
 
  | 
 Only used for getting data on custom targeting ( You can use it to display the list of allowed and/or prohibited values of a specified user characteristic in the ad campaign. Acceptable values: 
 Default value:   | 
* Required
Response format
<response>
<status>
  <code>{integer}</code>
</status>
<result>
<data>
  <row0>
    <ID>{integer}</ID>
    <name>{string}</name>
    <superCampaignID>{integer}</superCampaignID>
    <superCampaignName>{string}</superCampaignName>
    <advertiserID>{integer}</advertiserID>
    <advertiserAccount>{string}</advertiserAccount>
    <assistantID>{integer}</assistantID>
    <assistantAccount>{string}</assistantAccount>
    <additionalAdvertiserIDs>{integer}</additionalAdvertiserIDs>
    <additionalAdvertiserAccounts>{string}</additionalAdvertiserAccounts>
    <additionalAssistantIDs>{integer}</additionalAssistantIDs>
    <additionalAssistantAccounts>{string}</additionalAssistantAccounts>
    <status>{integer}</status>
    <level>{integer}</level>
    <priority>{integer}</priority>
    <targetingProfileID>{integer}</targetingProfileID>
    <isSession>{integer}</isSession>
    <impressionsMethodID>{integer}</impressionsMethodID>
    <impressionsSmoothTypeID>{integer}</impressionsSmoothTypeID>
    <kind_id>{integer}</kind_id>
    <sectorID>{integer}</sectorID>
    <rotationMethodID>{integer}</rotationMethodID>
    <trafficPercents>{integer}</trafficPercents>
    <logicType>{integer}</logicType>
    <cpm>{integer}</cpm>
    <cpc>{integer}</cpc>
    <clicksSmoothTypeID>{integer}</clicksSmoothTypeID>
    <isTrafficSmooth>{integer}</isTrafficSmooth>
    <maxImpressions>{integer}</maxImpressions>
    <maxClicks>{integer}</maxClicks>
    <impressionsAll>{integer}</impressionsAll>
    <clicksAll>{integer}</clicksAll>
    <impressionsToday>{integer}</impressionsToday>
    <clicksToday>{integer}</clicksToday>
    <maxImpressionsPerDay>{integer}</maxImpressionsPerDay>
    <maxClicksPerDay>{integer}</maxClicksPerDay>
    <maxImpressionsPerHour>{integer}</maxImpressionsPerHour>
    <maxClicksPerHour>{integer}</maxClicksPerHour>
    <impressionsPerHour>{integer}</impressionsPerHour>
    <clicksPerHour>{integer}</clicksPerHour>
    <dateStart>{date}</dateStart>
    <dateEnd>{date}</dateEnd>
    <dateFinished>{date}</dateFinished>
    <dateAdded>{date}</dateAdded>
    <common_profile_id>{integer}</common_profile_id>
    <costType>{integer}</costType>
    <sendToErir>{integer}</sendToErir>
      <contractID>{integer}</contractID>
      <publisherContractID>{integer}</publisherContractID>
      <markingAdvertiserInfo>{string}</markingAdvertiserInfo>
  </row0>  
</data>
</result>
</response>
        
    Response parameters
| 
 
  | 
 Request processing status. If the value is   | 
| 
 
  | 
 Number of items in the response tree.  | 
| 
 
  | 
 Item number in the response tree, where N is a number from 0 to rows-1 (where   | 
| 
 
  | 
 Unique ID of the campaign.  | 
| 
 
  | 
 Campaign name.  | 
| 
 
  | 
 ID of the super campaign that the campaign belongs to.  | 
| 
 
  | 
 Name of the super campaign that the campaign belongs to.  | 
| 
 
  | 
 Advertiser ID.  | 
| 
 
  | 
 Advertiser's account.  | 
| 
 
  | 
 ID of the assistant that the campaign is assigned to.  | 
| 
 
  | 
 Account of the assistant that the campaign is assigned to.  | 
| 
 
  | 
 IDs of additional advertisers.  | 
| 
 
  | 
 Accounts of additional advertisers.  | 
| 
 
  | 
 IDs of additional assistants.  | 
| 
 
  | 
 Accounts of additional assistants.  | 
| 
 
  | 
 Campaign level.  | 
| 
 
  | 
 Campaign priority.  | 
| 
 
  | 
 Status. Acceptable values: 
  | 
| 
 
  | 
 Deprecated parameter. Campaign type. Acceptable values: 
  | 
| 
 
  | 
 Deprecated parameter. Action tracking. Acceptable values: 
  | 
| 
 
  | 
 Targeting profile ID.  | 
| 
 
  | 
 Acceptable values: 
  | 
| 
 
  | 
 Deprecated parameter. Banner impression sequence. Acceptable values: 
  | 
| 
 
  | 
 Deprecated parameter. The scenario period determines the frequency of repeated banner impressions in this ad campaign for a unique user. Required if banners are selected sequentially ( Acceptable values: 
  | 
| 
 
  | 
 Impression count method. Acceptable values: 
  | 
| 
 
  | 
 Impression running speed. Acceptable values: 
  | 
| 
 
  | 
 Defines a campaign type. Acceptable values: 
  | 
| 
 
  | 
 See also:  | 
| 
 
  | 
 Acceptable values: 
  | 
| 
 
  | 
 Traffic percentage.  | 
| 
 
  | 
 Campaign type. Acceptable values: 
  | 
| 
 
  | 
 CPM floor value for a campaign of the Dynamic monetization type.  | 
| 
 
  | 
 CPC floor value for an ad campaign of the Dynamic monetization type.  | 
| 
 
  | 
 Click delivery speed. Acceptable values: 
  | 
| 
 
  | 
 Maximum number of impressions.  | 
| 
 
  | 
 Tag information. Total number of impressions.  | 
| 
 
  | 
 Maximum number of impressions per day.  | 
| 
 
  | 
 Tag information. Number of impressions on the current day.  | 
| 
 
  | 
 Maximum number of impressions per hour.  | 
| 
 
  | 
 Tag information. Number of impressions in the current hour.  | 
| 
 
  | 
 Maximum total number of clicks.  | 
| 
 
  | 
 Tag information. Total number of clicks.  | 
| 
 
  | 
 Maximum number of clicks per day.  | 
| 
 
  | 
 Tag information. Number of clicks on the current day.  | 
| 
 
  | 
 Maximum number of clicks per hour.  | 
| 
 
  | 
 Tag information. Number of clicks in the current hour.  | 
| 
 
  | 
 Delivery start date.  | 
| 
 
  | 
 Delivery end date.  | 
| 
 
  | 
 Delivery completion date.  | 
| 
 
  | 
 Add date.  | 
| 
 
  | 
 General profile ID for   | 
| 
 
  | 
 Campaign type. Possible values: 
  | 
| 
 
  | 
 Submit data to the Russian state register. Possible values: 
  | 
| 
 
  | 
 ID of a direct or primary contract. This parameter is required if   | 
| 
 
  | 
 ID of the contract with the end advertiser.  | 
| 
 
  | 
 Deprecated parameter. OKVED code of the advertised product.  | 
| 
 
  | 
 Information about the advertiser in the banner menu.  | 
Sample request and response
Request:
https://adfox.yandex.com/api/v1?object=account&action=list&actionObject=campaignResponse:
<response> <status> <code>0</code> </status> <result> <data> <row0> <ID>474205</ID> <name>example</name> <superCampaignID/> <superCampaignName/> <advertiserID>226201</advertiserID> <advertiserAccount>ivanov</advertiserAccount> <assistantID>239097</assistantID> <assistantAccount>petrov</assistantAccount> <additionalAdvertiserIDs/> <additionalAdvertiserAccounts/> <additionalAssistantIDs/> <additionalAssistantAccounts/> <status>0</status> <level>1</level> <priority>100</priority> <targetingProfileID>0</targetingProfileID> <isSession>0</isSession> <impressionsMethodID>0</impressionsMethodID> <impressionsSmoothTypeID>0</impressionsSmoothTypeID> <kind_id>0</kind_id> <sectorID>0</sectorID> <rotationMethodID>0</rotationMethodID> <trafficPercents>0</trafficPercents> <logicType>0</logicType> <cpm>0</cpm> <cpc>0</cpc> <clicksSmoothTypeID>0</clicksSmoothTypeID> <isTrafficSmooth>0</isTrafficSmooth> <maxImpressions>0</maxImpressions> <maxClicks>0</maxClicks> <impressionsAll>0</impressionsAll> <clicksAll>0</clicksAll> <impressionsToday>0</impressionsToday> <clicksToday>0</clicksToday> <maxImpressionsPerDay>0</maxImpressionsPerDay> <maxClicksPerDay>0</maxClicksPerDay> <maxImpressionsPerHour>0</maxImpressionsPerHour> <maxClicksPerHour>0</maxClicksPerHour> <impressionsPerHour>0</impressionsPerHour> <clicksPerHour>0</clicksPerHour> <dateStart>2021-05-18 13:00:00</dateStart> <dateEnd/> <dateFinished>0000-00-00 00:00:00</dateFinished> <dateAdded>2021-05-18</dateAdded> <common_profile_id>525</common_profile_id> <costType>1</costType> <sendToErir>1</sendToErir> <contractID>139</contractID> <publisherContractID>50</publisherContractID> <markingAdvertiserInfo>OOO Romashka OGRN 1231231</markingAdvertiserInfo> </row0> </data> </result> </response>
Other actions with the object
See more actions with the campaign object:
- Add a campaign.
 - Delete a campaign.
 - Edit a campaign.
 - Get a list of campaign banners.
 - Place a campaign on a site, a site section, or a placement.
 - Add a contractor.
 - Add a contract.
 
Only used for getting data on custom targeting (show=targetingUser).
You can use it to display the list of allowed and/or prohibited values of a specified user characteristic in the ad campaign.
Acceptable values:
- 
denied: Only show prohibited values. - 
allowed: Only show allowed values. - 
all: Show all values with a breakdown into allowed and prohibited ones. 
Default value: denied.
Required
To get data for only one campaign, specify its ID.
Default value: 0 (display the list of all campaigns).
Filter by super campaign ID.
Data filtering: show campaigns created after the specified date.
Date format: YYYY-MM-DD.
Data filtering: show campaigns created before the specified date.
Date format: YYYY-MM-DD.
This parameter is used to specify the degree of data completeness in the list of campaigns and to display the targeting settings of a certain campaign.
Configuring data completeness in the list of campaigns:
Acceptable values:
- 
advanced(full display format). - 
common(brief display format):ID.name.
 - 
short(limited display format):ID.name.superCampaignID.status.dateStart.dateEnd.dateFinished.
 
Default value: advanced.
Configuring the display of targeting settings of a certain campaign:
Required parameter: actionObjectID.
Forbidden: dateAddedFrom, dateAddedTo, and search.
Acceptable values:
- 
targetingTime: Targeting by time. - 
targetingFrequency: Targeting by frequency. - 
targetingBehavior: Targeting by behavior. - 
targetingGeobase: Targeting by geography. - 
targetingSearch: Targeting by search queries. - 
targetingGender: Targeting by gender. - 
targetingAge: Targeting by age. - 
targetingRevenue: Targeting by income. - 
targetingUser: Additional targeting. Additional parameters:criteriaIDandshowMode. 
Filtering by substring in a super campaign name.
An entry can contain Russian and Latin letters, numbers, and any special characters.
Only required for getting data on custom targeting (show=targetingUser).
User characteristic ID.
Acceptable values: from 1 to 63.