Method: accounts.lfpInventories.insert

為指定的目標商家帳戶插入 LfpInventory 資源。如果資源已存在,系統就會替換該資源。廣告空間會在 30 天後自動到期。

HTTP 要求

POST https://merchantapi.googleapis.com/lfp/v1beta/{parent=accounts/*}/lfpInventories:insert

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
parent

string

必要欄位。LFP 供應商帳戶。格式:accounts/{account}

要求主體

要求主體包含 LfpInventory 的例項。

回應主體

商家的店面商品目錄資料。

如果成功,回應主體即會包含具有以下結構的資料:

JSON 表示法
{
  "name": string,
  "targetAccount": string,
  "storeCode": string,
  "offerId": string,
  "regionCode": string,
  "contentLanguage": string,
  "price": {
    object (Price)
  },
  "availability": string,
  "collectionTime": string,
  "gtin": string,
  "quantity": string,
  "pickupMethod": string,
  "pickupSla": string,
  "feedLabel": string
}
欄位
name

string

僅供輸出。ID。LfpInventory 資源的名稱。格式:accounts/{account}/lfpInventories/{target_merchant}~{storeCode}~{offer}

targetAccount

string (int64 format)

必要欄位。要提交商品目錄的商家 Merchant Center ID。

storeCode

string

必要欄位。商家商店的 ID。透過 InsertLfpStore 插入的商家代碼,或商家檔案中的商家代碼。

offerId

string

必要欄位。不可變動。產品的專屬 ID。如果你為商家提交商品目錄和銷售資料,此 ID 必須與同一項產品相符。

注意事項:如果商家販售同款的全新產品和二手產品,兩者的 ID 不得相同。

regionCode

string

必要欄位。產品銷售國家/地區的 CLDR 地域代碼

contentLanguage

string

必要欄位。商品的雙字母 ISO 639-1 語言代碼。

price

object (Price)

選用設定。產品目前的價格。

availability

string

必要欄位。此商店的產品供應情形。如要瞭解系統接受的屬性值,請參閱店面商品目錄資料規格

collectionTime

string (Timestamp format)

選用設定。收集商品目錄的時間。如未設定,則會設為商品目錄的提交時間。

gtin

string

選用設定。產品的全球交易品項識別碼。

quantity

string (int64 format)

選用設定。這間商店的產品數量。必須大於或等於零。

pickupMethod

string

選用設定。此商品支援的取貨方式。除非值為「不支援」,否則此欄位必須與 pickupSla 一起提交。如要瞭解系統接受的屬性值,請參閱店面商品目錄資料規格一文。

pickupSla

string

選用設定。訂單預定可供取貨的日期 (相對於訂單日期)。必須與 pickupMethod 一起提交。如要瞭解系統接受的屬性值,請參閱店面商品目錄資料規格一文。

feedLabel

string

選用設定。產品的動態饋給標籤。如未設定,系統會採用預設值 regionCode

授權範圍

需要下列 OAuth 範圍:

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

詳情請參閱 OAuth 2.0 總覽