AI-generated Key Takeaways
-
Migrating to v2 requires updating endpoint URLs and adjusting your application for breaking changes.
-
Some targeting methods in v2 now use enum values instead of targeting option IDs.
-
Several existing methods and fields have been replaced or removed in v2, particularly within the
advertisers.lineItemsandcustomBiddingAlgorithmsservices. -
V2 introduces read-only access to YouTube line items and new methods for bulk operations and duplication within the
advertisers.lineItemsservice to improve performance. -
Partial write access is now available for a subset of targeting settings on Insertion Order resources in v2.
Last update: 2022-12-06
Migrate your application
Migrating from v1 to v2 requires updating your endpoint URLs to call v2 and updating your application to account for breaking changes.
Update your API calls from v1 to v2
To use v2 instead of v1, you need to update your requests to use new v2 endpoints.
For example, to call the advertisers.get method with v1, you would
use the following URL:
GET https://displayvideo.googleapis.com/v1/advertisers/advertiserId
For v2, update the URL to the following:
GET https://displayvideo.googleapis.com/v2/advertisers/advertiserId
If you are using a client library to make requests to the API, use the most recent version of the client library and update your configuration to use v2.
Make required changes
We’re introducing a number of breaking changes in v2. Review the following instructions and make the required changes relevant to your existing use of the Display & Video 360 API.
Update calls to targeting methods
Some targeting types are now assigned using enum values instead of targeting option IDs. For example, tablet devices are now targeted directly with the
DEVICE_TYPE_TABLETDeviceTypeenum, rather than the targeting option ID from thetargetingTypes.targetingOptionsservice. String versions of these enums are represented in the newassignedTargetingOptionIdAliasfield in theseAssignedTargetingOptionresources and can be used when retrieving or deleting existing targeting. TheassignedTargetingOptionIdvalue of theseAssignedTargetingOptionresources have not changed.Update calls managing the following targeting types to use enum values:
TARGETING_TYPE_AGE_RANGETARGETING_TYPE_CONTENT_INSTREAM_POSITIONTARGETING_TYPE_CONTENT_OUTSTREAM_POSITIONTARGETING_TYPE_DEVICE_TYPETARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSIONTARGETING_TYPE_ENVIRONMENTTARGETING_TYPE_EXCHANGETARGETING_TYPE_GENDERTARGETING_TYPE_HOUSEHOLD_INCOMETARGETING_TYPE_NATIVE_CONTENT_POSITIONTARGETING_TYPE_OMIDTARGETING_TYPE_PARENTAL_STATUSTARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSIONTARGETING_TYPE_VIDEO_PLAYER_SIZETARGETING_TYPE_VIEWABILITY
The method
advertisers.lineItems.bulkEditLineItemAssignedTargetingOptionshas been replaced by the methodadvertisers.lineItems.bulkEditAssignedTargetingOptions.The method
advertisers.lineItems.bulkListLineItemAssignedTargetingOptionshas been replaced by the methodadvertisers.lineItems.bulkListAssignedTargetingOptions.Update calls managing
TARGETING_TYPE_PROXIMITY_LOCATION_LISTto use a set radius size and distance unit instead of aProximityRadiusRangeenum value.Targeting methods that retrieve or edit targeting options across multiple targeting types under a single parent resource have been renamed.
Update calls to the following methods to use their new names:
advertisers.bulkEditAdvertiserAssignedTargetingOptionstoadvertisers.editAssignedTargetingOptionsadvertisers.bulkListAdvertiserAssignedTargetingOptionstoadvertisers.listAssignedTargetingOptionsadvertisers.campaigns.bulkListCampaignAssignedTargetingOptionstoadvertisers.campaigns.listAssignedTargetingOptionsadvertisers.insertionOrders.bulkListInsertionOrderAssignedTargetingOptionstoadvertisers.insertionOrders.listAssignedTargetingOptionspartners.bulkEditPartnerAssignedTargetingOptionstopartners.editAssignedTargetingOptions
Update calls to advertisers.lineItems service
- The field
inventorySourceIdshas been removed. Manage inventory source assignment usingAssignedTargetingOptionresources ofTARGETING_TYPE_INVENTORY_SOURCE. The following
LineItemWarningMessageenum values have been deprecated in v2 and will no longer be surfaced inLineItem.warningMessages:NO_POSITIVE_AUDIENCE_LIST_TARGETEDAPP_INSTALL_NO_CONVERSION_PIXELTARGETING_REVOKED_OR_CLOSED_USER_LISTAPP_INSTALL_NO_OPTIMAL_BIDDING_STRATEGYCREATIVE_SIZE_NOT_IN_USE_FOR_TARGETED_DEALSNO_CREATIVE_FOR_TARGETED_DEALSTARGETING_DEPRECATED_GEO_TARGET
The
triggerIdfield has been removed from theLineItemFlightobject and theLINE_ITEM_FLIGHT_DATE_TYPE_TRIGGERvalue has been removed from theLineItemFlightDateTypeenum type. v2 does not support setting line items to spend based on the activation of manual triggers.
Update calls to customBiddingAlgorithms service
The customBiddingAlgorithmState and modelReadiness
fields have been replaced with the modelDetails
field, which provides the readiness
and suspension states of the existing algorithm
model for each advertiser that has access through a list of
CustomBiddingModelDetails objects.
Additional changes
In addition to the breaking changes listed above, v2 also introduces new features.
Features added to v2 after the initial launch can be found in our release notes.
Read-only access to YouTube line items
In v2, YouTube line items and their targeting settings can be retrieved using
the advertisers.lineItems and
advertisers.lineItems.targetingTypes.assignedTargetingOptions
services, respectively. The API provides read-only access, meaning that any
attempted write requests made to these line items will return an error. YouTube
line items will be of one of the following LineItemType
values:
LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_ACTIONLINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_AUDIOLINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_NON_SKIPPABLELINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_NON_SKIPPABLE_OVER_THE_TOPLINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_REACHLINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_REACH_OVER_THE_TOPLINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_SIMPLELINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_SIMPLE_OVER_THE_TOPLINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_VIDEO_SEQUENCE
New methods enabling better performance
In v2, the advertisers.lineItems service provides new
methods to use in place of batched requests for better
performance and reduced quota consumption:
- You can use
advertisers.lineItems.bulkUpdateto set the same field values for multiple line items. Only updates to theentityStatusfield are currently supported. - You can use
advertisers.lineItems.bulkEditAssignedTargetingOptionsto add or remove the same assigned targeting options across multiple line items. - You can use
advertisers.lineItems.bulkListAssignedTargetingOptionsto list assigned targeting options across multiple line items. - You can use
advertisers.lineItems.duplicateto create a duplicate of an existing line item within the same insertion order, copying over all configurations and targeting settings.
Partial write access for insertion order targeting
In v2, you can edit a subset targeting settings for InsertionOrder
resources using new create and
delete methods in the
advertisers.insertionOrders.targetingTypes.assignedTargetingOptions
service. The following targeting types can be fully managed at the insertion
order level:
TARGETING_TYPE_AGE_RANGETARGETING_TYPE_BROWSERTARGETING_TYPE_CATEGORYTARGETING_TYPE_CHANNELTARGETING_TYPE_DEVICE_MAKE_MODELTARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSIONTARGETING_TYPE_ENVIRONMENTTARGETING_TYPE_GENDERTARGETING_TYPE_KEYWORDTARGETING_TYPE_LANGUAGETARGETING_TYPE_NEGATIVE_KEYWORD_LISTTARGETING_TYPE_OPERATING_SYSTEMTARGETING_TYPE_PARENTAL_STATUSTARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSIONTARGETING_TYPE_VIEWABILITY