Hi there,
Thanks for the response!
I added the asset_group.status to the AND part of the query, and it started
to work. It seems like it was pulling in an asset group with status
"Removed" before, and that's why the asset group IDs didn't match, along
with the listing group status that was showing in the browser.
Here was the new response:
SearchPager<results {
asset_group_listing_group_filter {
resource_name:
"customers/9084369246/assetGroupListingGroupFilters/6476687670~11192855075"
type_: UNIT_INCLUDED
}
asset_group_product_group_view {
resource_name:
"customers/9084369246/assetGroupProductGroupViews/6476687670~11192855075"
}
asset_group {
resource_name: "customers/9084369246/assetGroups/6476687670"
name: "MDR"
status: ENABLED
}
campaign {
resource_name: "customers/9084369246/campaigns/20510025794"
id: 20510025794
}
}
field_mask {
paths: "asset_group.name"
paths: "asset_group.resource_name"
paths: "asset_group_listing_group_filter.resource_name"
paths: "asset_group_listing_group_filter.type"
paths: "campaign.id"
paths: "asset_group.status"
}
>
SELECT
asset_group.name,
asset_group.resource_name,
asset_group_listing_group_filter.resource_name,
asset_group_listing_group_filter.type,
campaign.id,
asset_group.status
FROM asset_group_product_group_view
WHERE campaign.id = {campaign_id}
AND asset_group.status = 'ENABLED'
AND asset_group_listing_group_filter.case_value.product_item_id.value = '{
product_id}'
AND asset_group.resource_name NOT IN ('{resource_name}')
LIMIT 1
On Monday, March 4, 2024 at 1:07:35 AM UTC-8 Google Ads API Forum Advisor
wrote:
> Hi Reid,
>
> Thank you for getting back to us.
>
> Kindly note that we are able to retrieve the type as 'UNIT_EXCLUDED' for
> the asset group ID '6480676138' via the Google Ads API. I would suggest you
> to try the below query :
>
>
>
> {
> "query": "SELECT asset_group.name, asset_group.resource_name,
> asset_group_listing_group_filter.resource_name,
> asset_group_listing_group_filter.type, campaign.id, asset_group.status FROM
> asset_group_product_group_view WHERE campaign.id = '20520625833' AND
> asset_group_listing_group_filter.case_value.product_item_id.value =
> 'wh1000xm4/b' AND asset_group_listing_group_filter.type = 'UNIT_EXCLUDED'"
> }
>
> Also, you can use Query Builder
> <https://developers.google.com/google-ads/api/fields/v15/asset_group_product_group_view>
>
> to create your query and Query Validator
> <https://developers.google.com/google-ads/api/fields/v15/query_validator>
> to validate your query. Also,kindly try making the request to the search or
> searchStream endpoint to retrieve the results.
>
>
> This message is in relation to case "ref:!00D1U01174p.!5004Q02rzViA:ref"
>
> Thanks,
>
> [image: Google Logo] Google Ads API Team
>
>
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/768502fe-172d-4689-ad0a-cb6460435ee8n%40googlegroups.com.