AdGroupService
AdGroupService provides operations for accessing, modifying, and creating
ad groups.
For more information about how to use the AdGroupService, see the overview section.
Requests
Parameters
| Parameter name | Parameter type | Parameter description |
| campaignID |
int |
The campaign with which to associate the new ad group. |
| newData |
AdGroup |
The parameters for the new ad group.
- If
status is not present, 'Enabled' is
used.
- If
name is not present, a default name of
the form "Ad Group #n" is used.
- You must set exactly one of the following fields:
keywordMaxCpc,
siteMaxCpm,
siteMaxCpc.
- The ID field is ignored; ID is set by AdGroupService.
|
Response
| Response type | Response description |
AdGroup |
the new AdGroup with all values (including IDs) filled in. |
Create multiple new ad groups.
All ad groups must be associated with the same campaign.
Parameters
| Parameter name | Parameter type | Parameter description |
| campaignID |
int |
The campaign with which to associate the new ad groups |
| newData |
AdGroup[] |
Data for each of the new ad groups.
See addAdGroup for details. |
Response
| Response type | Response description |
AdGroup[] |
An array of new AdGroup objects, with all values (including IDs)
filled in. |
Get all information about the specified AdGroup
Parameters
| Parameter name | Parameter type | Parameter description |
| adGroupId |
long |
The ID of the specified AdGroup |
Response
| Response type | Response description |
AdGroup |
a structure with the ad group data |
Get all information about a set of ad groups.
Parameters
| Parameter name | Parameter type | Parameter description |
| adgroupIDs |
long[] |
The IDs of the AdGroups to load |
Response
| Response type | Response description |
AdGroup[] |
An array of data objects, each representing an ad group.
The returned objects will be in the
same order as their IDs in the input array. |
Get statistics for a list of ad groups in a campaign. See
StatsRecord
for details about the statistics returned. The time granularity is one day,
and is always with respect to the account's local timezone.
Parameters
| Parameter name | Parameter type | Parameter description |
| campaignId |
int |
The campaign in which to find the ad groups |
| adGroupIds |
long[] |
The ad groups whose statistics are being queried |
| startDay |
date |
The starting day of the period for which statistics are
to be collected (xsd:date). |
| endDay |
date |
The ending day of the period for which statistics are to be
collected, inclusive (xsd:date). |
Response
| Response type | Response description |
StatsRecord[] |
an array of
StatsRecords
containing information about the activity on the ad groups.
The order of StatsRecord objects returned may be different from
the order in which the IDs were requested. |
Get all information about the ad groups associated with a campaign.
Parameters
| Parameter name | Parameter type | Parameter description |
| campaignID |
int |
The campaign whose ad groups will be retrieved. |
Response
| Response type | Response description |
AdGroup[] |
An array of data objects, each representing an ad group. |
Update the fields of an existing AdGroup.
Parameters
| Parameter name | Parameter type | Parameter description |
| changedData |
AdGroup |
The new contents of the AdGroup.
The existing AdGroup whose ID matches changedData.id will be modified
to have the values listed in changedData. keywordMaxCpc, siteMaxCpm,
name, and status are mutable; ID is immutable.
keywordMaxCpc: If omitted,
the original value is retained.
Otherwise interpreted as micro-units of
the currency associated with this account.
siteMaxCpm: If omitted,
the original value is retained.
Otherwise interpreted as micro-units of
the currency associated with this account.
siteMaxCpc: If omitted,
the original value is retained.
Otherwise interpreted as micro-units of
the currency associated with this account.
name: If omitted or zero-length,
the original value is retained.
status: If omitted or zero-length,
the original value is retained.
|
Response
| Response type | Response description |
(none) |
|
Update the fields of multiple existing AdGroups.
Parameters
| Parameter name | Parameter type | Parameter description |
| changedData |
AdGroup[] |
|
Response
| Response type | Response description |
(none) |
|