將結帳連結加入免費產品資訊

你可以使用免費產品資訊的 checkoutSettings 屬性,提供連結讓消費者直接前往結帳頁面。詳情請參閱「將結帳連結加入免費產品資訊」。

你必須提供商家和產品的特定資訊,才能選擇加入結帳系統計畫。如要使用 checkoutSettings,您必須符合下列條件:

請查看 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 是唯讀的,需要您的 merchantIdget 方法會傳回對應的 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