您可以使用免費產品資訊的 checkoutSettings
屬性提供連結,方便消費者直接前往結帳頁面。詳情請參閱「將結帳連結加入免費產品資訊」一文。
您必須先提供與自身業務和產品相關的特定資訊,才能選擇加入結帳計畫。您必須符合下列條件,才能使用 checkoutSettings
:
- 在 Google Merchant Center 建立有效的產品動態饋給。
- 商家帳戶必須註冊免費產品資訊。
查看 Google Merchant Center 使用者介面,確認是否已註冊免費產品資訊計畫。如果尚未註冊,請完成免費產品資訊新手上路步驟。請以下列格式提供結帳網址:
https://mystore.com/path-to-product/{id}
客戶點選免費產品資訊中的結帳網址時,{id}
會自動替換為產品的 offerId
。
新增結帳網址
您可以使用 freelistingsprogram.checkoutsettings.insert
新增或更新結帳網址範本。此呼叫會在帳戶層級更新結帳網址範本,並將所有有效商品加入結帳功能中。
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/freelistingsprogram/checkoutsettings
範例如下:
{
uri_settings: {
checkout_uri_template: "https://domain_name.com/custom_path/{id}"
}
}
查看目前的結帳網址
您可以使用 freelistingsprogram.checkoutsettings.get
查看現有的結帳網址。get
處於唯讀狀態,且需要使用 merchantId
。get
方法會傳回對應的 checkout
資源。
GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/freelistingsprogram/checkoutsettings
移除結帳網址
您可以使用 freelistingsprogram.checkoutsettings.delete
移除結帳網址。這樣一來,你的所有商品就會退出結帳功能。
DELETE https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/freelistingsprogram/checkoutsettings