自
2025 年 9 月 8 日起,每个新订单项都需要声明是否会投放欧盟 (EU) 政治广告。Display & Video 360 API 和未提供声明的 SDF 上传操作将会失败。如需详细了解如何更新集成以进行此声明,请参阅我们的
弃用页面。
从 v2 迁移到 v3
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
上次更新日期:2023 年 10 月 31 日
迁移应用
从 v2 迁移到 v3 需要更新端点网址以调用 v3,并更新应用以纳入破坏性更改。
将 API 调用从 v2 更新为 v3
如需使用 v3 而非 v2,您需要更新请求以使用新的 v3 端点。
例如,如需使用 v2 调用 advertisers.get
方法,您可以使用以下网址:
GET https://displayvideo.googleapis.com/v2/advertisers/advertiserId
对于 v3,请将网址更新为以下网址:
GET https://displayvideo.googleapis.com/v3/advertisers/advertiserId
如果您使用客户端库向 API 发出请求,请使用最新版本的客户端库,并更新您的配置以使用 v3。
进行所需的更改
我们将在 v3 中引入一些破坏性更改。请查看以下说明,并根据您当前对 Display & Video 360 API 的使用情况进行必要的更改。
创建广告客户时,请添加所需的结算配置
billingConfig
现在是 Advertiser
资源中的必填字段。请更新您的 advertisers.create
请求,以验证是否已设置此字段。您可以通过新的 Partner
资源 billingConfig
字段为父级合作伙伴检索默认结算信息。
使用新字段控制优化型定位
新的布尔值 enableOptimizedTargeting
字段已取代 TargetingExpansionConfig
对象中的 targetingExpansionLevel
字段。
更新了广告订单集成,以使用新的 KPI 字段
新的 kpi
字段已取代 InsertionOrder
资源中的 performanceGoal
字段。此新字段使用 Kpi
对象替代 PerformanceGoal
对象,并使用新字段和枚举。
移除了对已废弃的服务和字段的引用
为与过往功能弃用保持一致,v3 中移除了各种实体:
其他更改
除了上述破坏性更改之外,v3 还引入了新功能。
在首次发布后添加到 v3 中的功能可在版本说明中找到。
邻近营业地点列表管理
在 v3 中,您可以全面管理相邻位置列表,从而使用 advertisers.locationLists.assignedLocations
服务创建和删除分配给 TARGETING_LOCATION_TYPE_PROXIMITY
LocationList
资源的位置。位置是使用 TARGETING_TYPE_POI
TargetingOption
资源的 ID 进行标识的。您可以使用 targetingTypes.targetingOptions.search
检索这些数据。
能够构建基于规则的自定义出价算法
在 v3 中,您可以使用 customBiddingAlgorithms
、media
、customBiddingAlgorithms.rules
服务构建和检索基于规则的自定义出价算法。
此功能目前处于 Beta 版阶段,仅供列入许可名单的合作伙伴使用。如果您的合作伙伴未列入许可名单,您的请求将返回错误。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eMigrating to v3 involves updating endpoint URLs and addressing breaking changes, such as replacing YouTube resource references and incorporating required billing configurations when creating advertisers.\u003c/p\u003e\n"],["\u003cp\u003eYouTube resources and their related targeting have been updated, requiring changes to resource and service calls, bidding strategy retrieval, and third-party measurement configuration.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ebillingConfig\u003c/code\u003e field is now mandatory when creating advertisers, and optimized targeting is controlled using the new \u003ccode\u003eenableOptimizedTargeting\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eInsertion order integration needs to utilize the new \u003ccode\u003ekpi\u003c/code\u003e field, and deprecated services and fields like \u003ccode\u003eadvertisers.manualTriggers\u003c/code\u003e and \u003ccode\u003ebillableOutcome\u003c/code\u003e should be removed.\u003c/p\u003e\n"],["\u003cp\u003eVersion 3 introduces new features like proximity location list management and the ability to build rule-based custom bidding algorithms (in beta for allowlisted partners).\u003c/p\u003e\n"]]],["To migrate to v3, update API request URLs from `/v2/` to `/v3/`, use the latest client library version, and adapt to breaking changes. Replace `YoutubeAdGroup` and `YoutubeAdGroupAd` with `AdGroup` and `AdGroupAd`. Update how YouTube bidding strategies and third-party measurements are handled. `billingConfig` is now required for new advertisers, and `enableOptimizedTargeting` replaces `targetingExpansionLevel`. `kpi` replaces `performanceGoal`. Deprecated services like `manualTriggers` and the `billableOutcome` field are removed. New features include proximity location list management and rule-based custom bidding algorithms.\n"],null,["# Migrate from v2 to v3\n\n| Display \\& Video 360 API is deprecated and will sunset on **October 7, 2025** . Migrate to [Display \\& Video 360 API v4](/display-video/api/reference/rest/v4) before sunset to avoid an interruption in service.\n\n*Last update: 2023-10-31*\n\nMigrate your application\n------------------------\n\nMigrating from v2 to v3 requires updating your endpoint URLs to call v3 and\nupdating your application to account for breaking changes.\n\n### Update your API calls from v2 to v3\n\nTo use v3 instead of v2, you need to update your requests to use new v3\nendpoints.\n\nFor example, to call the [`advertisers.get`](/display-video/api/reference/rest/v3/advertisers/get) method with v2, you would\nuse the following URL: \n\n GET https://displayvideo.googleapis.com/v2/advertisers/\u003cvar translate=\"no\"\u003eadvertiserId\u003c/var\u003e\n\nFor v3, update the URL to the following: \n\n GET https://displayvideo.googleapis.com/v3/advertisers/\u003cvar translate=\"no\"\u003eadvertiserId\u003c/var\u003e\n\nIf you are using a client library to make requests to the API, use the most\nrecent version of the client library and update your configuration to use v3.\n\n### Make required changes\n\nWe're introducing a number of breaking changes in v3. Review the following\ninstructions and make the required changes relevant to your existing use of the\nDisplay \\& Video 360 API.\n\n#### Update calls retrieving YouTube resources and their related targeting\n\n- `YoutubeAdGroup` and `YoutubeAdGroupAd` resources have been replaced by [`AdGroup`](/display-video/api/reference/rest/v3/advertisers.adGroups#AdGroup) and [`AdGroupAd`](/display-video/api/reference/rest/v3/advertisers.adGroupAds#AdGroupAd) resources. These new resources provide nearly identical information as the v2 resources but may use updated field names or enum types. In your integration, replace your uses of `YoutubeAdGroup` or `YoutubeAdGroupAd` resources with [`AdGroup`](/display-video/api/reference/rest/v3/advertisers.adGroups#AdGroup) and [`AdGroupAd`](/display-video/api/reference/rest/v3/advertisers.adGroupAds#AdGroupAd) resources and update calls to the following v2 services to the corresponding v3 service:\n - `advertisers.youtubeAdGroupAds` to [`advertisers.adGroupAds`](/display-video/api/reference/rest/v3/advertisers.adGroupAds#methods)\n - `advertisers.youtubeAdGroups` to [`advertisers.adGroups`](/display-video/api/reference/rest/v3/advertisers.adGroups#methods)\n - `advertisers.youtubeAdGroups.targetingTypes.assignedTargetingOptions` to [`advertisers.adGroups.targetingTypes.assignedTargetingOptions`](/display-video/api/reference/rest/v3/advertisers.adGroups.targetingTypes.assignedTargetingOptions#methods)\n- References to [`YoutubeAndPartnersBiddingStrategy`](/display-video/api/reference/rest/v3/BiddingStrategy#YoutubeAndPartnersBiddingStrategy) objects have been moved to a new [`youtubeAndPartnersBid`](/display-video/api/reference/rest/v3/BiddingStrategy#FIELDS.youtube_and_partners_bid) field within the general [`BiddingStrategy`](/display-video/api/reference/rest/v3/BiddingStrategy) object. The `biddingStrategy` field has been removed from the [`YoutubeAndPartnersSettings`](/display-video/api/reference/rest/v3/advertisers.lineItems#YoutubeAndPartnersSettings)object. Update your integration to retrieve the bidding strategy for YouTube line items or ad groups from the [`BiddingStrategy`](/display-video/api/reference/rest/v3/BiddingStrategy) object in the `bidStrategy` field in the [`LineItem`](/display-video/api/reference/rest/v3/advertisers.lineItems#LineItem.FIELDS.bid_strategy) or [`AdGroup`](/display-video/api/reference/rest/v3/advertisers.adGroups#AdGroup.FIELDS.bid_strategy) resource.\n- The `thirdPartyMeasurementSettings` field has been renamed to [`thirdPartyMeasurementConfigs`](/display-video/api/reference/rest/v3/advertisers.lineItems#YoutubeAndPartnersSettings.FIELDS.third_party_measurement_configs) in the [`YoutubeAndPartnersSettings`](/display-video/api/reference/rest/v3/advertisers.lineItems#YoutubeAndPartnersSettings) object and the `YoutubeAndPartnersThirdPartyMeasurementSettings` object has been renamed to [`ThirdPartyMeasurementConfigs`](/display-video/api/reference/rest/v3/advertisers.lineItems#ThirdPartyMeasurementConfigs). Update your integration to retrieve third-party measurement configuration information using the new field and object.\n\n#### Include required billing configurations when creating advertisers\n\n[`billingConfig`](/display-video/api/reference/rest/v3/advertisers#Advertiser.FIELDS.billing_config) is now a required field in the\n[`Advertiser`](/display-video/api/reference/rest/v3/advertisers#Advertiser) resource. Update your [`advertisers.create`](/display-video/api/reference/rest/v3/advertisers/create)\nrequests to verify that this field is set. The default billing information can\nbe retrieved for the parent partner through the new [`Partner`](/display-video/api/reference/rest/v3/partners#Partner)\nresource [`billingConfig`](/display-video/api/reference/rest/v3/partners#Partner.FIELDS.billing_config) field.\n\n#### Use new field to control optimized targeting\n\nA new boolean [`enableOptimizedTargeting`](/display-video/api/reference/rest/v3/TargetingExpansionConfig#FIELDS.enable_optimized_targeting) field has replaced the\n`targetingExpansionLevel` field in the [`TargetingExpansionConfig`](/display-video/api/reference/rest/v3/TargetingExpansionConfig)\nobject.\n\n#### Update insertion order integration to use new KPI field\n\nA new [`kpi`](/display-video/api/reference/rest/v3/advertisers.insertionOrders#InsertionOrder.FIELDS.kpi) field has replaced the `performanceGoal` field in\nthe [`InsertionOrder`](/display-video/api/reference/rest/v3/advertisers.insertionOrders#InsertionOrder) resource. This new field uses a [`Kpi`](/display-video/api/reference/rest/v3/advertisers.insertionOrders#Kpi)\nobject in place of the `PerformanceGoal` object and uses new fields and enums.\n\n#### Remove references to deprecated services and fields\n\nVarious entities have been removed in v3 to align with [past feature\ndeprecations](/display-video/api/deprecations#features):\n\n- The `advertisers.manualTriggers` service has been removed as [manual triggers\n have been deprecated](/display-video/api/deprecations#features.manual_triggers).\n- The `billableOutcome` field has been removed from the [`InsertionOrder`](/display-video/api/reference/rest/v3/advertisers.insertionOrders#InsertionOrder) resource as [outcome based buying has been\n deprecated](/display-video/api/deprecations#features.obb).\n\nAdditional changes\n------------------\n\nIn addition to the breaking changes listed above, v3 also introduces new\nfeatures.\n\n*Features added to v3 after the initial launch can be found in our [release\nnotes](/display-video/api/release-notes).*\n\n### Proximity location list management\n\nIn v3 you can fully manage [proximity location lists](//support.google.com/displayvideo/answer/2705812#lists), allowing you to\nuse the [`advertisers.locationLists.assignedLocations`](/display-video/api/reference/rest/v3/advertisers.locationLists.assignedLocations#methods) service to\ncreate and delete locations assigned to `TARGETING_LOCATION_TYPE_PROXIMITY`\n[`LocationList`](/display-video/api/reference/rest/v3/advertisers.locationLists#LocationList) resources. Locations are identified using the ID of\n`TARGETING_TYPE_POI` [`TargetingOption`](/display-video/api/reference/rest/v3/targetingTypes.targetingOptions#TargetingOption) resources. These can be\nretrieved using [`targetingTypes.targetingOptions.search`](/display-video/api/reference/rest/v3/targetingTypes.targetingOptions/search).\n\n### Ability to build rule-based custom bidding algorithms\n\nIn v3, you can build and retrieve rule-based custom bidding algorithms using the\n[`customBiddingAlgorithms`](/display-video/api/reference/rest/v3/customBiddingAlgorithms#methods), [`media`](/display-video/api/reference/rest/v3/media#methods),\n[`customBiddingAlgorithms.rules`](/display-video/api/reference/rest/v3/customBiddingAlgorithms.rules#methods) services.\n\nThis feature is in beta and only available to allowlisted partners. If your\npartner is not allowlisted, your request will return an error."]]