店面動態饋給合作夥伴 API
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
加入店面動態饋給合作夥伴計畫之後,零售商就能刊登店面商品目錄廣告和免費區域產品資訊,不必自行建立主要和店面商品目錄動態饋給。零售商可以將銷售和商品目錄資訊提供給值得信賴的資料供應商,由對方與 Google 分享這類資訊。如需支援的資料合作夥伴清單,請參閱「店面動態饋給合作夥伴計畫簡介」。
上傳店面商品目錄動態饋給,即可新增店面商品目錄。
如要將商品目錄資料供應商新增至 Merchant Center,請前往「Point-of-Sale Data Provider Feedback to show local product on Google」頁面提供詳細資料。
如要瞭解如何從 Content API for Shopping 遷移,請參閱「遷移店面動態饋給合作夥伴」。
擷取零售商的註冊狀態
你可以使用 lfpMerchantStates.get
方法,擷取與店面動態饋給合作夥伴整合相關的商家層級屬性狀態。根據提供的屬性,您可以檢查整合功能是否正常運作,或是否需要採取其他行動。
GET https://merchantapi.googleapis.com/lfp/v1/accounts/{ACCOUNT_ID}/lfpMerchantStates/{TARGET_MERCHANT_ID}
插入廣告空間
如要插入廣告空間,請使用下列要求:
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpInventories:insert
{
"availability": "in stock",
"collectionTime": "2024-01-08T08:00:00Z",
"contentLanguage": "en",
"gtin": "gtin",
"offerId": "{OFFER_ID}",
"pickupMethod": "buy",
"pickupSla": "same day",
"price": {
"amountMicros": "1000000",
"currencyCode": "USD"
},
"regionCode": "US",
"storeCode": "{STORE_CODE}",
"targetAccount": "{TARGETMERCHANT_ID}"
}
更改下列內容:
- {PARENT}:格式為
accounts/
{ACCOUNT_ID},其中 {ACCOUNT_ID} 是 Merchant Center 帳戶的專屬 ID。
- {OFFER_ID}:產品的專屬 ID。
- {STORE_CODE}:商家商店的 ID。
- {TARGETMERCHANT_ID}:要提交目錄的商家帳戶 ID。
您應會看到以下回應內容:
{
"name": "accounts/{merchantId}/lfpInventories/{TARGETMERCHANT_ID}~{STORE_CODE}~{OFFER_ID}",
"targetAccount": "{TARGETMERCHANT_ID}",
"storeCode": "123",
"offerId": "{OFFER_ID}",
"regionCode": "US",
"contentLanguage": "en",
"gtin": "gtin",
"price": {
"amountMicros": "1000000",
"currencyCode": "USD"
},
"availability": "in stock",
"collectionTime": "2024-01-08T08:00:00Z",
"pickupMethod": "buy",
"pickupSla": "same day",
"feedLabel": "US"
}
詳情請參閱「方法:accounts.lfpInventories.insert」。
插入銷售活動
如要插入銷售交易,請使用下列要求:
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpSales:insert
{
"contentLanguage": "en",
"gtin": "gtin",
"offerId": "offerId",
"price": {
"amountMicros": "1000000",
"currencyCode": "USD"
},
"quantity": 2,
"regionCode": "US",
"saleTime": "2024-01-08T08:00:00Z",
"storeCode": "123",
"targetAccount": "{TARGETMERCHANT_ID}"
}
更改下列內容:
- {TARGETMERCHANT_ID}:要提交銷售資料的商家帳戶 ID。
您應會看到以下回應內容:
{
"name": "accounts/1000005718521947/lfpSales/{UUID}",
"targetAccount": "{TARGETMERCHANT_ID}",
"storeCode": "123",
"offerId": "offerId",
"regionCode": "US",
"contentLanguage": "en",
"gtin": "gtin",
"price": {
"amountMicros": "1000000",
"currencyCode": "USD"
},
"quantity": "2",
"saleTime": "2024-01-08T08:00:00Z",
"uid": "{UUID}",
"feedLabel": "US"
}
詳情請參閱方法:accounts.lfpSales.insert
插入商店
如要插入商店,請使用下列要求:
POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpStores:insert
{
"storeAddress": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
"storeCode": "{STORE_CODE}",
"targetAccount": "{TARGETMERCHANT_ID}"
}
更改下列內容:
- {STORE_CODE}:商店的專屬 ID。
- {TARGETMERCHANT_ID}:要提交商店的商家帳戶 ID。
您應會看到以下回應內容:
{
"name": "accounts/{MERCHANT_ID}/lfpStores/{TARGETMERCHANT_ID}~{STORE_CODE}",
"targetAccount": "1000005718454644",
"storeCode": "{STORE_CODE}",
"storeAddress": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
"matchingState": "STORE_MATCHING_STATE_MATCHED"
}
詳情請參閱 accounts.lfpStores.insert
。
傳送通知給零售商
您可以使用 SendLfpNotification
方法傳送通知給零售商。舉例來說,你可以使用這個方法傳送新零售商的加入通知。
POST https://merchantapi.googleapis.com/lfp/v1/accounts/{ACCOUNT_ID}/lfpNotifications:send
{
"target_account": {TARGETMERCHANT_ID},
"email_address": {EMAIL_ADDRESS},
"type": {TYPE}
}
更改下列內容:
- {ACCOUNT_ID}:Merchant Center 帳戶的專屬 ID。
- {TARGETMERCHANT_ID}:要傳送通知的帳戶專屬 ID。
- {EMAIL_ADDRESS}:要接收通知的帳戶電子郵件地址。
- {TYPE}:這個欄位只能傳遞字串值
ONBOARDING_UI
。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-08 (世界標準時間)。
[null,null,["上次更新時間:2025-08-08 (世界標準時間)。"],[[["\u003cp\u003eLocal product inventory can be added by uploading a feed that describes in-store items.\u003c/p\u003e\n"],["\u003cp\u003eInventory data providers can be added to the Merchant Center by submitting their details through a provided form.\u003c/p\u003e\n"],["\u003cp\u003eThe API provides methods for inserting inventory, sales, and store information, with request and response examples.\u003c/p\u003e\n"],["\u003cp\u003eEach API method has corresponding documentation for detailed information and further guidance.\u003c/p\u003e\n"]]],["Retailers can use the local feeds partnership program to share sales and inventory data with Google via data providers. Inventory data is added by uploading a local product inventory feed. The `GetLfpState` method retrieves merchant-level integration status. The `insert` method is used to add inventory, sales, and store information using `POST` requests with specific parameters such as `gtin`, `price`, `storeCode` and `targetAccount`. `SendLfpNotification` method sends notifications to retailers, including onboarding messages.\n"],null,["# Local feeds partnership API\n\nThe local feeds partnership program lets retailers participate in local\ninventory ads and free local product listings without having to create their own\nprimary and local product inventory feeds. Retailers can provide their sales and\ninventory information to a trusted data provider that can share that information\nwith Google. For the list of supported data partners, see [About the local feeds\npartnership program](//support.google.com/merchants/answer/7676652).\n\nYou can add local product inventory by uploading a local product inventory feed.\n| **Note:** The Local Feeds Partnership API can help you submit your inventory information through an approved third party data provider. Whereas, if you want to submit your inventory information by yourself, you can use the [Merchant\n| Inventories API](/merchant/api/guides/inventories/overview).\n\nTo get your inventory data provider added to the Merchant Center, provide your\ndetails at\n[Point-of-Sale Data Provider Feedback to show local product on Google](https://docs.google.com/forms/d/1gGULVx_YGWHwjE46G0LCdiL39XMRND3K3oLh8FyOmyM/viewform).\n\nTo learn about the migration from Content API for Shopping, see [Migrate local feeds partnership](/merchant/api/guides/compatibility/local-feeds-partnership).\n\nRetrieve a retailer's onboarding status\n---------------------------------------\n\nYou can use the `lfpMerchantStates.get` method to retrieve the state of the\nmerchant-level properties related to the local feeds partnership integration.\nBased on the provided properties, you can check whether the integration is\nworking as intended or if any additional action is required. \n\n GET https://merchantapi.googleapis.com/lfp/v1/accounts/\u003cvar translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/lfpMerchantStates/\u003cvar translate=\"no\"\u003e{TARGET_MERCHANT_ID}\u003c/var\u003e\n\nInsert an inventory\n-------------------\n\nTo insert an inventory, use the following request: \n\n POST https://merchantapi.googleapis.com/lfp/v1/\u003cvar translate=\"no\"\u003e{PARENT}\u003c/var\u003e/lfpInventories:insert\n\n {\n \"availability\": \"in stock\",\n \"collectionTime\": \"2024-01-08T08:00:00Z\",\n \"contentLanguage\": \"en\",\n \"gtin\": \"gtin\",\n \"offerId\": \"\u003cvar translate=\"no\"\u003e{OFFER_ID}\u003c/var\u003e\",\n \"pickupMethod\": \"buy\",\n \"pickupSla\": \"same day\",\n \"price\": {\n \"amountMicros\": \"1000000\",\n \"currencyCode\": \"USD\"\n },\n \"regionCode\": \"US\",\n \"storeCode\": \"\u003cvar translate=\"no\"\u003e{STORE_CODE}\u003c/var\u003e\",\n \"targetAccount\": \"\u003cvar translate=\"no\"\u003e{TARGETMERCHANT_ID}\u003c/var\u003e\"\n }\n\nReplace the following:\n\n- \u003cvar class=\"readonly\" translate=\"no\"\u003e{PARENT}\u003c/var\u003e: The format is `accounts/`\u003cvar class=\"readonly\" translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e, where \u003cvar class=\"readonly\" translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e is the unique identifier of the Merchant Center account.\n- \u003cvar class=\"readonly\" translate=\"no\"\u003e{OFFER_ID}\u003c/var\u003e: The unique identifier of the product.\n- \u003cvar class=\"readonly\" translate=\"no\"\u003e{STORE_CODE}\u003c/var\u003e: The identifier of the merchant's store.\n- \u003cvar class=\"readonly\" translate=\"no\"\u003e{TARGETMERCHANT_ID}\u003c/var\u003e: The account ID of the business you want to submit the inventory for.\n\nYou can expect to see the following response: \n\n {\n \"name\": \"accounts/{merchantId}/lfpInventories/\u003cvar translate=\"no\"\u003e{TARGETMERCHANT_ID}\u003c/var\u003e~\u003cvar translate=\"no\"\u003e{STORE_CODE}\u003c/var\u003e~\u003cvar translate=\"no\"\u003e{OFFER_ID}\u003c/var\u003e\",\n \"targetAccount\": \"\u003cvar translate=\"no\"\u003e{TARGETMERCHANT_ID}\u003c/var\u003e\",\n \"storeCode\": \"123\",\n \"offerId\": \"\u003cvar translate=\"no\"\u003e{OFFER_ID}\u003c/var\u003e\",\n \"regionCode\": \"US\",\n \"contentLanguage\": \"en\",\n \"gtin\": \"gtin\",\n \"price\": {\n \"amountMicros\": \"1000000\",\n \"currencyCode\": \"USD\"\n },\n \"availability\": \"in stock\",\n \"collectionTime\": \"2024-01-08T08:00:00Z\",\n \"pickupMethod\": \"buy\",\n \"pickupSla\": \"same day\",\n \"feedLabel\": \"US\"\n }\n\nFor more information, see [Method:\naccounts.lfpInventories.insert](/merchant/api/reference/rest/lfp_v1/accounts.lfpInventories/insert).\n\nInsert a sale\n-------------\n\nTo insert a sale, use the following request: \n\n POST https://merchantapi.googleapis.com/lfp/v1/\u003cvar translate=\"no\"\u003e{PARENT}\u003c/var\u003e/lfpSales:insert\n\n {\n \"contentLanguage\": \"en\",\n \"gtin\": \"gtin\",\n \"offerId\": \"offerId\",\n \"price\": {\n \"amountMicros\": \"1000000\",\n \"currencyCode\": \"USD\"\n },\n \"quantity\": 2,\n \"regionCode\": \"US\",\n \"saleTime\": \"2024-01-08T08:00:00Z\",\n \"storeCode\": \"123\",\n \"targetAccount\": \"\u003cvar translate=\"no\"\u003e{TARGETMERCHANT_ID}\u003c/var\u003e\"\n }\n\nReplace the following:\n\n- \u003cvar class=\"readonly\" translate=\"no\"\u003e{TARGETMERCHANT_ID}\u003c/var\u003e: The account ID of the business to submit the sale for.\n\nYou can expect to see the following response: \n\n {\n \"name\": \"accounts/1000005718521947/lfpSales/\u003cvar translate=\"no\"\u003e{UUID}\u003c/var\u003e\",\n \"targetAccount\": \"\u003cvar translate=\"no\"\u003e{TARGETMERCHANT_ID}\u003c/var\u003e\",\n \"storeCode\": \"123\",\n \"offerId\": \"offerId\",\n \"regionCode\": \"US\",\n \"contentLanguage\": \"en\",\n \"gtin\": \"gtin\",\n \"price\": {\n \"amountMicros\": \"1000000\",\n \"currencyCode\": \"USD\"\n },\n \"quantity\": \"2\",\n \"saleTime\": \"2024-01-08T08:00:00Z\",\n \"uid\": \"\u003cvar translate=\"no\"\u003e{UUID}\u003c/var\u003e\",\n \"feedLabel\": \"US\"\n }\n\nFor more information, see [Method:\naccounts.lfpSales.insert](/merchant/api/reference/rest/lfp_v1/accounts.lfpSales/insert)\n\nInsert a store\n--------------\n\nTo insert a store, use the following request: \n\n POST https://merchantapi.googleapis.com/lfp/v1/\u003cvar translate=\"no\"\u003e{PARENT}\u003c/var\u003e/lfpStores:insert\n\n {\n \"storeAddress\": \"1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA\",\n \"storeCode\": \"\u003cvar translate=\"no\"\u003e{STORE_CODE}\u003c/var\u003e\",\n \"targetAccount\": \"\u003cvar translate=\"no\"\u003e{TARGETMERCHANT_ID}\u003c/var\u003e\"\n }\n\nReplace the following:\n\n- \u003cvar class=\"readonly\" translate=\"no\"\u003e{STORE_CODE}\u003c/var\u003e: A unique identifier of the store.\n- \u003cvar class=\"readonly\" translate=\"no\"\u003e{TARGETMERCHANT_ID}\u003c/var\u003e: The account ID of the business to submit the store for.\n\nYou can expect to see the following response: \n\n {\n \"name\": \"accounts/\u003cvar translate=\"no\"\u003e{MERCHANT_ID}\u003c/var\u003e/lfpStores/\u003cvar translate=\"no\"\u003e{TARGETMERCHANT_ID}\u003c/var\u003e~\u003cvar translate=\"no\"\u003e{STORE_CODE}\u003c/var\u003e\",\n \"targetAccount\": \"1000005718454644\",\n \"storeCode\": \"\u003cvar translate=\"no\"\u003e{STORE_CODE}\u003c/var\u003e\",\n \"storeAddress\": \"1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA\",\n \"matchingState\": \"STORE_MATCHING_STATE_MATCHED\"\n }\n\nFor more information, see [`accounts.lfpStores.insert`](/merchant/api/reference/rest/lfp_v1/accounts.lfpStores/insert).\n\nSend a notification to a retailer\n---------------------------------\n\nYou can use the `SendLfpNotification` method to send a notification to a\nretailer. For example, you can use this method to send an onboarding\nnotification to the retailer. \n\n POST https://merchantapi.googleapis.com/lfp/v1/accounts/\u003cvar translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e/lfpNotifications:send\n\n {\n \"target_account\": \u003cvar translate=\"no\"\u003e{TARGETMERCHANT_ID}\u003c/var\u003e,\n \"email_address\": \u003cvar translate=\"no\"\u003e{EMAIL_ADDRESS}\u003c/var\u003e,\n \"type\": \u003cvar translate=\"no\"\u003e{TYPE}\u003c/var\u003e\n }\n\nReplace the following:\n\n- \u003cvar class=\"readonly\" translate=\"no\"\u003e{ACCOUNT_ID}\u003c/var\u003e: The unique identifier of your Merchant Center account.\n- \u003cvar class=\"readonly\" translate=\"no\"\u003e{TARGETMERCHANT_ID}\u003c/var\u003e: The unique identifier of the account to which you want to send the notification.\n- \u003cvar class=\"readonly\" translate=\"no\"\u003e{EMAIL_ADDRESS}\u003c/var\u003e: The email address of the account to which you want to send the notification.\n- \u003cvar class=\"readonly\" translate=\"no\"\u003e{TYPE}\u003c/var\u003e: You can only pass the string value `ONBOARDING_UI` in this field."]]