迁移本地 Feed 合作伙伴关系

您可以使用 Merchant API 与 Google 分享您的库存、实体店和销售数据,以便更好地提高曝光度和进行管理。

新功能

除了 Content API 功能之外,Merchant API 还提供以下新功能:

  • 一种用于检索与本地 Feed 合作伙伴集成相关的商家级属性状态的方法
  • 一种用于向零售商发送通知的方法

如需详细了解这些方法,请参阅本地 Feed 合作伙伴 API

请求

请使用以下请求网址格式来调用本地 Feed 合作伙伴 API:

POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpInventories:insert

如需了解详情,请参阅方法: accounts.lfpInventories.insert

下面比较了 Content API for Shopping 和本地 Feed 合作伙伴 API,以说明如何请求插入库存:

Content API Merchant API
网址 POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/inventory POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpInventories:insert
标识符 {MERCHANT_ID}/pos/{TARGETMERCHANT_ID} {PARENT}

下面比较了 Content API for Shopping 和本地 Feed 合作伙伴 API,以说明如何请求插入销售数据:

Content API Merchant API
网址 POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/sale POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpSales:insert
标识符 {MERCHANT_ID}/pos/{TARGETMERCHANT_ID} {PARENT}

下面比较了 Content API for Shopping 和本地 Feed 合作伙伴 API,以说明如何请求插入实体店:

Content API Merchant API
网址 POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpStores:insert
标识符 {MERCHANT_ID}/pos/{TARGETMERCHANT_ID} {PARENT}

方法

下面介绍了本地 Feed 合作伙伴 API 中实体店 API 方法的变化:

方法 Content API for Shopping 中的网址 Merchant API 中的网址 Content API for Shopping 中的标识符 Merchant API 中的标识符 说明
insert POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store POST https://merchantapi.googleapis.com/lfp/v1/{parent=accounts/*}/lfpStores:insert {MERCHANT_ID}/pos/{TARGETMERCHANT_ID} {PARENT} parent 的格式为 accounts/{IFP_PARTNER_ACCOUNT_ID}
delete DELETE https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store/{STORE_CODE} DELETE https://merchantapi.googleapis.com/lfp/v1/{name=accounts/*/lfpStores/*} {MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store/{STORE_CODE} {NAME} name 的格式为 accounts/{IFP_PARTNER_ACCOUNT_ID}/lfpStores/{TARGETMERCHANT_ID}~{STORE_CODE}
get GET https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store/{STORE_CODE} GET https://merchantapi.googleapis.com/lfp/v1/{name=accounts/*/lfpStores/*} {MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store/{STORE_CODE} {NAME} name 的格式为 accounts/{IFP_PARTNER_ACCOUNT_ID}/lfpStores/{TARGETMERCHANT_ID}~{STORE_CODE}
list GET https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store GET https://merchantapi.googleapis.com/lfp/v1/{parent=accounts/*}/lfpStores /{MERCHANT_ID}/pos/{TARGETMERCHANT_ID} {PARENT} {PARENT} 的格式为 accounts/{IFP_PARTNER_ACCOUNT_ID}

下面介绍了本地 Feed 合作伙伴 API 中库存 API 方法的变化:

方法 Content API for Shopping 中的网址 Merchant API 中的网址 Content API for Shopping 中的标识符 Merchant API 中的标识符 说明
insert POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpInventories:insert {MERCHANT_ID}/pos/{TARGETMERCHANT_ID} {PARENT} parent 的格式为 accounts/{IFP_PARTNER_ACCOUNT_ID}

下面介绍了本地 Feed 合作伙伴 API 中销售 API 方法的变化:

方法 Content API for Shopping 中的网址 Merchant API 中的网址 Content API for Shopping 中的标识符 Merchant API 中的标识符 说明
insert POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/pos/{TARGETMERCHANT_ID}/store POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpSales:insert {MERCHANT_ID}/pos/{TARGETMERCHANT_ID} {PARENT} {PARENT} 的格式为 accounts/{IFP_PARTNER_ACCOUNT_ID}

资源

下面介绍了本地 Feed 合作伙伴 API 中实体店资源的变化。此处未列出的字段保持不变。

Content API for Shopping Merchant API 说明
不支持 name: string 添加了新字段,用于区分不同的实体店
不支持 targetAccount: integer 用于插入库存的 Merchant Center 账号
targetCountry: string regionCode: string targetCountry 已重命名为 regionCode
websiteUrl: string websiteUri: string websiteUrl 已重命名为 websiteUri
kind: string 不支持 本地 Feed 合作伙伴 API 不支持 kind

下面介绍了插入库存的变化。此处未列出的字段保持不变。

Content API for Shopping Merchant API 说明
不支持 name: string 添加了新字段,用于区分不同的库存
不支持 targetAccount: integer 用于插入库存的 Merchant Center 账号。
targetCountry: string regionCode: string targetCountry 已重命名为 regionCode。销售产品的国家/地区的 CLDR 地区代码。
itemId: string offerId: string itemId 已重命名为 offerId
quantity: string quantity: string quantity 已更新为可选
不支持 availability: string 必须提供 availability

price: {

object (Price)

}

price: {

object (Price)

}

价格定义已更改。如需了解详情,请参阅价格
timestamp: string collectionTime: string timestamp 已重命名为 collectionTime
kind: string 不支持 本地 Feed 合作伙伴 API 不支持 kind

下面介绍了插入销售数据的变化。此处未列出的字段保持不变。

Content API for Shopping Merchant API 说明
不支持 name: string 添加了新字段,用于区分不同的库存
不支持 targetAccount:integer 用于插入销售数据的 Merchant Center 账号
targetCountry: string regionCode: string 销售产品的国家/地区的 CLDR 地区代码。
itemId: string offerId: string itemId 已重命名为 offerId

price: {

object (Price)

}

price: {

object (Price)

}

价格定义已更改。如需了解详情,请参阅价格
timestamp: string saleTime: string timestamp 已重命名为 saleTime
kind: string 不支持 本地 Feed 合作伙伴 API 不支持 kind