REST Resource: accounts.notificationsubscriptions
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
資源:NotificationSubscription
JSON 表示法 |
{
"name": string,
"registeredEvent": enum (NotificationEventType ),
"callBackUri": string,
// Union field interested_in can be only one of the following:
"allManagedAccounts": boolean,
"targetAccount": string
// End of list of possible types for union field interested_in .
} |
欄位 |
name |
string
僅供輸出。通知設定的 name 。建立新 NotificationSubscription 時,由 Content API 產生。account 代表擁有設定的商家商家 ID。格式:accounts/{account}/notificationsubscriptions/{notificationSubscription}
|
registeredEvent |
enum (NotificationEventType )
商家希望收到通知的事件。
|
callBackUri |
string
用於將通知推送給商家的網址。
|
聯集欄位 interested_in 。 interested_in 只能是下列其中一項:
|
allManagedAccounts |
boolean
如果這個值為 true,系統會每天向要求帳戶通知所有管理帳戶 (可為子帳戶或其他已連結帳戶) 的指定事件,包括新加入的帳戶。
|
targetAccount |
string
您要接收通知的帳戶的 name 。格式:accounts/{account}
|
NotificationEventType
列舉 |
NOTIFICATION_EVENT_TYPE_UNSPECIFIED |
未指定通知事件類型。 |
PRODUCT_STATUS_CHANGE |
產品狀態變更的通知,例如產品遭到拒登。 |
方法 |
|
為商家建立通知訂閱項目。 |
|
刪除商家的通知訂閱項目。 |
|
取得帳戶的通知訂閱項目。 |
|
取得商家的所有通知訂閱項目。 |
|
更新商家現有的通知訂閱項目。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-24 (世界標準時間)。
[null,null,["上次更新時間:2024-11-24 (世界標準時間)。"],[[["\u003cp\u003eNotificationSubscription enables merchants to receive notifications about specific events related to their account.\u003c/p\u003e\n"],["\u003cp\u003eMerchants can configure which events trigger notifications, such as product status changes, and provide a callback URL to receive them.\u003c/p\u003e\n"],["\u003cp\u003eThe API offers methods to create, delete, retrieve, and update notification subscriptions.\u003c/p\u003e\n"],["\u003cp\u003eIt allows merchants to receive notifications for events occurring on all managed accounts or a specific target account.\u003c/p\u003e\n"]]],["Merchants can create `NotificationSubscription` resources to receive updates about specific events. Each subscription includes a `name`, a `registeredEvent` (e.g., `PRODUCT_STATUS_CHANGE`), and a `callBackUri` for notification delivery. Merchants can specify if they want to receive events regarding `allManagedAccounts` or a `targetAccount`. Available methods include `create`, `delete`, `get`, `list`, and `patch` for managing these subscriptions. Notification event type can be `PRODUCT_STATUS_CHANGE` or `NOTIFICATION_EVENT_TYPE_UNSPECIFIED`.\n"],null,["# REST Resource: accounts.notificationsubscriptions\n\n- [Resource: NotificationSubscription](#NotificationSubscription)\n - [JSON representation](#NotificationSubscription.SCHEMA_REPRESENTATION)\n- [NotificationEventType](#NotificationEventType)\n- [Methods](#METHODS_SUMMARY)\n\nResource: NotificationSubscription\n----------------------------------\n\nRepresents a notification subscription owned by a Merchant account.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"registeredEvent\": enum (/merchant/api/reference/rest/notifications_v1beta/accounts.notificationsubscriptions#NotificationEventType), \"callBackUri\": string, // Union field `interested_in` can be only one of the following: \"allManagedAccounts\": boolean, \"targetAccount\": string // End of list of possible types for union field `interested_in`. } ``` |\n\n| Fields ||\n|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Output only. The `name` of the notification configuration. Generated by the Content API upon creation of a new `NotificationSubscription`. The `account` represents the merchant ID of the merchant that owns the configuration. Format: `accounts/{account}/notificationsubscriptions/{notificationSubscription}` |\n| `registeredEvent` | `enum (`[NotificationEventType](/merchant/api/reference/rest/notifications_v1beta/accounts.notificationsubscriptions#NotificationEventType)`)` The event that the merchant wants to be notified about. |\n| `callBackUri` | `string` URL to be used to push the notification to the merchant. |\n| Union field `interested_in`. `interested_in` can be only one of the following: ||\n| `allManagedAccounts` | `boolean` If this value is true, the requesting account is notified of the specified event for all managed accounts (can be subaccounts or other linked accounts) including newly added accounts on a daily basis. |\n| `targetAccount` | `string` The `name` of the account you want to receive notifications for. Format: `accounts/{account}` |\n\nNotificationEventType\n---------------------\n\nRepresents the event type that the merchant is interested in receiving notifications for.\n\n| Enums ||\n|---------------------------------------|---------------------------------------------------------------------------------------|\n| `NOTIFICATION_EVENT_TYPE_UNSPECIFIED` | Notifications event type is unspecified. |\n| `PRODUCT_STATUS_CHANGE` | Notification of product status changes, for example when product becomes disapproved. |\n\n| Methods ------- ||\n|-----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|\n| ### [create](/merchant/api/reference/rest/notifications_v1beta/accounts.notificationsubscriptions/create) | Creates a notification subscription for a business. |\n| ### [delete](/merchant/api/reference/rest/notifications_v1beta/accounts.notificationsubscriptions/delete) | Deletes a notification subscription for a merchant. |\n| ### [get](/merchant/api/reference/rest/notifications_v1beta/accounts.notificationsubscriptions/get) | Gets notification subscriptions for an account. |\n| ### [list](/merchant/api/reference/rest/notifications_v1beta/accounts.notificationsubscriptions/list) | Gets all the notification subscriptions for a merchant. |\n| ### [patch](/merchant/api/reference/rest/notifications_v1beta/accounts.notificationsubscriptions/patch) | Updates an existing notification subscription for a merchant. |"]]