自
2025 年 9 月 8 日起,每个新订单项都需要声明是否会投放欧盟 (EU) 政治广告。Display & Video 360 API 和未提供声明的 SDF 上传操作将会失败。如需详细了解如何更新集成以进行此声明,请参阅我们的
弃用页面。
从 v3 迁移到 v4
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
上次更新日期:2025 年 7 月 31 日
迁移应用
从 v3 迁移到 v4 需要更新端点网址以调用 v4,并更新应用以应对重大变更。
将 API 调用从 v3 更新到 v4
如需使用 v4 而不是 v3,请更新您的请求以使用新的 v4 端点。
例如,要使用 v3 调用 advertisers.get
方法,请使用以下网址:
GET https://displayvideo.googleapis.com/v3/advertisers/advertiserId
对于 v4,请将网址更新为以下网址:
GET https://displayvideo.googleapis.com/v4/advertisers/advertiserId
如果您使用客户端库向 API 发出请求,请使用最新版本的客户端库,并更新配置以使用 v4。
进行所需的更改
我们将在 v4 中引入多项破坏性变更。请查看以下说明,并根据您目前对 Display & Video 360 API 的使用情况进行必要的更改。
FirstAndThirdPartyAudience
资源已替换为 FirstPartyAndPartnerAudience
资源。
此更改要求您更新以下内容:
更新现有的广告组批量名单定位请求
advertisers.adGroups.bulkListAdGroupAssignedTargetingOptions
已重命名为 advertisers.adGroups.bulkListAssignedTargetingOptions
。
更新现有请求以使用新方法名称。
创建广告订单时,请添加优化目标
optimizationObjective
现在是 InsertionOrder
资源中的必填字段。更新您的 advertisers.insertionOrders.create
请求,以验证是否已设置此字段。
移除对广告素材资源字段 publisherReviewStatuses
的引用
publisherReviewStatuses
字段已从 Creative
资源下的 ReviewStatusInfo
对象中移除,此前该字段已于 2024 年 6 月被弃用。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-31。
[null,null,["最后更新时间 (UTC):2025-07-31。"],[],["To migrate to v4, update endpoint URLs to v4 and adjust for breaking changes. `FirstAndThirdPartyAudience` resources are replaced by `FirstPartyAndPartnerAudience`. `advertisers.adGroups.bulkListAdGroupAssignedTargetingOptions` is now `bulkListAssignedTargetingOptions`. `optimizationObjective` is required in `InsertionOrder` resource creation. Remove all requests for campaign or insertion order targeting. Also, remove all references to the `publisherReviewStatuses` field in the `Creative` resource. Finally update `FirstAndThirdPartyAudienceType` and `AudienceType` references.\n"],null,["# Migrate from v3 to v4\n\n*Last update: 2025-07-31*\n\nMigrate your application\n------------------------\n\nMigrating from v3 to v4 requires updating your endpoint URLs to call v4 and\nupdating your application to account for breaking changes.\n\n### Update your API calls from v3 to v4\n\nTo use v4 instead of v3, update your requests to use new v4 endpoints.\n\nFor example, to call the [`advertisers.get`](/display-video/api/reference/rest/v4/advertisers/get) method with v3, use the\nfollowing URL: \n\n GET https://displayvideo.googleapis.com/v3/advertisers/\u003cvar translate=\"no\"\u003eadvertiserId\u003c/var\u003e\n\nFor v4, update the URL to the following: \n\n GET https://displayvideo.googleapis.com/v4/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 v4.\n\n### Make required changes\n\nWe're introducing a number of breaking changes in v4. Review the following\ninstructions and make the required changes relevant to your existing use of the\nDisplay \\& Video 360 API.\n\n#### Update calls regarding first- and third-party audience resources and related targeting\n\n`FirstAndThirdPartyAudience` resources have been replaced by\n`FirstPartyAndPartnerAudience` resources.\n\nThis change requires you to update the following:\n\n- References to `FirstAndThirdPartyAudience` resources to use the new [`FirstPartyAndPartnerAudience`](/display-video/api/reference/rest/v4/firstPartyAndPartnerAudiences#FirstPartyAndPartnerAudience) resource.\n- Existing requests to methods in the v3 service `firstAndThirdPartyAudiences` to the new v4 service [`firstPartyAndPartnerAudiences`](/display-video/api/reference/rest/v4/firstPartyAndPartnerAudiences#methods).\n- Expectations of the default page size for [`firstPartyAndPartnerAudiences.list`](/display-video/api/reference/rest/v4/firstPartyAndPartnerAudiences/list) requests from 100 to 5000 items.\n- References to the v3 `firstAndThirdPartyAudienceType` field to the new v4 [`firstPartyAndPartnerAudienceType`](/display-video/api/reference/rest/v4/firstPartyAndPartnerAudiences#FirstPartyAndPartnerAudience.FIELDS.first_party_and_partner_audience_type) field, using the new [`FirstPartyAndPartnerAudienceType`](/display-video/api/reference/rest/v4/firstPartyAndPartnerAudiences#FirstPartyAndPartnerAudienceType) enum type, with old values corresponding to the following new values:\n - `FIRST_AND_THIRD_PARTY_AUDIENCE_TYPE_FIRST_PARTY` to `TYPE_FIRST_PARTY`\n - `FIRST_AND_THIRD_PARTY_AUDIENCE_TYPE_THIRD_PARTY` to `TYPE_PARTNER`\n- References to [`AudienceType`](/display-video/api/reference/rest/v4/firstPartyAndPartnerAudiences#AudienceType) enum value `LICENSED` to instead use\n one of the following new, more specific values:\n\n - `THIRD_PARTY`\n - `COMMERCE`\n - `LINEAR`\n- References to [`AssignedTargetingOption`](/display-video/api/reference/rest/v4/advertisers.adGroups.targetingTypes.assignedTargetingOptions#AssignedTargetingOption) resources of\n [`TargetingType`](/display-video/api/reference/rest/v4/TargetingType) `TARGETING_TYPE_AUDIENCE_GROUP` to replace\n the v3 fields in\n [`AudienceGroupAssignedTargetingOptionDetails`](/display-video/api/reference/rest/v4/advertisers.adGroups.targetingTypes.assignedTargetingOptions#AssignedTargetingOption.AudienceGroupAssignedTargetingOptionDetails) with\n the following new v4 fields:\n\n - `excludedFirstAndThirdPartyAudienceGroup` with [`excludedFirstPartyAndPartnerAudienceGroup`](/display-video/api/reference/rest/v4/advertisers.adGroups.targetingTypes.assignedTargetingOptions#AssignedTargetingOption.AudienceGroupAssignedTargetingOptionDetails.FIELDS.excluded_first_party_and_partner_audience_group)\n - `includedFirstAndThirdPartyAudienceGroups` with [`includedFirstPartyAndPartnerAudienceGroups`](/display-video/api/reference/rest/v4/advertisers.adGroups.targetingTypes.assignedTargetingOptions#AssignedTargetingOption.AudienceGroupAssignedTargetingOptionDetails.FIELDS.included_first_party_and_partner_audience_groups)\n\n#### Update existing ad group bulk list targeting requests\n\n`advertisers.adGroups.bulkListAdGroupAssignedTargetingOptions` has been renamed\n[`advertisers.adGroups.bulkListAssignedTargetingOptions`](/display-video/api/reference/rest/v4/advertisers.adGroups/bulkListAssignedTargetingOptions).\nUpdate your existing requests to use the new method name.\n\n#### Include an optimization objective when creating insertion orders\n\n[`optimizationObjective`](/display-video/api/reference/rest/v4/advertisers.insertionOrders#InsertionOrder.FIELDS.optimization_objective) is now a required field in the\n[`InsertionOrder`](/display-video/api/reference/rest/v4/advertisers.insertionOrders#InsertionOrder) resource. Update your\n[`advertisers.insertionOrders.create`](/display-video/api/reference/rest/v4/advertisers.insertionOrders/create) requests to verify that this\nfield is set.\n\n#### Remove references to the creative resource field `publisherReviewStatuses`\n\nThe `publisherReviewStatuses` field has been removed from the\n[`ReviewStatusInfo`](/display-video/api/reference/rest/v4/advertisers.creatives#ReviewStatusInfo) object under the\n[`Creative`](/display-video/api/reference/rest/v4/advertisers.creatives#Creative) resource after being [deprecated in June\n2024](/display-video/api/deprecations#features.creative_publisher_review_statuses)."]]