curl --request GET \
--url http://localhost:8000/api/v1/google-ads/campaigns \
--header 'Authorization: Bearer <token>'{
"campaigns": [
{
"id": 123,
"name": "<string>",
"status": "<string>",
"channel_type": "<string>",
"start_date": "<string>",
"end_date": "<string>",
"budget": 123,
"metrics": {
"impressions": 123,
"clicks": 123,
"ctr": 123,
"average_cost_per_conv": 123,
"cost": 123,
"conversions": 123,
"conversion_rate": 123,
"cost_per_conversion": 123,
"impression_share": 123,
"abs_top_page_rate": 123
}
}
],
"source": "google_ads_api",
"storage_result": "<string>"
}Retrieve Google Ads campaigns, storing in and retrieving from MongoDB.
Args: customer_id (int): The Google Ads customer ID to retrieve campaigns for start_date (str): Start date for the data range (YYYY-MM-DD). Defaults to 30 days ago. end_date (str): End date for the data range (YYYY-MM-DD). Defaults to today. force_refresh (bool): Force refresh data from Google Ads API include_drafts (bool): Include non-ENABLED campaigns (PAUSED, REMOVED). Defaults to True. search: Optional text search filter oauth2_token (OAuth2Token): The OAuth2 token for the user approved_user (User): The authenticated user
Returns: GoogleAdsCampaignsResponseSchema: The retrieved campaigns and their source
curl --request GET \
--url http://localhost:8000/api/v1/google-ads/campaigns \
--header 'Authorization: Bearer <token>'{
"campaigns": [
{
"id": 123,
"name": "<string>",
"status": "<string>",
"channel_type": "<string>",
"start_date": "<string>",
"end_date": "<string>",
"budget": 123,
"metrics": {
"impressions": 123,
"clicks": 123,
"ctr": 123,
"average_cost_per_conv": 123,
"cost": 123,
"conversions": 123,
"conversion_rate": 123,
"cost_per_conversion": 123,
"impression_share": 123,
"abs_top_page_rate": 123
}
}
],
"source": "google_ads_api",
"storage_result": "<string>"
}The access token received from the authorization server in the OAuth 2.0 flow.
1 - 200Optional specific Token ID