Ah I see 'campaignBudget' can also be used. We use 'campaign_budget'. As long as it has the resource name, it will work.
On Thursday, June 3, 2021 at 5:22:01 PM UTC+2 Bram van Rijswijk wrote: > Hi, change 'campaigneBudget' to 'campaign_budget'. Before you create a > campaign you have to create a budget. See this page: > https://developers.google.com/google-ads/api/rest/examples. > On Thursday, June 3, 2021 at 4:10:23 PM UTC+2 [email protected] wrote: > >> Hi guys, please i have been struggling with the Rest API request body for >> creating new ad campaign. I keep getting response errors. Please help me >> with the correct request body. The operations involved for 'create' are >> many. I have read all about it too. Please check my code and help me >> correct it: >> >> $curl = curl_init(); >> curl_setopt_array($curl, array( >> CURLOPT_URL => " >> https://googleads.googleapis.com/v7/customers/{my customer id >> here}/campaigns:mutate", >> CURLOPT_RETURNTRANSFER => true, >> CURLOPT_ENCODING => "", >> CURLOPT_MAXREDIRS => 10, >> CURLOPT_TIMEOUT => 30, >> CURLOPT_FOLLOWLOCATION => false, >> CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, >> CURLOPT_CUSTOMREQUEST => "POST", >> CURLOPT_POSTFIELDS =>"{ >> 'operations': [ >> { >> 'create': { >> 'name': 'First Campaign #{1}', >> 'advertisingChannelType': 'SEARCH', >> 'status': 'PAUSED', >> 'networkSettings': { >> 'targetGoogleSearch': true, >> 'targetSearchNetwork': true, >> 'targetContentNetwork': false, >> 'targetPartnerSearchNetwork': false >> }, >> 'startDate': '{$start_date}', >> 'endDate': '{$end_date}', >> 'paymentMode': 'CLICKS', >> 'campaigneBudget': '5' >> } >> } >> ], >> 'partialFailure': false, >> 'validateOnly': false >> }", >> CURLOPT_HTTPHEADER => array( >> "Content-Type: application/json", >> "developer-token: {my developer token here}", >> "login-customer-id: {my manager id here}", >> "Authorization: Bearer {my auth token}" >> ), >> )); >> $response = curl_exec($curl); >> >> curl_close($curl); >> >> var_dump($response) >> >> Urgent solution needed. Please help. >> >> On Monday, November 23, 2020 at 6:54:53 AM UTC adsapiforumadvisor wrote: >> >>> Hi Steve, >>> >>> Thank you for reaching out. >>> >>> You may refer to this guide >>> <https://developers.google.com/google-ads/api/docs/rest/common/mutate> >>> on how you can derive and construct URLs if you choose to use the REST >>> interface for mutate requests. >>> >>> I hope this helps and please let me know if you have additional >>> clarifications. >>> >>> Best regards, >>> [image: Google Logo] >>> Peter Laurence Napa Oliquino >>> Google Ads API Team >>> >>> >>> ref:_00D1U1174p._5004Q27vHQp:ref >>> >> Met vriendelijke groet / With kind regards, Bram van Rijswijk Backend Developer SOCIAL BLUE Nieuwe Steen 27 1625 HV Hoorn The Netherlands T: +31 (0)229 283 000 E: [email protected] We're an official Facebook Marketing Partner Kvk: 59384360 -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/78dd6a65-1dbf-4031-a0b6-d9a9a627715cn%40googlegroups.com.
