UpdateCampaignsTags (Live)

Generates a list of tags for the specified campaign, or lists for multiple campaigns.

This method is used for adding, changing, and deleting tags that are available within a campaign. When adding tags, they are automatically assigned unique IDs that are used for associating them with ads (see UpdateBannersTags).

Input data

The method accepts an array of CampaignTagsInfo objects. Each object contains tags for a single campaign.

{
   "method": "UpdateCampaignsTags",
   "param": [
      {  /* CampaignTagsInfo */
         "CampaignID": (int),
         "Tags": [
            {  /* TagInfo */
               "TagID": (int),
               "Tag": (string)
            }
            ...
         ]
      }
      ...
   ]
}

Parameters are described below.

Parameter Description Required
CampaignTagsInfo object
CampaignID ID of the campaign that the list of tags is being generated for. Yes
Tags

Array of TagInfo objects, each of which defines a single tag. The array can contain no more than 200 objects (tags).

Yes
TagInfo object
TagID

Tag ID. For adding a tag, set 0. For editing a tag, specify its ID. If a tag with this ID does not exist, an error message is returned.

Attention. The method deletes tags that are specified in the call. To preserve tags, you must specify them directly with the previous value. To get the current list of tags, use the GetCampaignsTags method.
Yes
Tag Textual tag (no more than 25 characters). The tag text must be unique within the campaign, regardless of case (a campaign is not allowed to have tags with texts that are the same or that differ only in the case of the characters). When attempting to set a duplicate tag, an error is returned with the code 71. Yes
Parameter Description Required
CampaignTagsInfo object
CampaignID ID of the campaign that the list of tags is being generated for. Yes
Tags

Array of TagInfo objects, each of which defines a single tag. The array can contain no more than 200 objects (tags).

Yes
TagInfo object
TagID

Tag ID. For adding a tag, set 0. For editing a tag, specify its ID. If a tag with this ID does not exist, an error message is returned.

Attention. The method deletes tags that are specified in the call. To preserve tags, you must specify them directly with the previous value. To get the current list of tags, use the GetCampaignsTags method.
Yes
Tag Textual tag (no more than 25 characters). The tag text must be unique within the campaign, regardless of case (a campaign is not allowed to have tags with texts that are the same or that differ only in the case of the characters). When attempting to set a duplicate tag, an error is returned with the code 71. Yes

Output data

The method returns an array of CampaignTagsInfo objects. Each object contains tags for a single campaign that was specified in the call.

{
   "data": [
      {  /* CampaignTagsInfo */
         "CampaignID": (int),
         "Tags": [
            {  /* TagInfo */
               "TagID": (int),
               "Tag": (string)
            }
            ...
         ]
      }
      ...
   ]
}

Parameters are described below.

Parameter Description
CampaignTagsInfo object
CampaignID The campaign ID.
Tags

Array of TagInfo objects, each of which defines a single tag. The array can contain no more than 200 objects (tags).

TagInfo object
TagID Unique tag ID. IDs are assigned to new tags automatically.
Tag Textual tag that is passed when the method is called.
Parameter Description
CampaignTagsInfo object
CampaignID The campaign ID.
Tags

Array of TagInfo objects, each of which defines a single tag. The array can contain no more than 200 objects (tags).

TagInfo object
TagID Unique tag ID. IDs are assigned to new tags automatically.
Tag Textual tag that is passed when the method is called.

Examples of input data

Python

[
   {
      'CampaignID': 3193279,
      'Tags': [{'TagID': 0, 'Tag': 'akapulko'}, {'TagID': 16590, 'Tag': 'orange'}]
   }
]

PHP

array(
   array(
      'CampaignID' => 3193279,
      'Tags' => array(
         array('TagID' => 0, 'Tag' => 'akapulko'), array('TagID' => 16590, 'Tag' => 'orange')
      )
   )
)

Perl

[
   {
      'CampaignID' => 3193279,
      'Tags' => [{'TagID' => 0, 'Tag' => 'akapulko'}, {'TagID' => 16590, 'Tag' => 'orange'}]
   }
]