CampaignAsset, AdGroupAssets API

134 views
Skip to first unread message

Hwansang Cho

unread,
Jan 4, 2024, 4:00:43 AM1/4/24
to Google Ads API and AdWords API Forum
Hi, Google Ads Team.

1. When call the CampaignAsset API, the SITELINK asset is set to the created adGroupAd.

curl --request POST \
  'https://googleads.googleapis.com/v15/customers/8732160833/campaignAssets:mutate?key=[YOUR_API_KEY]' \
  --header 'developer-token: **********************' \
  --header 'login-customer-id: **********************' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '
{
  "operations": [
    {
      "create": {
        "campaign": "customers/8732160833/campaigns/20916937198",
        "asset": "customers/8732160833/assets/119449297077",
        "fieldType": "SITELINK"
      }
    }
  ]
}' \
  --compressed

2. When calling the AdGroupAssets API, the SITELINK asset is not set to the created adGroupAd.

curl --request POST \
  'https://googleads.googleapis.com/v15/customers/8732160833/adGroupAssets:mutate?key=[YOUR_API_KEY]' \
  --header 'developer-token: **********************' \
  --header 'login-customer-id: **********************' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '
{
  "operations": [
    {
      "create": {
        "adGroup": "customers/8732160833/adGroups/159834654920",
        "asset": "customers/8732160833/assets/119449297077",
        "fieldType": "SITELINK"
      }
    }
  ]
}' \
  --compressed

Inquiry
1. Unlike the CampaignAsset API, aren't the assets automatically set to the AdGroupAssets API?
2. I would like to know the API how to set a SITELINK asset to adGroupAd using the API.

Google Ads API Forum Advisor

unread,
Jan 4, 2024, 5:34:49 AM1/4/24
to hwan...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

By reviewing your query, I understand that your concern is regarding the SITELINK asset. Assets are units of shareable data—such as images, videos, headlines, and descriptions—that are used to construct different types of ads across multiple formats—such as display, YouTube, app store, and so on. Before you create a CampaignAssetSet you must first create a Campaign and an AssetSet containing one or more assets. Please check this documentation on Assets and refer to this sample code to Add Sitelinks Using Assets. I hope this helps. Kindly get back to us if you have any further queries.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02r5KDV:ref"

Thanks,
 
Google Logo Google Ads API Team

 

Hwansang Cho

unread,
Jan 4, 2024, 6:23:10 PM1/4/24
to Google Ads API and AdWords API Forum
Thank you.

I would like to know the API for setting SITELINK, etc.. Asset in adGroupAd at the adGroup level.

2024년 1월 4일 목요일 오후 7시 34분 49초 UTC+9에 Google Ads API Forum Advisor님이 작성:

Google Ads API Forum Advisor

unread,
Jan 5, 2024, 4:30:04 AM1/5/24
to hwan...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

By reviewing your concern, I understand that you want to set SITELINK through the API. I would recommend you to check this documentation SitelinkAsset from the AssetOperation for more information.
Reply all
Reply to author
Forward
0 new messages