Blank results.xml with no error message when using API to modify a SharedSet

28 views
Skip to first unread message

Bill

unread,
May 4, 2016, 7:47:58 PM5/4/16
to AdWords API Forum
I'm using googleads-php-lib to access the AdWords API from PHP. In this case I'm trying to perform a fairly simple operation on a "SharedSet" of campaign-level negative keywords.

A var_dump of the batch job operations I'm sending looks as follows.

 [
     SharedCriterionOperation {#768
       +operand: SharedCriterion {#759
         +sharedSetId: "1378100563",
         +criterion: Keyword {#764
           +text: "test3",
           +matchType: "BROAD",
           +id: null,
           +type: null,
           +CriterionType: null,
         },
         +negative: true,
       },
       +operator: "ADD",
       +OperationType: null,
     },
     SharedCriterionOperation {#776
       +operand: SharedCriterion {#757
         +sharedSetId: "1378100563",
         +criterion: Keyword {#763
           +text: "test1",
           +matchType: "BROAD",
           +id: "22148403",
           +type: "KEYWORD",
           +CriterionType: "Keyword",
         },
         +negative: true,
       },
       +operator: "REMOVE",
       +OperationType: null,
     },
   ]

As you can see, my test case is to delete one keyword and add another--but I've also confirmed that each of these operations fails individually. Not only do the operations fail, but results.xml is completely blank:

<?xml version="1.0" encoding="UTF-8"?>
<mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201603"/>

That's the entire file. I get the same result whether I use API v201509 or v201603.

I don't think I can share the code I'm using to generate this, but suffice to say it's similar to this Java example (but translated into PHP).

I can't say using the AdWords API has been problem-free in general, but the sheer lack of explanation for this error makes it stand out in a crowded field.

Umesh Dengale

unread,
May 5, 2016, 10:22:52 AM5/5/16
to AdWords API Forum
Hello,

The BatchJobService does not support SharedCriterionOperation. Please check out supported operations by the BatchJobService and batch processing guide

Thanks,
Umesh, AdWords API Team.

Bill

unread,
May 5, 2016, 12:01:18 PM5/5/16
to AdWords API Forum
OK, this does solve my problem, although I'm not crazy about the idea of updating shared criteria one at a time. Are there any plans to add batch job support for SharedCriterionOperations?

Umesh Dengale

unread,
May 5, 2016, 12:39:06 PM5/5/16
to AdWords API Forum
Hello,

I have communicated above feature request (SharedCriterionOperation support in BatchJobService) to the AdWords API team. They will review the request and this may or may not get approved. Please watch our blog for any updates or announcements.
Reply all
Reply to author
Forward
0 new messages