You can use the Merchant API to share your inventories, stores, and sales data with Google for better visibility and management.
ویژگیهای جدید
In addition to the Content API features, Merchant API offers the following new features:
- A method to retrieve the state of business-level properties related to the local feeds partnership integration
- روشی برای ارسال اعلان به یک خرده فروش
For details on these methods, see Local feeds partnership API .
درخواستها
Use the following request URL format for the local feeds partnership API:
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpInventories:insert
برای اطلاعات بیشتر، به متد: accounts.lfpInventories.insert مراجعه کنید.
Here's a sample comparison of the Content API for Shopping to the local feeds partnership API for the request to insert an inventory:
| رابط برنامهنویسی کاربردی محتوا | رابط برنامهنویسی کاربردی (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} |
Here's a sample comparison of the Content API for Shopping to the local feeds partnership API for the request to insert a sale:
| رابط برنامهنویسی کاربردی محتوا | رابط برنامهنویسی کاربردی (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} |
Here's a sample comparison of the Content API for Shopping to the local feeds partnership API for the request to insert a store:
| رابط برنامهنویسی کاربردی محتوا | رابط برنامهنویسی کاربردی (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} |
روشها
Here's what changed for the store API methods in the local feeds partnership API:
| روش | URL در API محتوا برای خرید | URL در API فروشنده | شناسهها در 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 is in the format of 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 is in the format of 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 is in the format of 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} is in the format of accounts/ {IFP_PARTNER_ACCOUNT_ID} |
Here's what changed for the inventory API methods in the local feeds partnership API:
| روش | URL در API محتوا برای خرید | URL در API فروشنده | شناسهها در 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 is in the format of accounts/ {IFP_PARTNER_ACCOUNT_ID} |
Here's what changed for the sales API methods in the local feeds partnership API:
| روش | URL در API محتوا برای خرید | URL در API فروشنده | شناسهها در 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} is in the format of accounts/ {IFP_PARTNER_ACCOUNT_ID} |
منابع
Here's what has changed for the store resource in the local feeds partnership API. Fields not included here are unchanged.
| API محتوا برای خرید | رابط برنامهنویسی کاربردی (API) فروشنده | توضیحات |
| پشتیبانی نمیشود | name: string | Added new field to differentiate different stores |
| پشتیبانی نمیشود | targetAccount: integer | The Merchant Center account to insert inventories for |
targetCountry: string | regionCode: string | نام targetCountry به regionCode تغییر یافته است |
websiteUrl: string | websiteUri: string | websiteUrl به websiteUri تغییر نام داده است. |
kind: string | پشتیبانی نمیشود | kind isn't supported in the local feeds partnership API |
Here's what has changed for inserting an inventory. Fields not included here are unchanged.
| API محتوا برای خرید | رابط برنامهنویسی کاربردی (API) فروشنده | توضیحات |
| پشتیبانی نمیشود | name: string | Added new field to differentiate different inventories |
| پشتیبانی نمیشود | targetAccount: integer | The Merchant Center account to insert inventories for. |
targetCountry: string | regionCode: string | targetCountry has been renamed to regionCode . The CLDR territory code for the country where the product is sold. |
itemId: string | offerId: string | itemId به offerId تغییر نام داده است |
quantity: string | quantity: string | quantity به روز شده و اختیاری است |
| پشتیبانی نمیشود | availability: string | availability مورد نیاز است |
| قیمت: { شیء (قیمت) } | قیمت: { شیء (قیمت) } | Price definition has changed. For more information, see Price . |
timestamp: string | collectionTime: string | timestamp به collectionTime تغییر نام داده شده است |
kind: string | پشتیبانی نمیشود | kind isn't supported in the local feeds partnership API. |
Here's what has changed for inserting a sale. Fields not included here are unchanged.
| API محتوا برای خرید | رابط برنامهنویسی کاربردی (API) فروشنده | توضیحات |
| پشتیبانی نمیشود | name: string | Added new field to differentiate different inventories |
| پشتیبانی نمیشود | targetAccount:integer | حساب مرکز بازرگانان برای درج فروش |
targetCountry: string | regionCode: string | The CLDR territory code for the country where the product is sold. |
itemId: string | offerId: string | itemId به offerId تغییر نام داده است |
| قیمت: { شیء (قیمت) } | Price definition has changed. For more information, see Price . |
timestamp: string | saleTime: string | timestamp به saleTime تغییر نام داده شده است |
kind: string | پشتیبانی نمیشود | kind isn't supported in the local feeds partnership API. |