Package google.shopping.merchant.notifications.v1beta

索引

NotificationsApiService

用於管理商家通知訂閱的服務

CreateNotificationSubscription

rpc CreateNotificationSubscription(CreateNotificationSubscriptionRequest) returns (NotificationSubscription)

為商家建立通知訂閱。我們允許將下列類型的通知訂閱同時存在 (每個商家可依事件類型區分訂閱者):1. 所有客戶帳戶的訂閱 + 人為 2 的訂閱。客戶帳戶可設定多個「部分」的訂閱方案 + 自助式訂閱方案

且不會 (每個商家以訂閱者個別事件類型計費):1. 多次自行訂閱。2. 多個「所有客戶帳戶」訂閱。3. 同時訂閱所有和部分。4. 同一目標帳戶有多個部分訂閱

授權範圍

需要下列 OAuth 範圍:

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

詳情請參閱 OAuth 2.0 總覽

DeleteNotificationSubscription

rpc DeleteNotificationSubscription(DeleteNotificationSubscriptionRequest) returns (Empty)

刪除商家的通知訂閱。

授權範圍

需要下列 OAuth 範圍:

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

詳情請參閱 OAuth 2.0 總覽

GetNotificationSubscription

rpc GetNotificationSubscription(GetNotificationSubscriptionRequest) returns (NotificationSubscription)

取得帳戶的通知訂閱。

授權範圍

需要下列 OAuth 範圍:

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

詳情請參閱 OAuth 2.0 總覽

ListNotificationSubscriptions

rpc ListNotificationSubscriptions(ListNotificationSubscriptionsRequest) returns (ListNotificationSubscriptionsResponse)

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

授權範圍

需要下列 OAuth 範圍:

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

詳情請參閱 OAuth 2.0 總覽

UpdateNotificationSubscription

rpc UpdateNotificationSubscription(UpdateNotificationSubscriptionRequest) returns (NotificationSubscription)

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

授權範圍

需要下列 OAuth 範圍:

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

詳情請參閱 OAuth 2.0 總覽

屬性

以列舉的方式指定資源中要變更來通知商家的屬性。

列舉
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}}

資源

以列舉的方式指定要變更要通知商家的資源。

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

UpdateNotificationSubscriptionRequest

UpdateNotificationSubscription 方法的要求訊息。

欄位
notification_subscription

NotificationSubscription

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

update_mask

FieldMask

要更新的欄位清單。