Hi,
We are trying to search inventory using searchInventory API in InventorySearchService. Our aim is to search the inventory for AdSize 50 x 60.
We are using following code.
=================
YahooAPTClient aptClient = new YahooAPTClient(username, password, license, accountID, endPoint, version);
TargetingAttributeType?[] dimensionList = aptClient.TargetingDictionaryService.getSupportedTargetingAttributeTypes();
TargetingAttributeValue[] valueList = aptClient.TargetingDictionaryService.getTargetingAttributes(TargetingAttributeTy
pe.AdSize, true, 0, 344);
Placement pc = new Placement();
pc.adAttributes = new AdAttributes();
pc.adAttributes.adSizeIDs = new long?[] { valueList[0].ID };
pc.accountID = accountID;
pc.startDate = DateTime.Now;
pc.startDateSpecified = true;
pc.contentTargetingAttributes = new ContentTargetingAttributes();
Inventory inv = aptClient.InventorySearchService.searchInventory(pc, null, null, null, null, false);
=========================
Call to searchInventory(..) is giving us error
"A required field is missing or empty: placementTarget. "
Now to solve this error we added following code before calling searchInventory(..) API
==============
pc.contentTargetingAttributes.placementTarget = new PlacementTarget();
pc.contentTargetingAttributes.placementTarget.ID = "234343"; // What should be value for this ID?
pc.contentTargetingAttributes.placementTarget.type = PlacementTargetType.SelfManagedPublisher;
pc.contentTargetingAttributes.placementTarget.typeSpecified = true;
Inventory inv = aptClient.InventorySearchService.searchInventory(pc, null, null, null, null, false);
================
Our problem now is what should be value of following
pc.contentTargetingAttributes.placementTarget.ID = "234343"; // What should be value for this ID?
From where to get placementTargetID ?
Are we using the right API, can anyone help or is there any sample on using InventorySearchService.searchInventory(...) API.
