Get enabled clients only from ListAccessibleCustomersResponse
I am using google ads java sdk to get a list of accessible customer accounts as shown below:
ListAccessibleCustomersResponse response = customerService .listAccessibleCustomers(ListAccessibleCustomersRequest.newBuilder().build());
I am wondering if I can I can filter in order to only get enabled accounts.
The account structure you can get via the ListAccessibleCustomers API method is designed to show only account hierarchy. With the resource names returned via this API call you would need to make individual SearchStream calls using the Google Query Language to get the details and status of an individual customer.
https://developers.google.com/google-ads/api/fields/v10/customer_query_builder
SELECT customer.id, customer.resource_name, customer.status, customer.currency_code FROM customer WHERE customer.resource_name = 'customers/1234567890'I would anticipate this being possible in the future but the ability to get this level of data on a Customer is relatively new for the Ads API.