上次更新日期: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 资源。
此更改要求您更新以下内容:
- 对
FirstAndThirdPartyAudience资源的引用,用于使用新的FirstPartyAndPartnerAudience资源。 - 将对 v3 服务中方法的现有请求从
firstAndThirdPartyAudiences迁移到新的 v4 服务firstPartyAndPartnerAudiences。 - 对于
firstPartyAndPartnerAudiences.list请求,默认页面大小的预期值介于 100 到 5000 项之间。 - 将对 v3
firstAndThirdPartyAudienceType字段的引用替换为新的 v4firstPartyAndPartnerAudienceType字段,使用新的FirstPartyAndPartnerAudienceType枚举类型,旧值对应于以下新值:FIRST_AND_THIRD_PARTY_AUDIENCE_TYPE_FIRST_PARTY到TYPE_FIRST_PARTYFIRST_AND_THIRD_PARTY_AUDIENCE_TYPE_THIRD_PARTY到TYPE_PARTNER
将对
AudienceType枚举值LICENSED的引用替换为以下某个新的更具体的值:THIRD_PARTYCOMMERCELINEAR
将
TargetingTypeTARGETING_TYPE_AUDIENCE_GROUP的AssignedTargetingOption资源引用替换为AudienceGroupAssignedTargetingOptionDetails中的 v3 字段,并使用以下新的 v4 字段:excludedFirstAndThirdPartyAudienceGroup替换为excludedFirstPartyAndPartnerAudienceGroupincludedFirstAndThirdPartyAudienceGroups替换为includedFirstPartyAndPartnerAudienceGroups
更新现有的广告组批量名单定位请求
advertisers.adGroups.bulkListAdGroupAssignedTargetingOptions 已重命名为 advertisers.adGroups.bulkListAssignedTargetingOptions。
更新现有请求以使用新方法名称。
创建广告订单时,请添加优化目标
optimizationObjective 现在是 InsertionOrder 资源中的必填字段。更新您的 advertisers.insertionOrders.create 请求,以验证是否已设置此字段。
移除对广告素材资源字段 publisherReviewStatuses 的引用
publisherReviewStatuses 字段已从 Creative 资源下的 ReviewStatusInfo 对象中移除,此前该字段已于 2024 年 6 月被弃用。