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

仅限输出。标识符。LfpInventory 资源的名称。格式:accounts/{account}/lfpInventories/{target_merchant}~{storeCode}~{offer}

targetAccount

string (int64 format)

必需。要为其提交商品目录的商家的 Merchant Center ID。

storeCode

string

必需。商家商店的标识符。通过 InsertLfpStore 插入的商店代码,或在商家资料中插入商店代码。

offerId

string

必需。不可变。商品的唯一标识符。如果商家同时提交了商品目录和促销信息,则此 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

可选。此优惠支持的提货方法。除非值“not supported”,否则此字段必须与 pickupSla 一起提交。如需了解可接受的属性值,请参阅本地商品目录数据规范

pickupSla

string

可选。预计可提货的日期(相对于下单日期)。必须和 pickupMethod 一起提交。如需了解可接受的属性值,请参阅本地商品目录数据规范

feedLabel

string

可选。产品的 Feed 标签。如果未设置,则默认为 regionCode

授权范围

需要以下 OAuth 范围:

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

如需了解详情,请参阅 OAuth 2.0 概览