How to update image asset to an app campaign

50 views
Skip to first unread message

Rita Wang

unread,
Aug 9, 2019, 6:08:22 AM8/9/19
to adwor...@googlegroups.com
Hi,

A key API use case of the client is to optimize the campaign by replacing the bad performance assets with new one.

When client try to modify the image assets to an AC campaign via Adwords API, they met following issue.
Since the headlines and descriptions are mandatory with Operators: ADD (ss), the client made a try with Operator: SET:

const operations = [{
        operator: 'SET',
        operand: {
            adGroupId: data.adGroup.id,
            status: 'ENABLED',
            policySummary: {},
            labels: [],
            baseCampaignId: data.campaignId,
            baseAdGroupId: data.adGroup.id,
            forwardCompatibilityMap: [],
            adStrengthInfo: {},
            ad: {
                images: [{
                    asset: {
                        'xsi:type': 'ImageAsset',
                        assetId: '647xxxxx11',
                    },
                }],
            },
        },
    }];
    const ret = await adGroupAdService.mutate({operations: operations});

Get error:
Error: cvc-complex-type.2.4.d: Invalid content was found starting with element 'ad'. No child element is expected at this point.


Would you provide a code sample to the client?

Thanks,
Rita Wang  王  蕊 | Technical Solution Consultant | rita...@google.com |










Google Ads API Forum Advisor Prod

unread,
Aug 9, 2019, 1:11:20 PM8/9/19
to adwor...@googlegroups.com
Hello Rita,

Could you please share the code snippet and the complete error log you are facing using reply privately to the author option to help further?

Regards,
Sai Teja, Google Ads API Team

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