Hi,
I am receiving only the parent-level ad units, even though they have children. I applied a filter using the parentId, but the API is returning only partial information.
Response from API:
Ad Units: {
totalResultSetSize: 2,
startIndex: 0,
results: [
{
id: '141680780',
hasChildren: true,
name: 'ca-pub-1858262200976324: Astro Awani Network SDN BHD',
description: '',
targetWindow: 'TOP',
status: 'ACTIVE',
adUnitCode: '142680780',
isInterstitial: false,
isNative: false,
isFluid: false,
explicitlyTargeted: false,
adSenseSettings: [Object],
adSenseSettingsSource: 'UNKNOWN',
lastModifiedDateTime: [Object],
smartSizeMode: 'NONE',
isSetTopBoxEnabled: false
},
{
id: '141680900',
parentId: '141680780',
hasChildren: true,
name: 'ca-pub-1858262200976324',
description: 'Astro Awani Network SDN BHD',
targetWindow: 'BLANK',
status: 'ACTIVE',
adUnitCode: 'ca-pub-1858262200976324',
isInterstitial: false,
isNative: false,
isFluid: false,
explicitlyTargeted: false,
adSenseSettings: [Object],
adSenseSettingsSource: 'DIRECTLY_SPECIFIED',
lastModifiedDateTime: [Object],
smartSizeMode: 'NONE',
isSetTopBoxEnabled: false
}
]
}
const statement = {
query: "WHERE status = 'ACTIVE' AND parentId = '
141680780 '"
};
try {
// Fetch ad units using the InventoryService
const adUnits = await inventoryService.getAdUnitsByStatement({ filterStatement: statement });
NOTE: In GAM UI I can see 21831981819 this parent id but if I apply same filter in query not receiving any response from api. (anything related to service account permissions)
Thanks,
Sai Teja