Remove AdGroupFeed throws RequiredError.REQUIRED @ operations[0].operand.id error

96 views
Skip to first unread message

Florian Eckerstorfer

unread,
Sep 9, 2015, 8:57:29 AM9/9/15
to AdWords API Forum
I am trying to delete some AdGroupFeeds through the API. In my code I am retrieving all AdGroupFeeds from the API, filter the list and then create a REMOVE operation using the retrieved AdGroupFeed object as operand. However, when I call the mutate() function the API sends the following response:

"RequiredError.REQUIRED @ operations[0].operand.id"

However, AdGroupFeed does not have a field "id". How can I delete an AdGroupFeed?

(btw, I am using the PHP SDK)

Anthony Madrigal

unread,
Sep 9, 2015, 9:47:03 AM9/9/15
to AdWords API Forum
Hi Florian,

The required fields to remove an AdGroupFeed are feedId and adGroupId. Please make sure that you are including both of these IDs in your request.

If you did include both of them and are still getting the same error, please send me your SOAP XML request and response so that I can take a look at it. Please send it through Reply privately to author.

Regards,
Anthony
AdWords API Team

Josh Radcliff (AdWords API Team)

unread,
Sep 9, 2015, 6:23:43 PM9/9/15
to AdWords API Forum
Hi Florian,

In the code you sent to Anthony, I noticed that you are using the FeedService.

$operand = new AdGroupFeed($adGroupFeed->feedId, $adGroupFeed->adGroupId);
$operation = new AdGroupFeedOperation($operand, 'REMOVE');

$feedService = $user->GetService('FeedService', $this->apiVersion);
$result = $feedService->mutate([$operation]);

Since you are deleting AdGroupFeed objects, you'll want to use the AdGroupFeedService instead. Please give that a try and let me know if that doesn't resolve the issue for you.

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