ExcludeHiddenAccounts=true not working

247 views
Skip to first unread message

Luis C. Cruz

unread,
May 24, 2017, 4:21:30 AM5/24/17
to AdWords API Forum
I want to get all the accounts within an MCC which contains 755 accounts, but 635 of those are hidden. In the API references I found out that I can filter out all the hidden accounts by setting the field ExcludeHiddenAccounts = true in the ManagedCustomerService.get method (I read about it here). However, when I set it in the list of predicates the API is ignoring it and return all the accounts in the MCC. This snippet contains the selector I'm using:

selector = {
        'fields': ['CustomerId', 'Name'],
        'paging': {
        'startIndex': str(offset),
        'numberResults': str(self.page_size)
        },
                'predicates': [{
                            'field' : 'ExcludeHiddenAccounts',
                            'operator' : 'EQUALS' ,
                            'values' : 'true'
                }]
        }

Am I missing something?


Ivan Bautista

unread,
May 24, 2017, 6:51:13 AM5/24/17
to AdWords API Forum
Hi Luis,

Could you check if the isHidden field of those accounts in question are set to true?

To help us investigate further, could you reply to us privately (using reply privately to author option) with the SOAP request and response logs captured when issue was encountered?

If SOAP logging is not enabled on your end and you need assistance, you can provide us the programming language you are using so we can refer you to the corresponding guide for enabling it.

Regards,
Ivan
AdWords API Team

Luis C. Cruz

unread,
May 24, 2017, 10:07:55 AM5/24/17
to AdWords API Forum

Hi Ivan

I checked the isHidden field and for all of the accounts it's set to false. SOAP logging is not enabled (as far as I know) and I'm using Python and C#. Can you help me with a guide? (for any language)

Thanks

Ivan Bautista

unread,
May 24, 2017, 1:50:33 PM5/24/17
to AdWords API Forum
Hi Luis, 

This is expected behavior. The reason why ManagedCustomerService.get is returning all your accounts even after setting ExcludeHiddenAccounts to true is because all your accounts are not hidden (isHidden = false) as you've mentioned.

As per blog post you've referenced earlier, to hide or unhide an account, you need to set isHidden field of the account's ManagedCustomerLink to true or false, respectively. You can achieve this using ManagedCustomerService.mutatelink which accepts LinkOperation.

As for enabling SOAP logging, you may refer to this guide for .NET and this guide for Python.

Luis C. Cruz

unread,
May 25, 2017, 12:56:57 PM5/25/17
to AdWords API Forum
That means that an account hidden from the web interface won't have the isHidden=true? only those accounts hidden through the API?

Ivan Bautista

unread,
May 25, 2017, 2:32:35 PM5/25/17
to AdWords API Forum
Hi Luis,

Whether you set the hidden status via AdWords API or AdWords UI, the isHidden field should be updated accordingly. That said, I tested hiding my test accounts both in AdWords API and AdWords UI and confirmed that isHidden field status updated accordingly.

Regards,
Ivan Bautista
AdWords API Team
Reply all
Reply to author
Forward
0 new messages