BudgetOrderService filter by dates

46 views
Skip to first unread message

artem.bik...@gmail.com

unread,
Nov 18, 2015, 3:15:34 AM11/18/15
to AdWords API Forum
Hello.
I create budget order
{
 
:billing_account_id=>"2069-1739-3404-9839",
 
:id=>199191264,
 
:last_request=> {
   
:status=>"UNDER_REVIEW",
   
:spending_limit=>{:comparable_value_type=>"Money", :micro_amount=>100000000},
   
:start_date_time=>"20151118 094933 Europe/Moscow",
   
:end_date_time=>"20151119 000000 Europe/Moscow"
 
}
}


and try to find them by selector
  fields: [ [0] "id" ], 
  predicates: [ 
    { field: "start_date_time", operator: "EQUALS", values: [ [0] "20151118 111027 Europe/Moscow" ] },
    { field: "end_date_time", operator: "EQUALS", values: [ [0] "20151119 000000 Europe/Moscow" ] } 
  ] 
}
but I get 
AdwordsApi::V201509::BudgetOrderService::ApiException: [InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro]

If I try to find by id then I get same error
selector:
  :fields => [ "id" ], 
  :predicates => [ 
    { :field => "id", :operator => "IN", :values => [ 199191264 ] } 
  ] 
}


Anthony Madrigal

unread,
Nov 18, 2015, 4:50:15 PM11/18/15
to AdWords API Forum
Hi,

Is this error still occurring to you? The InternalApiError happens sometimes when there is trouble with our server. If you are still having these problems, please let me know so that I can further investigate. 

Regards,
Anthony
AdWords API Team

artem.bik...@gmail.com

unread,
Nov 19, 2015, 12:38:01 AM11/19/15
to AdWords API Forum
Yes, it's still happen.
Additional. I create new BudgetOrder (id=229891455) and try get by id them and get 
content-type: text/xml; charset=UTF-8, date: Thu, 19 Nov 2015 05:35:19 GMT, expires: Thu, 19 Nov 2015 05:35:19 GMT, cache-control: private, max-age=0, x-content-type-options: nosniff, x-frame-options: SAMEORIGIN, x-xss-protection: 1; mode=block, content-length: 569, server: GSE
AdwordsApi::V201509::BudgetOrderService::ApiException: [InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro]



четверг, 19 ноября 2015 г., 0:50:15 UTC+3 пользователь Anthony Madrigal написал:

Josh Radcliff (AdWords API Team)

unread,
Nov 19, 2015, 1:30:04 PM11/19/15
to AdWords API Forum
Hi,

In your predicate, please make sure you are using the selector field names as specified here. Specifically, you'll want to use StartDateTime and EndDateTime instead of start_date_time and end_date_time.

Thanks,
Josh, AdWords API Team

artem.bik...@gmail.com

unread,
Nov 20, 2015, 1:20:46 AM11/20/15
to AdWords API Forum
But I try to use field 'id' and it doesn't work too.

четверг, 19 ноября 2015 г., 21:30:04 UTC+3 пользователь Josh Radcliff (AdWords API Team) написал:

Josh Radcliff (AdWords API Team)

unread,
Nov 20, 2015, 10:25:01 AM11/20/15
to AdWords API Forum
Hi,

The field id is not working because it also is not one of the selector field names listed here. When specifying fields to select or fields in your predicates, make sure you are using one of the Field values from that table. Note that the strings are case sensitive, so for the ID field you should use Id instead of id.

Thanks,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages