Unable to set/update AdGroup status

52 views
Skip to first unread message

s...@feedonomics.com

unread,
Apr 5, 2018, 8:52:28 PM4/5/18
to AdWords API Forum
function set_adgroup_status($adgroup_id, $status) {
$adGroup = new AdGroup();
$adGroup->setId($adgroup_id);
$adGroup->setStatus($status);

$operation = new AdGroupOperation();
$operation->setOperand($adGroup);
$operation->setOperator(Operator::SET);

return $operation;
}

Why does processing this operation result in all these errors?

<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="OperatorError">
<fieldPath>operations[2]</fieldPath>
<fieldPathElements>
<field>operations</field>
<index>2</index>
</fieldPathElements>
<trigger/>
<errorString>OperatorError.OPERATOR_NOT_SUPPORTED</errorString>
<ApiError.Type>OperatorError</ApiError.Type>
<reason>OPERATOR_NOT_SUPPORTED</reason>
</errors>
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RequiredError">
<fieldPath>operations[2].operator</fieldPath>
<fieldPathElements>
<field>operations</field>
<index>2</index>
</fieldPathElements>
<fieldPathElements>
<field>operator</field>
</fieldPathElements>
<trigger/>
<errorString>RequiredError.REQUIRED</errorString>
<ApiError.Type>RequiredError</ApiError.Type>
<reason>REQUIRED</reason>
</errors>
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RequiredError">
<fieldPath>operations[2].operand</fieldPath>
<fieldPathElements>
<field>operations</field>
<index>2</index>
</fieldPathElements>
<fieldPathElements>
<field>operand</field>
</fieldPathElements>
<trigger/>
<errorString>RequiredError.REQUIRED</errorString>
<ApiError.Type>RequiredError</ApiError.Type>
<reason>REQUIRED</reason>
</errors>
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RequiredError">
<fieldPath>operations[2].operator</fieldPath>
<fieldPathElements>
<field>operations</field>
<index>2</index>
</fieldPathElements>
<fieldPathElements>
<field>operator</field>
</fieldPathElements>
<trigger/>
<errorString>RequiredError.REQUIRED</errorString>
<ApiError.Type>RequiredError</ApiError.Type>
<reason>REQUIRED</reason>
</errors>
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RequiredError">
<fieldPath>operations[2].operand</fieldPath>
<fieldPathElements>
<field>operations</field>
<index>2</index>
</fieldPathElements>
<fieldPathElements>
<field>operand</field>
</fieldPathElements>
<trigger/>
<errorString>RequiredError.REQUIRED</errorString>
<ApiError.Type>RequiredError</ApiError.Type>
<reason>REQUIRED</reason>
</errors>

I then checked the operator object:

  object(Google\AdsApi\AdWords\v201710\cm\AdGroupOperation)#95 (4) {
    ["operand":protected]=>
    object(Google\AdsApi\AdWords\v201710\cm\AdGroup)#96 (16) {
      ["id":protected]=>
      string(11) "60706718824"
      ["campaignId":protected]=>
      NULL
      ["campaignName":protected]=>
      NULL
      ["name":protected]=>
      NULL
      ["status":protected]=>
      string(6) "PAUSED"
      ["settings":protected]=>
      NULL
      ["labels":protected]=>
      NULL
      ["forwardCompatibilityMap":protected]=>
      NULL
      ["biddingStrategyConfiguration":protected]=>
      NULL
      ["contentBidCriterionTypeGroup":protected]=>
      NULL
      ["baseCampaignId":protected]=>
      NULL
      ["baseAdGroupId":protected]=>
      NULL
      ["trackingUrlTemplate":protected]=>
      NULL
      ["urlCustomParameters":protected]=>
      NULL
      ["adGroupType":protected]=>
      NULL
      ["adGroupAdRotationMode":protected]=>
      NULL
    }
    ["operator":protected]=>
    string(3) "SET"
    ["OperationType":protected]=>
    NULL
    ["parameterMap":"Google\AdsApi\AdWords\v201710\cm\Operation":private]=>
    array(1) {
      ["Operation.Type"]=>
      string(13) "OperationType"
    }
  }

Any ideas? Thanks!

Peter Oliquino

unread,
Apr 6, 2018, 1:52:26 AM4/6/18
to AdWords API Forum
Hi,

In order to better identify the exact cause of the issue, could you provide to me the complete SOAP request and response that was generated when this error occurred? You may reply using the Reply privately to author option.

Best regards,
Peter
AdWords API Team

Christian Semmler

unread,
Apr 6, 2018, 3:44:27 AM4/6/18
to AdWords API Forum
We are also seeing these errors (OPERATOR_NOT_SUPPORTED - RequiredError.REQUIRED) when editing a shopping bidding tree with the BatchJobService. I will see if I can provide the SOAP request.

Peter Oliquino

unread,
Apr 6, 2018, 5:27:07 AM4/6/18
to AdWords API Forum
Hi Christian,

So I can assist you better, could you provide more details such as your batch job ID and any SOAP request and response? You may reply to me privately via the Reply privately to author option.
Reply all
Reply to author
Forward
0 new messages