自
2025 年 9 月 8 日起,每個新委刊項都必須聲明是否會放送歐盟政治廣告。如果透過 Display & Video 360 API 和 SDF 上傳的檔案未提供聲明,系統就會失敗。如要進一步瞭解如何更新整合服務以進行這項聲明,請參閱
淘汰項目頁面。
從 v3 遷移至 v4
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
上次更新:2025 年 7 月 31 日
遷移應用程式
從 v3 遷移至 v4 時,您需要更新端點網址來呼叫 v4,並更新應用程式以因應重大變更。
將 API 呼叫從第 3 版更新至第 4 版
如要使用 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。
進行必要變更
我們將在第 4 版中推出多項重大變更,請詳閱下列操作說明,並根據您目前使用 Display & Video 360 API 的情況,進行必要的變更。
FirstAndThirdPartyAudience
資源已替換為 FirstPartyAndPartnerAudience
資源。
如要進行這項變更,您必須更新下列項目:
更新現有廣告群組大量名單指定目標要求
advertisers.adGroups.bulkListAdGroupAssignedTargetingOptions
已重新命名為 advertisers.adGroups.bulkListAssignedTargetingOptions
。更新現有要求,改用新的方法名稱。
建立廣告訂單時,請加入最佳化目標
optimizationObjective
現在是 InsertionOrder
資源的必填欄位。更新您的
advertisers.insertionOrders.create
要求,確認已設定這個欄位。
移除對廣告素材資源欄位 publisherReviewStatuses
的參照
publisherReviewStatuses
欄位已於 2024 年 6 月淘汰,並從 Creative
資源的 ReviewStatusInfo
物件中移除。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-31 (世界標準時間)。
[null,null,["上次更新時間: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)."]]