The only account_budget active in my google-ads management UI backend is as below showed (as attachment gg1024.png showed):
{
"account_id":xxxxxxxx,
"account_budget_id":xxxxxxxxxx,
"account_budget_name":"BlueFocus International Limited - 2018年12月27日",
"account_budget_status":"APPROVED",
"approved_start_date_time":20181227,
"approved_end_date_time":null,
"approved_end_time_type":"FOREVER",
"approved_spending_limit_type":"UNSPECIFIED",
"approved_spending_limit_micros":1000,
"adjusted_spending_limit_micros":1200,
"amount_served_micros":12230
}
But when I want to get all account_budgets under my account , I got results below, I‘m using GASQL
query = """
SELECT
customer.id,
account_budget.id,
account_budget.name,
account_budget.status,
account_budget.approved_end_date_time,
account_budget.approved_start_date_time,
account_budget.approved_spending_limit_micros,
account_budget.adjusted_spending_limit_micros,
account_budget.approved_spending_limit_type,
account_budget.approved_end_time_type,
account_budget.amount_served_micros,
account_budget.pending_proposal.creation_date_time,
account_budget.pending_proposal.proposal_type,
account_budget.resource_name,
account_budget.total_adjustments_micros,
billing_setup.payments_account_info.payments_account_id
FROM
account_budget
WHERE account_budget.approved_end_time_type = 'FOREVER'
AND account_budget.status = 'APPROVED'
ORDER BY
account_budget.approved_start_date_time DESC
LIMIT
100
"""
[
{
"account_id":xxxxxx ,
"account_budget_id":xxxxxx ,
"account_budget_name":"BlueFocus International Limited - 2018年12月27日",
"account_budget_status":"APPROVED",
"approved_start_date_time":20181227,
"approved_end_date_time":null,
"approved_end_time_type":"FOREVER",
"approved_spending_limit_type":"UNSPECIFIED",
"approved_spending_limit_micros":1000,
"adjusted_spending_limit_micros":1200,
"amount_served_micros":12230
},
{
"account_id":xxxxxx ,
"account_budget_id":mmmmm ,
"account_budget_name":"",
"account_budget_status":"APPROVED",
"approved_start_date_time":20170814,
"approved_end_date_time":null,
"approved_end_time_type":"FOREVER",
"approved_spending_limit_type":"INFINITE",
"approved_spending_limit_micros":0,
"adjusted_spending_limit_micros":-1,
"amount_served_micros":123456
}
]
How can I get the active account_budget only?