Thanks Bram for the response. I found the solution to it not long ago. There are two ways involved if using Rest API.
First instance is a request body that initializes multiple campaign operations(campaign budget, campaign, AdGroup, Text Ad) with one endpoint. Second instance is individual request bodies for each operation with different endpoints matching them. I opted for the second and it's also supposed to follow the sequence(1st: campaign budget, 2nd: campaign, 3rd: AdGroup, 4th: Text Ad). My problem was, i attempted creating campaign individually whilst i hadn't created it's budget first. Everything is running well now. I really appreciate the prompt response from you though. Thanks again Bram. On Thursday, June 3, 2021 at 3:25:33 PM UTC Bram van Rijswijk wrote: > 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 poeti...@gmail.com 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 >>>> >>> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/b43ba895-b986-487d-809d-1dec17b3aeffn%40googlegroups.com.