Hey, thanks for responding! Do you happen to have one for deleting campaigns? I can get altering one to work.
On Tuesday, September 22, 2020 at 10:00:28 AM UTC-6 David Scott wrote: > Here is my perl code that works: > $command = qq(curl -X POST \\ > https://googleads.googleapis.com/v5/customers/$customer/campaigns:mutate > \\ > -H 'Authorization: Bearer $access_token' \\ > -H 'Content-Type: application/json' \\ > -H 'developer-token: $DEVELOPER_TOKEN' \\ > -H 'login-customer-id: $MANAGER_CUSTOMER_ID' \\ > -d '{ > "operations": > [ > { > "updateMask": > "name,status,campaignBudget,networkSettings(),servingStatus,biddingStrategyType,geoTargetTypeSetting()", > "update": > { > "resourceName": "customers/$customer/campaigns/$test4", > "id": "$test4", > "name": "test4", > "status": "PAUSED", > "campaignBudget": > "customers/$customer/campaignBudgets/1216493989", > "networkSettings": > { > "targetGoogleSearch": true, > "targetSearchNetwork": true, > "targetContentNetwork": false, > "targetPartnerSearchNetwork": false > }, > "servingStatus": "SERVING", > "biddingStrategyType": "TARGET_SPEND", > "geoTargetTypeSetting": > { > "positiveGeoTargetType": "PRESENCE" > } > } > } > ] > }'); > > @result = qx{$command}; > print "@result\n"; > > On Tuesday, September 22, 2020 at 10:37:11 AM UTC-4 [email protected] > wrote: > >> Greetings and Salutations, Ads Gurus! >> >> My organization is working on a REST integration with Google Ads (not >> using the client libraries) and we are stumbling through finding the right >> process to programattically link a client ads account to a manager account, >> and add and remove ads campaigns from those client ads accounts. >> >> One of those process appears to be detailed exhaustively here: >> https://developers.google.com/google-ads/api/docs/rest/common/mutate >> >> However, the mutate JSON provided to update a campaign: >> >> >> >> >> >> >> >> >> >> >> >> >> *{ "operations": [ { "updateMask": "campaign.name >> <http://campaign.name>,campaign.status", "update": { >> "resourceName": "customers/1234567890/campaigns/8765432109 >> <(876)%20543-2109>", "name": "My renamed campaign", "status": >> "PAUSED", } } ]} * >> is not correct (or at least I couldn't get it to work). The version that >> I HAVE gotten to work looks like this: >> *{* >> * "operations": [* >> * {* >> * "updateMask": "name,status",* >> * "update": {* >> * "resourceName": "customers/<account id>/campaigns/<campaign >> id>",* >> * "name": "<new name>",* >> * "status": "PAUSED",* >> * }* >> * }* >> * ]* >> *}* >> >> The differences are subtle, but finding out what works and what doesn't >> is an exhausting process and, frankly, we don't have time to do it. We >> have made precisely no progress on linking campaigns or removing campaigns. >> >> I can use >> https://developers.google.com/google-ads/api/docs/query/interactive-gaql-builder >> >> to build queries and explore table structures. >> >> Is there an up-to-date reference for the REST interface and how the >> mutates JSONs are to be built? >> >> Thanks in Advance! >> >> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/d6a92353-f403-4636-b74c-d914ed5c8c1cn%40googlegroups.com.
