Submit stores, inventory, and sales

After you complete the account configuration and merchant linking steps in Set up Local Feeds Partnership, use the Local Feeds Partnership (LFP) sub-API endpoints in the following order to match store locations, submit local inventory and point-of-sale events, and verify onboarding readiness.

Store codes and store matching

A single product in a merchant's catalog can be sold in one or multiple physical stores, with different availability and pricing at each location. When you submit local inventory (lfpInventories.insert) or sales (lfpSales.insert), the storeCode attribute links a product's price and availability to a specific physical store. Google uses the combination of the linked Google Business Profile and the storeCode to uniquely identify each store.

You can supply storeCode values in two ways:

  • Use store codes from the linked Business Profile: By default, if you know the store codes already assigned to the stores in the merchant's linked Business Profile, pass those exact storeCode values when sending inventory or sales data. You don't need to submit store data separately.
  • Match stores by submitting store data (lfpStores.insert): If you don't know the store codes in the merchant's Business Profile, you can use this matching mechanism once a Business Profile is linked to the merchant's Merchant Center account. Call accounts.lfpStores.insert with your own unique storeCode along with the store's business name (storeName), street address (storeAddress), and phone number (phoneNumber). Matching happens strictly within the stores linked through that Business Profile. Once matchingState returns STORE_MATCHING_STATE_MATCHED, use that storeCode when calling lfpInventories.insert or lfpSales.insert.

Insert a store

Once a Google Business Profile is linked to the merchant's Merchant Center account, if you don't know the store codes configured in that Business Profile, use accounts.lfpStores.insert to submit store data with your own storeCode, business name, street address, and phone number. Submitting a store with an existing storeCode replaces the previous store record. If Google can't match a store, it ignores inventory and sales submitted with that storeCode.

To insert a store, send the following request:

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

{
  "storeName": "Example Store Mountain View",
  "storeAddress": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
  "phoneNumber": "+18005550100",
  "storeCode": "{STORE_CODE}",
  "targetAccount": "{TARGET_MERCHANT_ID}"
}

Replace the following:

  • {PARENT}: accounts/{LFP_ACCOUNT_ID}, where {LFP_ACCOUNT_ID} is the ID of your LFP-enabled provider account.
  • {STORE_CODE}: A unique store identifier that you assign for the target merchant.
  • {TARGET_MERCHANT_ID}: The Merchant Center account ID of the merchant to submit the store for.

A successful request returns the matched LfpStore resource. Check matchingState (and matchingStateHint if matching fails) to confirm that Google matched the location to a verified Business Profile store:

{
  "name": "accounts/{LFP_ACCOUNT_ID}/lfpStores/{TARGET_MERCHANT_ID}~{STORE_CODE}",
  "targetAccount": "{TARGET_MERCHANT_ID}",
  "storeCode": "{STORE_CODE}",
  "storeName": "Example Store Mountain View",
  "storeAddress": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
  "phoneNumber": "+18005550100",
  "matchingState": "STORE_MATCHING_STATE_MATCHED"
}

You can also retrieve, list, or delete submitted store records using lfpStores.get, lfpStores.list, and lfpStores.delete. For full field definitions and method details, see the accounts.lfpStores reference.

Insert local inventory

Use accounts.lfpInventories.insert to submit in-store availability, price, quantity, and pickup details for a product at a specific store. Submitting an entry for an existing store and offer replaces the previous entry, and inventory entries expire after 14 days unless refreshed.

Google links each inventory entry to product details based on your setup:

  • Uploaded or existing product data: If you upload product data with productInputs.insert or use existing product data in the merchant's Merchant Center account, the offerId in lfpInventories.insert must match the offerId in that product data (along with matching contentLanguage and feedLabel or regionCode). Use a product data source when enabling merchant-hosted local storefronts, other Merchant Center programs, or products without valid Global Trade Item Numbers (GTINs).
  • Google catalog matching with GTINs: For Google-hosted local storefronts, if the account has no product data source or the offerId values don't match existing products, include a valid gtin in lfpInventories.insert. Google matches the item to its catalog and automatically creates a product data source in the target Merchant Center account.

To insert local inventory, send the following request:

POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpInventories:insert

{
  "availability": "in stock",
  "collectionTime": "2024-01-08T08:00:00Z",
  "contentLanguage": "en",
  "gtin": "0012345678905",
  "offerId": "{OFFER_ID}",
  "pickupMethod": "buy",
  "pickupSla": "same day",
  "price": {
    "amountMicros": "1000000",
    "currencyCode": "USD"
  },
  "regionCode": "US",
  "storeCode": "{STORE_CODE}",
  "targetAccount": "{TARGET_MERCHANT_ID}"
}

Replace the following:

  • {PARENT}: accounts/{LFP_ACCOUNT_ID}, where {LFP_ACCOUNT_ID} is the ID of your LFP-enabled provider account.
  • {OFFER_ID}: The unique identifier of the product. Must match the offerId in the merchant's product data when using uploaded or existing product data.
  • {STORE_CODE}: The store identifier from the merchant's linked Business Profile or from lfpStores.insert.
  • {TARGET_MERCHANT_ID}: The Merchant Center account ID of the merchant you are submitting inventory for.

A successful request returns the following response:

{
  "name": "accounts/{LFP_ACCOUNT_ID}/lfpInventories/{TARGET_MERCHANT_ID}~{STORE_CODE}~{OFFER_ID}",
  "targetAccount": "{TARGET_MERCHANT_ID}",
  "storeCode": "{STORE_CODE}",
  "offerId": "{OFFER_ID}",
  "regionCode": "US",
  "contentLanguage": "en",
  "gtin": "0012345678905",
  "price": {
    "amountMicros": "1000000",
    "currencyCode": "USD"
  },
  "availability": "in stock",
  "collectionTime": "2024-01-08T08:00:00Z",
  "pickupMethod": "buy",
  "pickupSla": "same day",
  "feedLabel": "US"
}

For full field definitions and method details, see accounts.lfpInventories.insert.

Insert a sale

Use accounts.lfpSales.insert to submit point-of-sale transaction events for a merchant's store. Use the same storeCode and offerId values across your inventory, sales, and any product data submissions. For Google-hosted local storefronts without matching product data, Google uses gtin to match the item to its catalog and automatically create a product data source.

To insert a sale, send the following request:

POST https://merchantapi.googleapis.com/lfp/v1/{PARENT}/lfpSales:insert

{
  "contentLanguage": "en",
  "gtin": "0012345678905",
  "offerId": "{OFFER_ID}",
  "price": {
    "amountMicros": "1000000",
    "currencyCode": "USD"
  },
  "quantity": "2",
  "regionCode": "US",
  "saleTime": "2024-01-08T08:00:00Z",
  "storeCode": "{STORE_CODE}",
  "targetAccount": "{TARGET_MERCHANT_ID}"
}

Replace the following:

  • {PARENT}: accounts/{LFP_ACCOUNT_ID}, where {LFP_ACCOUNT_ID} is the ID of your LFP-enabled provider account.
  • {OFFER_ID}: The unique identifier of the product.
  • {STORE_CODE}: The identifier of the merchant's store.
  • {TARGET_MERCHANT_ID}: The Merchant Center account ID of the merchant to submit the sale for.

A successful request returns the following response:

{
  "name": "accounts/{LFP_ACCOUNT_ID}/lfpSales/{UUID}",
  "targetAccount": "{TARGET_MERCHANT_ID}",
  "storeCode": "{STORE_CODE}",
  "offerId": "{OFFER_ID}",
  "regionCode": "US",
  "contentLanguage": "en",
  "gtin": "0012345678905",
  "price": {
    "amountMicros": "1000000",
    "currencyCode": "USD"
  },
  "quantity": "2",
  "saleTime": "2024-01-08T08:00:00Z",
  "uid": "{UUID}",
  "feedLabel": "US"
}

For full field definitions and method details, see accounts.lfpSales.insert.

Retrieve a merchant's onboarding status

Use accounts.lfpMerchantStates.get to retrieve a merchant's Local Feeds Partnership state, including the number of linked Business Profiles (linkedGbps), per-store matching states (storeStates), submitted inventory counts (inventoryStats), and per-country local inventory ads, free local listings, and verification states (countrySettings). Use these properties to verify whether the integration is working as expected or if further onboarding actions are needed.

GET https://merchantapi.googleapis.com/lfp/v1/accounts/{LFP_ACCOUNT_ID}/lfpMerchantStates/{TARGET_MERCHANT_ID}

Replace the following:

  • {LFP_ACCOUNT_ID}: The ID of your LFP-enabled provider account.
  • {TARGET_MERCHANT_ID}: The Merchant Center account ID of the merchant to inspect.

To view a complete code example, see Get LFP merchant state.