您可以使用 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 中 Inventory 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。 |