Unable to create LogicalUserList via Adwords API AdwordsUserListService

30 views
Skip to first unread message

Sanjay Hallan

unread,
Jun 26, 2019, 6:30:15 AM6/26/19
to AdWords API and Google Ads API Forum
Hi,

I am trying to create a LogicalUserList via the python googleads library (api version v201809).

Its a fairly basic request which looks like this:

{
    'operator': 'ADD',
    'operand': {
        'xsi_type': 'LogicalUserList',
        'name': 'My unique name',
        'status': 'OPEN',
        'rules': [{
            'operator': 'ALL',
            'ruleOperands': [{
                'xsi_type': 'BasicUserList',
                'id': 814854591
            }]
        }, {
            'operator': 'NONE',
            'ruleOperands': [{
                'xsi_type': 'BasicUserList',
                'id': 814854611
            }, {
                'xsi_type': 'BasicUserList',
                'id': 814854621
            }]
        }]
    }
}


When I mutate this operation via the AdwordsUserListService I get the following error:

{
    'message': 'Cannot construct an instance of com.google.ads.api.services.datax.userlists.LogicalUserListOperand because it is abstract.  You are probably missing an @Uses annotation while invoking public abstract com.google.ads.api.services.datax.userlists.UserListReturnValue com.google.ads.api.services.datax.adwordsuserlist.AdwordsUserListService.mutate(java.util.List) throws com.google.ads.api.services.common.error.ApiException with params [[com.google.ads.api.services.datax.adwordsuserlist.v201809.jaxbgen.UserListOperation@773a608a]].',
    'code': 'soap:Server',
    'actor': None,
    'detail': None,
    'subcodes': None
}

soap headers:

{
    'clientCustomerId': '<***>',
    'developerToken': '<***>,
    'userAgent': 'AdWordsClient/201809 (AwApi-Python, googleads/20.0.0, Python/3.7.0, zeep)',
    'validateOnly': False,
    'partialFailure': False
}

The requests gets transformed into this soap request by the python googleads library:

{
    'operator': 'ADD',
    'Operation.Type': None,
    'operand': {
        'id': None,
        'isReadOnly': None,
        'name': 'My unique name',
        'description': None,
        'status': 'OPEN',
        'integrationCode': None,
        'accessReason': None,
        'accountUserListStatus': None,
        'membershipLifeSpan': None,
        'size': None,
        'sizeRange': None,
        'sizeForSearch': None,
        'sizeRangeForSearch': None,
        'listType': None,
        'isEligibleForSearch': None,
        'isEligibleForDisplay': None,
        'closingReason': None,
        'UserList.Type': None,
        'rules': [
            {
                'operator': 'ALL',
                'ruleOperands': [
                    {
                        'id': 814854651,
                        'isReadOnly': None,
                        'name': None,
                        'description': None,
                        'status': None,
                        'integrationCode': None,
                        'accessReason': None,
                        'accountUserListStatus': None,
                        'membershipLifeSpan': None,
                        'size': None,
                        'sizeRange': None,
                        'sizeForSearch': None,
                        'sizeRangeForSearch': None,
                        'listType': None,
                        'isEligibleForSearch': None,
                        'isEligibleForDisplay': None,
                        'closingReason': None,
                        'UserList.Type': None,
                        'conversionTypes': []
                    }
                ]
            },
            {
                'operator': 'NONE',
                'ruleOperands': [
                    {
                        'id': 814854611,
                        'isReadOnly': None,
                        'name': None,
                        'description': None,
                        'status': None,
                        'integrationCode': None,
                        'accessReason': None,
                        'accountUserListStatus': None,
                        'membershipLifeSpan': None,
                        'size': None,
                        'sizeRange': None,
                        'sizeForSearch': None,
                        'sizeRangeForSearch': None,
                        'listType': None,
                        'isEligibleForSearch': None,
                        'isEligibleForDisplay': None,
                        'closingReason': None,
                        'UserList.Type': None,
                        'conversionTypes': []
                    },
                    {
                        'id': 814854621,
                        'isReadOnly': None,
                        'name': None,
                        'description': None,
                        'status': None,
                        'integrationCode': None,
                        'accessReason': None,
                        'accountUserListStatus': None,
                        'membershipLifeSpan': None,
                        'size': None,
                        'sizeRange': None,
                        'sizeForSearch': None,
                        'sizeRangeForSearch': None,
                        'listType': None,
                        'isEligibleForSearch': None,
                        'isEligibleForDisplay': None,
                        'closingReason': None,
                        'UserList.Type': None,
                        'conversionTypes': []
                    }
                ]
            }
        ]
    }
}

Any help would be appreciated thanks.

Sanjay

Google Ads API Forum Advisor Prod

unread,
Jun 26, 2019, 1:14:11 PM6/26/19
to adwor...@googlegroups.com
Hello Sanjay,

Could you please share the complete SOAP logs of the error by enabling logging as shown here .

Regards
Sai Teja, Google Ads API Team

ref:_00D1U1174p._5001UCZZcH:ref

Sanjay Hallan

unread,
Jul 2, 2019, 6:35:14 AM7/2/19
to AdWords API and Google Ads API Forum
Hi,

Sorry for the late reply.

I got past this blocker by using the new Google Ads API instead.

Thanks
Sanjay
Reply all
Reply to author
Forward
0 new messages