CustomerService in v201607

154 views
Skip to first unread message

Oliver

unread,
Jul 29, 2016, 8:11:14 AM7/29/16
to AdWords API Forum
The latest API version v201607 removed the CustomerService.get() method and replaced it with getCustomers().

I'm a bit puzzled by how one can achieve the same functionality.

If an account is authenticated but no customerId is set (because it's unknown), the old get() method used to return the root account details (i.e. account at top of hierarchy).  The new method will return all the accounts that are accessible by the authenticated user.  So how would one know what the root MCC is in this case?

Oliver



Shwetha Vastrad (AdWords API Team)

unread,
Jul 29, 2016, 5:48:36 PM7/29/16
to AdWords API Forum
Hi Oliver, 

If you do not specify a clientCustomerId in the request header, the getCustomers method will return the account details of the authenticated customer. If the canManageClients field is true in the returned Customer object, then the returned account is a Manager account. 

I hope this helps. 

Regards,
Shwetha, AdWords API Team.

Oliver

unread,
Jul 30, 2016, 3:00:22 AM7/30/16
to AdWords API Forum
Hi Shwetha,

The documentation says something different from what you mentioned.  It says in this page:  https://developers.google.com/adwords/api/docs/guides/accounts-overview#customerservice

In v201605 and earlier, if no clientCustomerId is specified, then the response will contain a single entry for the authenticated account. You must specify a clientCustomerId when authenticating as a manager account to obtain info for a specific account.


Starting with v201607, if no clientCustomerId is specified, then the response will contain multiple entries if more than one account is directly accessible by the authenticated account. If you only want results for a single account, you must specify the clientCustomerId in your request.



So my question is, if we don't specify a customerId (which we can't if we just authenticated a new user and we don't know his Id), then we will get back multiple accounts.  How do we know which account is the root account?


Oliver
Message has been deleted

Oliver

unread,
Jul 31, 2016, 9:53:30 AM7/31/16
to AdWords API Forum
Further to my last post pointing to what the documentation said, we tested this functionality and it seems the documentation is not correct.

Without setting the clientCustomerId, we still get back one entry only when calling the getCustomers() method for a Manager account.  It seems the new getCustomers() method work exactly the same as the old get() method.

Can you please clarify if we missed something? or what exactly has changed?

Oliver

Michael Cloonan (AdWords API Team)

unread,
Aug 1, 2016, 10:40:55 AM8/1/16
to AdWords API Forum
Hello,

Currently, this functions exactly as you have seen, where it will only return the single account you're authenticating as. This does mean that it functions effectively the same way as the old get method. However, the new API does allow us to make future improvements without having to change the API WSDL in the future.

Any changes to functionality will be announced on our blog.

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