How to update the campaign budget?

38 views
Skip to first unread message

jona...@garagecoders.net

unread,
Dec 8, 2015, 6:39:25 PM12/8/15
to AdWords API Forum
Hi, I'm trying to update the campaign name and the campaign budget, I don't have problems when updating the campaign name
But the budget has not been updating


    PPC2CampaignServiceSoapBinding *service = [[PPC2CampaignServiceSoapBinding alloc] init];

    PPC2SoapHeader *soapHeader = (PPC2SoapHeader*)[self getSoapHeaderForRequestWithMCCAccount:NO];

    PPC2mutate *mutate = [[PPC2mutate alloc] init];

    PPC2CampaignOperation *operation = [[PPC2CampaignOperation alloc] init];

    PPC2Campaign *campaign = [[PPC2Campaign alloc] init];

    campaign._id = [NSNumber numberWithDouble:[campaignId doubleValue]];

    campaign.name = newName;

    PPC2Budget *newBudget= [[PPC2Budget alloc] init];

    newBudget.budgetId = [NSNumber numberWithDouble:[budgedId doubleValue] ];

    PPC2Money *newMoney = [[PPC2Money alloc] init];

    newMoney.microAmount = [NSNumber numberWithDouble:([newBudged doubleValue]*1000000) ];

    newBudget.amount = newMoney;

    campaign.budget = newBudget;

    operation.operand = campaign;

    operation._operator = [PPC2Operator SET];

    [mutate.items addObject:operation];


I don't get error, but the budget is not updated. Do i need to use another service ? 


Thanks.

jona...@garagecoders.net

unread,
Dec 8, 2015, 6:54:24 PM12/8/15
to AdWords API Forum

<soap:Header>
<n1:RequestHeader>
<n1:clientCustomerId>????</n1:clientCustomerId>
<n1:developerToken>????</n1:developerToken>
</n1:RequestHeader>
</soap:Header>
<soap:Body>
<n1:mutate>
<n1:operations>
<n1:operator>SET</n1:operator>
<n1:operand>
<n1:id>????</n1:id>
<n1:name>NEW CAMPAIGN NAME</n1:name>
<n1:budget>
<n1:budgetId>????</n1:budgetId>
<n1:amount>
<n1:microAmount>NEW CAMPAIGN MICRO AMOUNT</n1:microAmount>
</n1:amount>
</n1:budget>
</n1:operand>
</n1:operations>
</n1:mutate>
</soap:Body>

Anthony Madrigal

unread,
Dec 9, 2015, 9:38:23 AM12/9/15
to AdWords API Forum
Hi Jonathan,

You should be able to change your budget by using the budgetId in your SET operation. Could you please send me your SOAP response for this operation through reply privately to author so that I can take a further look?

Thanks,
Anthony
AdWords API Team
Reply all
Reply to author
Forward
0 new messages