Unable to update fields in Ad Group Ads

277 views
Skip to first unread message

AMAP TEST

unread,
Oct 14, 2022, 7:45:44 AM10/14/22
to Google Ads API and AdWords API Forum
Hi,

I have created a RESPONSIVE_SEARCH_AD. I am trying to update headlines via. API call. Although the documentation doesn't say that this is immutable, I am getting an error saying the field is immutable.

Request:
{
    "operations": [
        {
            "updateMask": "ad.responsiveSearchAd.headlines",
            "update": {
                "status": "PAUSED",
                "resourceName": "customers/xxxx/adGroupAds/144865384680~627789042220",
                "ad": {
                    "finalUrls": [
                        "https://gaagl.page.link/Eit5"
                    ],
                    "type": "RESPONSIVE_SEARCH_AD",
                    "responsiveSearchAd": {
                        "headlines": [
                            {
                                "pinnedField": "HEADLINE_1",
                                "text": "Heading1"
                            },
                            {
                                "pinnedField": "HEADLINE_2",
                                "text": "Heading2"
                            },
                            {
                                "pinnedField": "HEADLINE_3",
                                "text": "Heading3"
                            }
                        ],
                        "descriptions": [
                            {
                                "pinnedField": "DESCRIPTION_1",
                                "text": "Description1"
                            },
                            {
                                "pinnedField": "DESCRIPTION_2",
                                "text": "Description2"
                            }
                        ]
                    }
                },
                "adGroup": "customers/xxxx/adGroups/144865384680"
            }
        }
    ],
    "partialFailure": false,
    "validateOnly": false
}

Response:
{
    "error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "@type": "type.googleapis.com/google.ads.googleads.v11.errors.GoogleAdsFailure",
                "errors": [
                    {
                        "errorCode": {
                            "requestError": "IMMUTABLE_FIELD"
                        },
                        "message": "Field 'ad.responsive_search_ad.headlines' cannot be modified by 'UPDATE' operation.",
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "update"
                                },
                                {
                                    "fieldName": "ad"
                                },
                                {
                                    "fieldName": "responsive_search_ad"
                                },
                                {
                                    "fieldName": "headlines"
                                }
                            ]
                        }
                    }
                ],
                "requestId": "yMGSQRq4i0V0yM7qhivDzw"
            }
        ]
    }
}

Note: I get this IMMUTABLE_FIELD error for mostly all the fields (other than status) for all Ad Group Ad Types when i try to update.

Google Ads API Forum Advisor

unread,
Oct 14, 2022, 3:19:18 PM10/14/22
to amap.acce...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for raising this concern to the Google Ads API support team.

Upon checking your provided logs. I can see that you are doing an ad.responsive_search_ad.headlines, we don't guarantee that RSA's will be updated with ad group ads because an RSA can be part of many ad groups. With this, you may try the below sample REST interface log that worked on our end:

To mutate ad, you may use below REST endpoint as to update ads.
REST Resource: v11.customers.ads
POST /v11/customers/{customerId}/ads:mutate

{
   "operations": {
  "update": {
  "resourceName": "customers/CUSTOMER_PLACEHOLDER/ads/AD_PLACEHOLDER",
 "finalUrls": ["http://www.example.com",],
 "finalMobileUrls": ["http://www.example.com/mobile",],

  "responsiveSearchAd": {
      "headlines": {
        "pinnedField": "HEADLINE_1",
        "text": "new headline update",
      },
      "headlines": {
        "text": "newer headline",
      },
      "headlines": {
        "text": "even newer headline",
      },
    },
     },
  "updateMask": {
    "paths":"responsive_search_ad.headlines"
  },
},

"responseContentType": "MUTABLE_RESOURCE"
}
ads:mutate

Let me know if this works for you.

Best regards,
Google Logo
Jinky
Google Ads API Team
 


ref:_00D1U1174p._5004Q2f6al7:ref
Reply all
Reply to author
Forward
0 new messages