Thursday, November 29, 2012

Announcing v201211 of the DFP API

Today, we are pleased to announce the launch of v201211 of the DFP API. The focus of this version is on enhancing our API so that you, as a developer, have more options available when encountering API issues. In particular, we’ve added a number of new objects that will help you avoid nondescript SERVER_ERRORs and help work with new features. We’ve also launched the new creative wrapper service and other smaller features, which can all be found on our release notes page.

Improved error handling

Starting today, we’re offering two new enhancements to the API that will make it easier to handle exceptions when calls don’t go as planned. The first addition is the UnsupportedCreative type. Previously, if you tried to fetch a new type of creative using an older version of the API, you might receive a SERVER_ERROR, a “fault occurred while processing” message, or a 502 HTTP error status code. Now, when the API detects that you are fetching a creative that wasn't defined when your API version was released, it will return the creative as an UnsupportedCreative. The returned creative will expose all the fields of the base type and what the unsupported creative type was. You can then search our release notes for announcements of any new creative types to determine which version you should upgrade to, or use the forum to let us know that you are waiting on a new creative type to be released in the next API version.

The second enhancement is the addition of a new enum choice, UNKNOWN, to all existing ApiError types. When you receive an ApiError with UNKNOWN, you’ll be able to log that exception separately (by examining the error in your try/catch blocks) and then let us know on the forum that you received this error so we can help you narrow down what the true cause was. In the future, we’ll be adding UNKNOWN to a few more enums so that if your API version can’t express the actual enum value, you’ll still be able to process as much as you can about the object without having a severe failure.

Note: Both UnsupportedCreative and the UNKNOWN enum choice have been added to all API versions, thus changing the WSDLs for all versions and services. A failed API call would most likely not give you any information; these new changes give you the option to regenerate your client code or download a new version of our client libraries (available soon) to receive the benefits of these changes on existing versions. In versions prior to v201211, unsupported creatives will be filtered instead of returned.

Deprecation reminder

As we mentioned in September, v201108, v201111, and v201201 have been deprecated and will be turned off on December 10th. If you have not upgraded to a newer version yet, now would be a great time to do so. We’ll be more than happy to help with any specific questions on our forum.

Upcoming DFP Google Developers Live (GDL) sessions

On December 5th, we’ll be hosting another GDL session. We’ll be interviewing a few DFP API developers about their integrations and if they have any tips for other developers.

If you haven’t yet, follow us on our Ads Developer Google+ page. We'll be publishing some great tips soon there and would love to hear your requests.

 - , DFP API Team