Re: Creating ad_schedule using rest API with the campaignCriteria service

2021-02-04 Thread Google Ads API Forum Advisor Prod
Hi Eylon, Thank you for reaching out. Yes, whenever you specify an entity in the Google Ads API, you would need to look up their resource_name and use it in the request payload. In your case, the campaign has to follow this pattern. Thanks and regards, Xiaoming, Google Ads API Team Xiaoming Go

Re: Creating ad_schedule using rest API with the campaignCriteria service

2021-02-03 Thread Eylon Raymond Harari
Its working now - This is the correct payload: *{* * "operations":[* * {* * "create":{* *"adSchedule":{* * "startMinute":"{scheduleDay.startMinute}",* * "endMinute":"{scheduleDay.endMinute}",* * "dayOfWeek":"{scheduleDay.dayO

Re: Creating ad_schedule using rest API with the campaignCriteria service

2021-02-03 Thread Eylon Raymond Harari
Hi, thanks for the tip I tried again like this: *curl --location -g --request POST 'https://googleads.googleapis.com/v6/customers/{customer_id}/campaignCriteria:mutate ' \* *--header 'Authorization: Bea

RE: Creating ad_schedule using rest API with the campaignCriteria service

2021-02-03 Thread Google Ads API Forum Advisor Prod
Hi Eylon, Thank you for reaching out. When you create a new CampaignCriterion, you are not supposed to add resourceName in the operations. Please remove the "campaignCriterion":"customers/{customer_id}/campaignCriteria/{campaign_id}~{random_generated_id}" and try it again. Thanks and regards,

Re: Creating ad_schedule using rest API with the campaignCriteria service

2021-02-02 Thread Eylon Raymond Harari
Edit: I have found this key point: "Key Point: Create operations don't specify a resourceName or ID. When the API call succeeds, the response includes the resourceName generated for the newly created object." in this guide https://developers.google.com/google-ads/api/docs/rest/common/mutate#cr

Creating ad_schedule using rest API with the campaignCriteria service

2021-02-02 Thread Eylon Raymond Harari
I am trying to create new a ad_schedule for a given campaign. *Steps I have taken to achieve that: *1) Get all the existing ad_schedule criteria - working ✅