加入店面動態饋給合作夥伴計畫之後,零售商就能刊登店面商品目錄廣告和免費區域產品資訊,不必自行建立主要和店面商品目錄動態饋給。零售商可以將銷售和商品目錄資訊提供給值得信賴的資料供應商,由對方與 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
。