Google Ads ad-group report
const url = 'https://restapi.affattr.com/v1/report/google_ads/ad_group?only=currencies';const options = { method: 'POST', headers: {'API-KEY': '<API-KEY>', 'Content-Type': 'application/json'}, body: '{"dimensions":["date"],"filter":{"additionalProperty":["example"]},"filter[ad_group_id]":[1],"filter[ad_group_type]":["example"],"filter[applications]":[1],"filter[campaign_id]":[1],"filter[currencies]":["example"],"filter[customer_id]":["example"],"filter[date_from]":"example","filter[date_to]":"example","filter[environment]":"example","filter[partners]":[1],"format":"example","only":"example","to_currency":"example","tz":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://restapi.affattr.com/v1/report/google_ads/ad_group?only=currencies' \ --header 'API-KEY: <API-KEY>' \ --header 'Content-Type: application/json' \ --data '{ "dimensions": [ "date" ], "filter": { "additionalProperty": [ "example" ] }, "filter[ad_group_id]": [ 1 ], "filter[ad_group_type]": [ "example" ], "filter[applications]": [ 1 ], "filter[campaign_id]": [ 1 ], "filter[currencies]": [ "example" ], "filter[customer_id]": [ "example" ], "filter[date_from]": "example", "filter[date_to]": "example", "filter[environment]": "example", "filter[partners]": [ 1 ], "format": "example", "only": "example", "to_currency": "example", "tz": "example" }'Google Ads cost, clicks, impressions and conversions by customer, campaign and ad group (by time_slot). Without Google cost data in the period, installs and events of the applications. Formats: tree, plain, csv2, params; json (default) and csv as a flat table. filter[environment] is accepted but in effect ignored: ad cost has no environment, and the installs are filtered only in the fallback, when the period has no Google cost data. Agency key: allowed (one application of the agency in filter[applications]); it gets the Google Ads data of its partners only — ad_cost, clicks, impressions, conversions; never revenue, payouts or the installs fallback.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”With format=params: currencies returns {\
Request Body required
Section titled “Request Body required ”Request
object
See DimensionsList
object
In effect ignored, see ReportGoogleAdGroup
"", csv
With format=params: currencies
Responses
Section titled “ Responses ”Report data
object
Example generated
{}Bad request
object
What went wrong. 403 always says “Access denied”.
Id of the request, to quote to support.
Example
{ "error": "Access denied", "request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"}No credentials (answered with 403 until default-deny is enabled)
object
What went wrong. 403 always says “Access denied”.
Id of the request, to quote to support.
Example
{ "error": "Access denied", "request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"}Invalid credentials or no access
object
What went wrong. 403 always says “Access denied”.
Id of the request, to quote to support.
Example
{ "error": "Access denied", "request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"}Internal server error
object
What went wrong. 403 always says “Access denied”.
Id of the request, to quote to support.
Example
{ "error": "Access denied", "request_id": "6ebb1a30-76ef-42fe-8ba8-c423791de78e"}