BudgetOrderService does not return Billing Accounts

53 views
Skip to first unread message

Suresh Kumar Shenbagam

unread,
Mar 5, 2020, 4:44:58 AM3/5/20
to AdWords API and Google Ads API Forum
Hi,

I am trying to get Billing Accounts using BudgetOrderService interface.


I logged in with the manger account.  And before creating budget order service instance, I set the client customer id in session. what am I doing wrong here?

session.setClientCustomerId("xxx-xxx-xxxx");
BudgetOrderServiceInterface bos = adWordsServices.get(session, BudgetOrderServiceInterface.class);
BillingAccount accts[] = bos.getBillingAccounts();
System.out.println("accts ==>"+accts);  -- this always returns null
if (accts != null) {
for (BillingAccount acct : accts) {
System.out.println("billing acct ==>" + acct); 
}
}

But, I am able to read the Budget Orders thru selector

int offset = 0;
 int PAGE_SIZE = 500;

SelectorBuilder selectorBuilder = new SelectorBuilder()
.fields(BudgetOrderField.BillingAccountId, BudgetOrderField.BillingAccountName,
BudgetOrderField.BudgetOrderName, BudgetOrderField.Id, BudgetOrderField.PoNumber,
BudgetOrderField.PrimaryBillingId, BudgetOrderField.SecondaryBillingId)
.in(BudgetOrderField.BillingAccountName, "Test Billing Account").offset(offset).limit(PAGE_SIZE);
BudgetOrderPage page;

do {
page = bos.get(selectorBuilder.build());

if (page.getEntries() != null) {
// Create account tree nodes for each customer.
for (BudgetOrder bo : page.getEntries()) {
System.out.println(bo.getBillingAccountId());
System.out.println(bo.getBillingAccountName());
System.out.println(bo.getBudgetOrderName());
System.out.println("------");
System.out.println(bo.getId());
System.out.println(bo.getPoNumber());
System.out.println(bo.getPrimaryBillingId());
System.out.println(bo.getSecondaryBillingId());
System.out.println(bo.getLastRequest());
System.out.println(bo.getStartDateTime());
System.out.println(bo.getEndDateTime());
System.out.println(bo.getSpendingLimit());
System.out.println(bo.getTotalAdjustments());
}
}
offset += PAGE_SIZE;
selectorBuilder.increaseOffsetBy(PAGE_SIZE);
} while (offset < page.getTotalNumEntries());


Can anyone help me to fix this? If required, I can send the MCC id and client customer id.


Suresh

Google Ads API Forum Advisor Prod

unread,
Mar 5, 2020, 1:59:26 PM3/5/20
to suresh.s...@cloudsense.com, adwor...@googlegroups.com

Hello Suresh,

Thank you for reaching out. Please refer to this forum post for the latest change related to retrieving billing accounts using the BudgetOrderService. As per this post, any request made that targets a Google Ads Manager account instead of a Google Ads Client account will return an empty result as intended for all existing versions of both Google Ads and AdWords APIs. If you are specifying the client customer id for the request and still getting empty results, could you please share the complete request and response logs along with the client customer id for further investigation on our end?

P. S. Please use Reply privately to author option while sharing the details for investigation.

Regards,
Nikisha Patel, Google Ads API Team



ref:_00D1U1174p._5001UXUB3u:ref

Suresh Kumar Shenbagam

unread,
Mar 10, 2020, 4:48:24 AM3/10/20
to AdWords API and Google Ads API Forum
Hi,

I have shared the SOAP logs privately. Could you please provide an update?

Suresh

Google Ads API Forum Advisor Prod

unread,
Mar 11, 2020, 11:31:55 AM3/11/20
to suresh.s...@cloudsense.com, adwor...@googlegroups.com
Hi Suresh,

Apologies for the late response! We're continuing to look into this issue and will get back to with more information as soon as possible.

Best,
Ben Karl, Google Ads API Team

ref:_00D1U1174p._5001UXUB3u:ref

Suresh Kumar Shenbagam

unread,
Mar 13, 2020, 11:56:28 AM3/13/20
to AdWords API and Google Ads API Forum
Hi,

Can you please provide an update on this issue ?

Suresh

Google Ads API Forum Advisor Prod

unread,
Mar 16, 2020, 4:17:38 PM3/16/20
to suresh.s...@cloudsense.com, adwor...@googlegroups.com
Hi Suresh,

Thank you for your patience, and apologies for the delayed response.

The issue here is that the account hasn't been set up for consolidated billing. In order to set that up, you should take a look at this Help Center page and follow the instructions towards the bottom of the page.

Thanks,
Ben, Google Ads API Team

ref:_00D1U1174p._5001UXUB3u:ref
Reply all
Reply to author
Forward
0 new messages