Hello, Thanks for the response.
I want to set the location to the US but I dont know where to find the right id. Regards, Jip Veerbeek On Monday, October 31, 2022 at 9:18:05 PM UTC+1 adsapi wrote: > Hi Jip, > > The criterion_id is need as part of the "resourceName" in some resources > and campaignCriteria is one of them. > It is a reference to the criterion value that is set as criteria. For the > case of the location field the criteria_id is the value of the > "geoTargetConstant". > > This is one example query that worked for me using the Geo code you send > us. > > curl --request POST " > https://googleads.googleapis.com/v${API_VERSION}/customers/${CUSTOMER_ID}/campaignCriteria:mutate" > > \ > --header "Content-Type: application/json" \ > --header "developer-token: ${DEVELOPER_TOKEN}" \ > --header "login-customer-id: ${MANAGER_CUSTOMER_ID}" \ > --header "Authorization: Bearer ${OAUTH2_ACCESS_TOKEN}" \ > --data "{ > 'operations': [ > { > 'create': { > 'resourceName': > 'customers/${CUSTOMER_ID}/campaignCriteria/${CAMPAIGN_ID}~9050703', > 'location': { 'geoTargetConstant': 'geoTargetConstants/9050703' }, > }, > } > ], > }" > > Kindly note the difference in the resourceName to use "campaignCriteria" > and the criterion_id. > > Let us know if you have any other questions! > > > [image: Google Logo] > Daniel > Google Ads API Team > > > ref:_00D1U1174p._5004Q2fpC2r:ref > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 "Google Ads API and AdWords 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/dae14d57-7e23-4c32-b54f-7da9c0ea1991n%40googlegroups.com.
