Package google.shopping.merchant.notifications.v1beta

索引

NotificationsApiService

為商家管理通知訂閱項目的服務

CreateNotificationSubscription

rpc CreateNotificationSubscription(CreateNotificationSubscriptionRequest) returns (NotificationSubscription)

為商家建立通知訂閱項目。如果是獨立帳戶或子帳戶,企業可以為自己建立訂閱項目。對於 MCA,商家可以為所有受管理的帳戶或特定子帳戶建立訂閱。

我們將允許下列類型的通知訂閱項目同時存在 (每家商家為每個事件類型訂閱一個):

  1. 所有管理帳戶的訂閱項目 + 個人訂閱項目。

  2. 多個「部分」受管理帳戶訂閱項目 + 個人訂閱項目。

我們禁止 (每家商家以每個事件類型做為訂閱者):

  1. 多個自訂訂閱項目。

  2. 多個「所有受管理的帳戶」訂閱項目。

  3. 同時訂閱「所有受管理的帳戶」和部分訂閱項目。

  4. 同一個目標帳戶有多個部分訂閱。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/content

詳情請參閱 OAuth 2.0 Overview

DeleteNotificationSubscription

rpc DeleteNotificationSubscription(DeleteNotificationSubscriptionRequest) returns (Empty)

刪除商家的通知訂閱項目。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/content

詳情請參閱 OAuth 2.0 Overview

GetNotificationSubscription

rpc GetNotificationSubscription(GetNotificationSubscriptionRequest) returns (NotificationSubscription)

取得帳戶的通知訂閱項目。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/content

詳情請參閱 OAuth 2.0 Overview

ListNotificationSubscriptions

rpc ListNotificationSubscriptions(ListNotificationSubscriptionsRequest) returns (ListNotificationSubscriptionsResponse)

取得商家的所有通知訂閱項目。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/content

詳情請參閱 OAuth 2.0 Overview

UpdateNotificationSubscription

rpc UpdateNotificationSubscription(UpdateNotificationSubscriptionRequest) returns (NotificationSubscription)

更新商家現有的通知訂閱項目。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/content

詳情請參閱 OAuth 2.0 Overview

屬性

列舉,用於指定要變更的資源屬性,以便通知商家。

列舉
ATTRIBUTE_UNSPECIFIED 未指定的屬性
STATUS 已變更實體的狀態

CreateNotificationSubscriptionRequest

CreateNotificationSubscription 方法的要求訊息。

欄位
parent

string

必要欄位。擁有新通知訂閱項目的商家帳戶。格式:accounts/{account}

notification_subscription

NotificationSubscription

必要欄位。要建立的通知訂閱項目。

DeleteNotificationSubscriptionRequest

DeleteNotificationSubscription 方法的請求訊息。

欄位
name

string

必要欄位。要刪除的通知訂閱項目名稱。

GetNotificationSubscriptionRequest

GetNotificationSubscription 方法的要求訊息。

欄位
name

string

必要欄位。通知訂閱項目的 name

ListNotificationSubscriptionsRequest

針對 ListNotificationSubscription 方法的要求訊息。

欄位
parent

string

必要欄位。擁有通知訂閱項目的商家帳戶。格式:accounts/{account}

page_size

int32

在頁面中傳回的通知訂閱數量上限。page_size 的預設值為 100。最大值為 200。超出 200 的值將一律指定為 200

page_token

string

用於擷取後續網頁的符記 (如有提供)。所有其他參數都必須與提供網頁權杖的原始呼叫相符。

ListNotificationSubscriptionsResponse

ListNotificationSubscription 方法的回應訊息。

欄位
notification_subscriptions[]

NotificationSubscription

商家要求的通知訂閱項目清單。

next_page_token

string

可做為 page_token 傳送的權杖,用於擷取後續網頁。如果省略這個欄位,就不會有後續頁面。

NotificationSubscription

代表商家帳戶擁有的通知訂閱項目。

欄位
name

string

僅供輸出。通知設定的 name。在建立新的 NotificationSubscription 時,由 Content API 產生。account 代表擁有設定的商家商家 ID。格式:accounts/{account}/notificationsubscriptions/{notification_subscription}

registered_event

NotificationEventType

商家希望收到通知的事件。

call_back_uri

string

用於將通知推送給商家的網址。

聯集欄位 interested_in

interested_in 只能是下列其中一項:

all_managed_accounts

bool

如果這個值為 true,系統會每天向要求帳戶通知所有管理帳戶 (可為副帳戶或其他已連結帳戶) 的指定事件,包括新加入的帳戶。

target_account

string

您要接收通知的帳戶的 name。格式:accounts/{account}

NotificationEventType

代表商家有興趣接收通知的事件類型。

列舉
NOTIFICATION_EVENT_TYPE_UNSPECIFIED 未指定通知事件類型。
PRODUCT_STATUS_CHANGE 產品狀態變更的通知,例如產品遭到拒登。

ProductChange

產品發生的變更,包括舊值、新值、國家/地區代碼 (做為區域代碼) 和報表內容。

欄位
old_value

string

已變更資源或屬性的舊值。

new_value

string

已變更資源或屬性的新值。

region_code

string

變更的國家/地區 (如適用)

reporting_context

ReportingContextEnum

有變更的報表情境 (如適用)

ProductStatusChangeMessage

商家會收到這則訊息,通知產品狀態異動事件

欄位
changes[]

ProductChange

說明產品變更的訊息

account

string

擁有已變更實體的目標帳戶。格式:accounts/{merchant_id}

managing_account

string

管理商家帳戶的帳戶。如果是獨立帳戶,則可與商家 ID 相同。格式:accounts/{service_provider_id}

resource_type

Resource

變更的資源,在本例中一律為 Product

attribute

Attribute

資源中已變更的屬性,在本例中,該屬性一律為 Status

resource_id

string

產品 ID。

resource

string

產品名稱。格式:{product.name=accounts/{account}/products/{product}}

expiration_time

Timestamp

產品到期時間。如果通知是針對產品刪除事件傳送,則不會設定這個欄位。

資源

列舉,用於指定要變更的資源,以便通知商家。

列舉
RESOURCE_UNSPECIFIED 未指定資源
PRODUCT 資源類型:產品

UpdateNotificationSubscriptionRequest

針對 UpdateNotificationSubscription 方法的要求訊息。

欄位
notification_subscription

NotificationSubscription

必要欄位。應更新的新版通知訂閱項目。

update_mask

FieldMask

要更新的欄位清單。