I am trying to get all the budgets from all billing accounts used under an 
MCC account. I saw that I should use the BudgetOrderService to get 
BudgetOrders, but it returns me an empty page. I can get the billing 
accounts from the BudgetOrderService->getBillingAccounts, what am I doing 
wrong? I am using the most recent version of the API and had nothing 
before, I am also whitelisted.

Here is my code (PHP) : 

 public function getBudgets(AdWordsUser $user) {
        // Get the service, which loads the required classes.
        $budgetOrderService = $user->GetService('BudgetOrderService', 

        // Create selector.
        $selector = new Selector();
        $selector->fields = array('id', 'spendingLimit', 'endDateTime');
        // Create paging controls.
        $selector->paging = new Paging(0, 
        do {
            // Make the get request.
            $page = $budgetOrderService->get($selector);

            print_r($page); // Here it says BudgetOrderPage Object ( 
[entries] => [totalNumEntries] => 0

            // Show the information for all budgets
            if (isset($page->entries)) {
                foreach ($page->entries as $budgetOrder) {
                    echo $budgetOrder->id;
                    echo $budgetOrder->spendingLimit;
                    echo $budgetOrder->endDateTime;
            // Advance the paging index.
            $selector->paging->startIndex += 
        } while ($page->totalNumEntries > $selector->paging->startIndex);

Also find us on our blog and Google+:

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
For more options, visit this group at
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to