Tuesday, September 10, 2013

How DFP’s new universal inventory affects API usage

Recently we announced how ad inventory shouldn’t be tied to a specific device and how inventory in DFP will be able to accommodate any campaign for any device. In this post we discuss how this affects the API.

API users are strongly encouraged to start using unified target platform enums when creating line items or ad units. For line items, this is the TargetPlatform.ANY enum (available in v201302 and onwards) and for ad units, the TargetPlatform.WEB enum.

Target platforms on existing line items and ad units will remain unchanged. You have the option to update existing line items and ad units to use unified target platforms, but you can’t switch back once you update. You may also still create line items with TargetPlatform.MOBILE or TargetPlatform.WEB and ad units with TargetPlatform.MOBILE through the API. They will work as previously but are deprecated and should not be used. Keep in mind that all new line items and ad units created via the web UI will have unified target platforms.

If you have questions or concerns regarding how DFP’s inventory unification affects API usage, please post them on our DFP API forums.