Local feeds partnership API

The local feeds partnership program lets retailers participate in local inventory ads and free local product listings without having to create their own primary and local product inventory feeds. Retailers can provide their sales and inventory information to a trusted data provider that can share that information with Google. For the list of supported data partners, see About the local feeds partnership program.

You can add local product inventory by uploading a local product inventory feed. The local product inventory feed provides a list of items that can be sold in-store with attributes to describe them.

To get your inventory data provider added to the Merchant Center, provide their details in this form.

Retrieve a retailer's onboarding status

You can use the GetLfpState method to retrieve the state of the merchant-level properties related to the local feeds partnership integration. Based on the provided properties, you can check whether the integration is working as intended or if any additional action is required.

GET https://merchantapi.googleapis.com/lfp/v1beta/accounts/{ACCOUNT_ID}/lfpState/{TARGET_MERCHANT_ID}

Insert an inventory

To insert an inventory, use the following request:

POST https://merchantapi.googleapis.com/lfp/v1beta/{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}"
}

You can expect to see the following response:

{
 "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"
}

For more information, see Method: accounts.lfpInventories.insert.

Insert a sale

To insert a sale, use the following request:

POST https://merchantapi.googleapis.com/lfp/v1beta/{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}"
}

You can expect to see the following response:

{
 "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"
}

For more information, see Method: accounts.lfpSales.insert.

Insert a store

To insert a store, use the following request:

POST https://merchantapi.googleapis.com/lfp/v1beta/{PARENT}/lfpStores:insert

{
 "storeAddress": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
 "storeCode": "{STORE_CODE}",
 "targetAccount": "{TARGETMERCHANT_ID}"
}

You can expect to see the following response:

{
 "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"
}

For more information, see Method: accounts.lfpStores.insert.

Send a notification to a retailer

You can use the SendLfpNotification method to send a notification to a retailer. For example, you can use this method to send an onboarding notification to the retailer.

POST https://merchantapi.googleapis.com/lfp/v1beta/accounts/{accountId}/lfpNotifications:send

{
  "target_account": {targetMerchantId},
  "email_address": {emailAddress},
  "type": {Type}
}

Replace the following:

  • {accountId}: The unique identifier of your Merchant Center account
  • {targetMerchantId}: The unique identifier of the account to which you want to send the notification
  • {emailAddress}: The email address of the account to which you want to send the notification
  • {Type}: You can only pass the string value ONBOARDING_UI in this field