getting RequiredError.REQUIRED error when updating budget for campaign

19 views
Skip to first unread message

Jason Kanu

unread,
Apr 24, 2020, 11:35:50 AM4/24/20
to AdWords API and Google Ads API Forum

I am trying to update a budget for a campaign.

After doing:
budgetService.mutate(new BudgetOperation[] {budgetOperation}).getValue(0).getBudgetId();

I am getting this error response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   
<soap:Header>
       
<ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201809">
           
<requestId>0005a40ad78f7b4d0a372892bd09c2da</requestId>
           
<serviceName>BudgetService</serviceName>
           
<methodName>mutate</methodName>
           
<operations>1</operations>
           
<responseTime>523</responseTime>
       
</ResponseHeader>
   
</soap:Header>
   
<soap:Body>
       
<soap:Fault>
           
<faultcode>soap:Client</faultcode>
           
<faultstring>[RequiredError.REQUIRED @ operations[0].operand.budgetId]</faultstring>
           
<detail>
               
<ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201809">
                   
<message>[RequiredError.REQUIRED @ operations[0].operand.budgetId]</message>
                   
<ApplicationException.Type>ApiException</ApplicationException.Type>
                   
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RequiredError">
                       
<fieldPath>operations[0].operand.budgetId</fieldPath>
                       
<fieldPathElements>
                           
<field>operations</field>
                           
<index>0</index>
                       
</fieldPathElements>
                       
<fieldPathElements>
                           
<field>operand</field>
                       
</fieldPathElements>
                       
<fieldPathElements>
                           
<field>budgetId</field>
                       
</fieldPathElements>
                       
<trigger/>
                       
<errorString>RequiredError.REQUIRED</errorString>
                       
<ApiError.Type>RequiredError</ApiError.Type>
                       
<reason>REQUIRED</reason>
                   
</errors>
               
</ApiExceptionFault>
           
</detail>
       
</soap:Fault>
   
</soap:Body>
</soap:Envelope>

Is it saying that I have to set the budgetId beforehand?

Google Ads API Forum Advisor Prod

unread,
Apr 24, 2020, 4:03:24 PM4/24/20
to kanu...@elocal.com, adwor...@googlegroups.com

Hi Jason,

Thank you for reaching out. When you update the budget, you would need to pass in the budgetId to specify the budget you would like to mutate. Please let me know if you have any further concerns.

Thanks and regards,
Xiaoming, Google Ads API Team



 

ref:_00D1U1174p._5001UaSErf:ref
Reply all
Reply to author
Forward
0 new messages