/v2/advertisers/{advertiserId}/reports/ad-groups
POST
https://<pcm-domain>/v2/advertisers/{advertiserId}/reports/ad-groups
Path Parameters
- advertiserIdinteger<int32>requiredFormatint32
Body Parameters
- bodyV2AdvertiserAdGroupReportRequestrequired
- filtersFilterValuesAdvertiserAdGroupReportFilterField[]
- fieldstring<CAMPAIGN_NAME | AD_GROUP_NAME | AD_GROUP_TYPE>AllowedCAMPAIGN_NAMEAD_GROUP_NAMEAD_GROUP_TYPE
- valuesobject[]
- startDatestring<date>requiredFormatdate
- endDatestring<date>requiredFormatdate
- attributionProfilestring<IMP_1_DAY_CLK_14_DAYS | IMP_1_DAY | CLK_14_DAYS>AllowedIMP_1_DAY_CLK_14_DAYSIMP_1_DAYCLK_14_DAYS
- pageinteger<int32>Formatint32Minimum0Maximum1000
- limitinteger<int32>Formatint32Minimum1Maximum10000
- sortTypestring<ASC | DESC>AllowedASCDESC
- dateBreakdownboolean
- orderBystring<CAMPAIGN_NAME | AD_GROUP_NAME | DATE | IMPRESSIONS | CLICKS | LOADS | CONVERSIONS | UNITS_SOLD | CLICK_THROUGH_RATE | CONVERSION_RATE | CONVERSION_VALUE | AD_SPEND_REVENUE | COST_PER_CLICK | COST_PER_MILLE | IMPRESSIONS_COST_PER_MILLE | LOADS_COST_PER_MILLE | RETURN_ON_AD_SPEND>AllowedCAMPAIGN_NAMEAD_GROUP_NAMEDATEIMPRESSIONSCLICKSLOADSCONVERSIONSUNITS_SOLDCLICK_THROUGH_RATECONVERSION_RATECONVERSION_VALUEAD_SPEND_REVENUECOST_PER_CLICKCOST_PER_MILLEIMPRESSIONS_COST_PER_MILLELOADS_COST_PER_MILLERETURN_ON_AD_SPEND
Responses
200
- V2AdvertiserAdGroupReport
- detailedV2AdvertiserAdGroupReportRow[]
- impressionsinteger<int64>Formatint64
- clicksinteger<int64>Formatint64
- conversionsinteger<int64>Formatint64
- unitsSoldinteger<int64>Formatint64
- clickThroughRatenumber<double>Formatdouble
- conversionRatenumber<double>Formatdouble
- conversionValuenumber<double>Formatdouble
- costPerClicknumber<double>Formatdouble
- returnOnAdSpendnumber<double>Formatdouble
- adSpendRevenuenumber<double>Formatdouble
- impressionsCostPerMillenumber<double>Formatdouble
- loadsCostPerMillenumber<double>Formatdouble
- loadsinteger<int64>Formatint64
- campaignIdinteger<int32>Formatint32
- campaignNamestring
- adGroupIdinteger<int32>Formatint32
- adGroupNamestring
- adGroupTypestring
- datestring
- aggregatedAggregatedV2AggregatedReportRow
- countinteger<int64>Formatint64
- metricsV2AggregatedReportRow
- impressionsinteger<int64>Formatint64
- clicksinteger<int64>Formatint64
- conversionsinteger<int64>Formatint64
- unitsSoldinteger<int64>Formatint64
- clickThroughRatenumber<double>Formatdouble
- conversionRatenumber<double>Formatdouble
- conversionValuenumber<double>Formatdouble
- costPerClicknumber<double>Formatdouble
- returnOnAdSpendnumber<double>Formatdouble
- adSpendRevenuenumber<double>Formatdouble
- impressionsCostPerMillenumber<double>Formatdouble
- loadsCostPerMillenumber<double>Formatdouble
- loadsinteger<int64>Formatint64
- countinteger<int64>Formatint64
401
403
404
- ExceptionResponse
- messagesstring[]
422
- ExceptionResponse
- messagesstring[]
curl
curl --request POST \
--url https://<pcm-domain>/v2/advertisers/{advertiserId}/reports/ad-groups \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"startDate": "",
"endDate": ""
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"startDate": "",
"endDate": ""
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://<pcm-domain>/v2/advertisers/{advertiserId}/reports/ad-groups", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://<pcm-domain>/v2/advertisers/{advertiserId}/reports/ad-groups")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"startDate": "",
"endDate": ""
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://<pcm-domain>/v2/advertisers/{advertiserId}/reports/ad-groups"
payload = json.dumps({
"startDate": "",
"endDate": ""
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// OK
{
"detailed": [
{
"impressions": "",
"clicks": "",
"conversions": "",
"unitsSold": "",
"clickThroughRate": "",
"conversionRate": "",
"conversionValue": "",
"costPerClick": "",
"returnOnAdSpend": "",
"adSpendRevenue": "",
"impressionsCostPerMille": "",
"loadsCostPerMille": "",
"loads": "",
"campaignId": "",
"campaignName": "",
"adGroupId": "",
"adGroupName": "",
"adGroupType": "",
"date": ""
}
],
"aggregated": {
"count": "",
"metrics": {
"impressions": "",
"clicks": "",
"conversions": "",
"unitsSold": "",
"clickThroughRate": "",
"conversionRate": "",
"conversionValue": "",
"costPerClick": "",
"returnOnAdSpend": "",
"adSpendRevenue": "",
"impressionsCostPerMille": "",
"loadsCostPerMille": "",
"loads": "",
"count": ""
}
}
}401
// Unauthorized
403
// Forbidden
404
// Not Found
{
"messages": [
""
]
}422
// Unprocessable Entity
{
"messages": [
""
]
}