您可以使用 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 | 
| 
 | 
 | 价格定义已更改。如需了解详情,请参阅价格。 | 
| 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 | 
|  | 
 | 价格定义已更改。如需了解详情,请参阅价格。 | 
| timestamp: string | saleTime: string | 已将 timestamp重命名为saleTime | 
| kind: string | 不支持 | 本地 Feed 合作伙伴 API 不支持 kind。 |