Method: accounts.notificationsubscriptions.create
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
為商家建立通知訂閱項目。如果是獨立帳戶或子帳戶,企業可以為自己建立訂閱項目。對於 MCA,商家可以為所有受管理的帳戶或特定子帳戶建立訂閱。
我們將允許下列類型的通知訂閱項目同時存在 (每家商家為每個事件類型訂閱一個):
所有管理帳戶的訂閱項目 + 個人訂閱項目。
多個「部分」受管理帳戶訂閱項目 + 個人訂閱項目。
我們禁止 (每家商家以每個事件類型做為訂閱者):
多個自訂訂閱項目。
多個「所有受管理的帳戶」訂閱項目。
同時訂閱「所有受管理的帳戶」和部分訂閱項目。
同一個目標帳戶有多個部分訂閱。
HTTP 要求
POST https://merchantapi.googleapis.com/notifications/v1beta/{parent=accounts/*}/notificationsubscriptions
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
parent |
string
必要欄位。擁有新通知訂閱項目的商家帳戶。格式:accounts/{account}
|
回應主體
如果成功,回應主體會包含新建立的 NotificationSubscription
例項。
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/content
詳情請參閱 OAuth 2.0 Overview。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-01-23 (世界標準時間)。
[null,null,["上次更新時間:2025-01-23 (世界標準時間)。"],[],["This describes how to create a notification subscription for a business via a `POST` request to `https://merchantapi.googleapis.com/notifications/v1beta/{parent=accounts/*}/notificationsubscriptions`. The request uses a `parent` path parameter specifying the merchant account. The request and response bodies are `NotificationSubscription` instances. Subscriptions can be for self or managed accounts, with restrictions preventing multiple full or partial subscriptions of the same type. Authorization requires the `https://www.googleapis.com/auth/content` OAuth scope.\n"]]