EntityNotFound.INVALID_ID when try remove keyword

66 views
Skip to first unread message

api.gr...@gmail.com

unread,
Sep 14, 2016, 6:02:44 AM9/14/16
to AdWords API Forum
Hello, I have some strangely error - when i send request to remove keyword, and in criterion write criterion id of some old keyword, i get this error: 
Fatal error: Uncaught SoapFault exception: [soap:Server] [EntityNotFound.INVALID_ID @ operations[0].operand.criterion.id; trigger:'CriterionId{id=....
but when i send request to remove just created keyword, it removed without any problems. Answer please, in what can be problem?
I use php client library 607 version. 

Joyce Lava

unread,
Sep 14, 2016, 7:10:46 AM9/14/16
to AdWords API Forum
Hi,

The EntityNotFound.INVALID_ID error occurs when the specified id of the entity (in your case, id of the old keyword) is either not accessible in the account specified as the clientCustomerId or the id does not exist. To avoid possible errors when removing a keyword, you may want to use the AdGroupCriterionService.get operation to make sure that the id do exist in the account or not. The GetKeywords.php shows how to do this (PHP client library example code).

Best,
Joyce, AdWords API Team

api.gr...@gmail.com

unread,
Sep 14, 2016, 7:33:16 AM9/14/16
to AdWords API Forum
I used AdGroupCriterionService.get at first, and from result and take id. And firstly run it to look for existing criterion id. As result - id exist, differences beetwen old and new keywords is empty fields "systemServingStatus" and "approvalStatus". In new keywords this fields "ELIGIBLE" and "APPROVED". So in get reqest we can see this keys.

среда, 14 сентября 2016 г., 14:10:46 UTC+3 пользователь Joyce Lava написал:

api.gr...@gmail.com

unread,
Sep 14, 2016, 7:39:25 AM9/14/16
to AdWords API Forum
Here print_r of remove reqest:
Array
(
    [0] => AdGroupCriterionOperation Object
        (
            [operand] => AdGroupCriterion Object
                (
                    [adGroupId] => 9557124978
                    [criterionUse] => 
                    [criterion] => Criterion Object
                        (
                            [id] => 60390843129
                            [type] => 
                            [CriterionType] => 
                            [_parameterMap:Criterion:private] => Array
                                (
                                    [Criterion.Type] => CriterionType
                                )

                        )

                    [labels] => 
                    [forwardCompatibilityMap] => 
                    [baseCampaignId] => 
                    [baseAdGroupId] => 
                    [AdGroupCriterionType] => 
                    [_parameterMap:AdGroupCriterion:private] => Array
                        (
                            [AdGroupCriterion.Type] => AdGroupCriterionType
                        )

                )

            [exemptionRequests] => 
            [operator] => REMOVE
            [OperationType] => 
            [_parameterMap:Operation:private] => Array
                (
                    [Operation.Type] => OperationType
                )

        )

)

Joyce Lava

unread,
Sep 14, 2016, 11:19:13 PM9/14/16
to AdWords API Forum
Hi,

Thanks for providing the information. However, it seems strange to me that the "systemServingStatus" and "approvalStatus" fields of the old keyword (which the error occurs when removing it) are empty. As far as I know, these fields should have returned values because these are generated based on the review process. Also, upon checking the adGroupId 9557124978, it does not have the keywordId 60390843129.

That said, could you please send me the SOAP request and response when you invoked the AdGroupCriterionService.get operation by using reply privately to author option of this thread?

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