Im trying to remove all ad schedule criterions from a campaign using the
REST API.
*1. This is a sample data shape of how the schedule criterions / resources
look like:*
*[*
* {*
* "campaignCriterion":{*
*
"resourceName":"customers/XXX_customer_id_XXX/campaignCriteria/XXX_campaign_id_XXX~123456",*
* "adSchedule":{*
* "startMinute":"ZERO",*
* "endMinute":"ZERO",*
* "dayOfWeek":"MONDAY",*
* "startHour":8,*
* "endHour":23*
* }*
* }*
* },*
* {*
* "campaignCriterion":{*
* "resourceName":"customers/XXX_customer_id_XXX/campaignCriteria/*
*XXX_campaign_id_XXX**~123456",*
* "adSchedule":{*
* "startMinute":"ZERO",*
* "endMinute":"ZERO",*
* "dayOfWeek":"TUESDAY",*
* "startHour":8,*
* "endHour":23*
* }*
* }*
* }*
*]*
*2. I am following this guide: *
https://developers.google.com/google-ads/api/reference/rpc/v6/CampaignCriterionOperation#remove
*3. Now, this is the CURL request I'm making - *
*curl --location --request POST
'https://googleads.googleapis.com/v6/customers/XXX_customer_id_XXX/campaignCriteria:mutate'
\*
*--header 'Authorization: Bearer {access_token...}' \*
*--header 'developer-token: {developer_token...}' \*
*--header 'Content-Type: application/json' \*
*--data-raw '{*
*"operations":[*
* {*
*"remove":{*
*"resourceName":"customers/XXX_customer_id_XXX/campaignCriteria/XXX_campaign_id_XXX~XXX_crieteria_id_XXX"*
* }*
* },*
* {*
*"remove":{*
*"resourceName":"customers/XXX_customer_id_XXX/campaignCriteria/XXX_campaign_id_XXX~XXX_crieteria_id_XXX"*
* }*
* }*
* ]*
*}'*
I get a 400 "bad request" response from google.
How can I make it work? for me, it seems like I am following the guidelines
seen in point #1 (following the shape of the data) and also from the link
in #2.
Surely I'm missing something, will appreciate a solution or code sample..
Cheers
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/562f0ddf-3de6-4fc1-9550-b821985b2b11n%40googlegroups.com.