You can use the Merchant API to share your inventories, stores, and sales data
with Google for better visibility and management.

## New features

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
- A method to send a notification to a retailer

For details on these methods, see [Local feeds partnership
API](https://developers.google.com/merchant/api/guides/local-feeds-partnership/overview).

## Requests

Use the following request URL format for the local feeds partnership API:

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

For more information, see [Method:
accounts.lfpInventories.insert](https://developers.google.com/merchant/api/reference/rest/lfp_v1/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:

|---|---|---|
|   | Content API | Merchant API |
| URL | `POST https://shoppingcontent.googleapis.com/content/v2.1/`<var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var>`/inventory` | `POST https://merchantapi.googleapis.com/lfp/v1/`<var translate="no">{PARENT}</var>`/lfpInventories:insert` |
| Identifiers | <var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var> | <var translate="no">{PARENT}</var> |

Here's a sample comparison of the Content API for Shopping to the local feeds
partnership API for the request to insert a sale:

|---|---|---|
|   | Content API | Merchant API |
| URL | `POST https://shoppingcontent.googleapis.com/content/v2.1/`<var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var>`/sale` | `POST https://merchantapi.googleapis.com/lfp/v1/`<var translate="no">{PARENT}</var>`/lfpSales:insert` |
| Identifiers | <var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var> | <var translate="no">{PARENT}</var> |

Here's a sample comparison of the Content API for Shopping to the local feeds
partnership API for the request to insert a store:

|---|---|---|
|   | Content API | Merchant API |
| URL | `POST https://shoppingcontent.googleapis.com/content/v2.1/`<var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var>`/store` | `POST https://merchantapi.googleapis.com/lfp/v1/`<var translate="no">{PARENT}</var>`/lfpStores:insert` |
| Identifiers | <var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var> | <var translate="no">{PARENT}</var> |

## Methods

Here's what changed for the store API methods in the local feeds partnership
API:

|---|---|---|---|---|---|
| Method | URL in Content API for Shopping | URL in Merchant API | Identifiers in Content API for Shopping | Identifiers in Merchant API | Description |
| `insert` | `POST https://shoppingcontent.googleapis.com/content/v2.1/`<var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var>`/store` | `POST https://merchantapi.googleapis.com/lfp/v1/`{parent=accounts/\*}`/lfpStores:insert` | <var translate="no">{MERCHANT_ID}</var>`/pos`/<var translate="no">{TARGETMERCHANT_ID}</var> | <var translate="no">{PARENT}</var> | `parent` is in the format of `accounts/{IFP_PARTNER_ACCOUNT_ID}` |
| `delete` | `DELETE https://shoppingcontent.googleapis.com/content/v2.1/`<var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var>`/store/`<var translate="no">{STORE_CODE}</var> | `DELETE https://merchantapi.googleapis.com/lfp/v1/`{name=accounts/\*/lfpStores/\*} | <var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var>`/store/`<var translate="no">{STORE_CODE}</var> | <var translate="no">{NAME}</var> | `name` is in the format of `accounts/`<var translate="no">{IFP_PARTNER_ACCOUNT_ID}</var>`/lfpStores/`<var translate="no">{TARGETMERCHANT_ID}</var>\~<var translate="no">{STORE_CODE}</var> |
| `get` | `GET https://shoppingcontent.googleapis.com/content/v2.1/`<var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var>`/store/`<var translate="no">{STORE_CODE}</var> | `GET https://merchantapi.googleapis.com/lfp/v1/`{name=accounts/\*/lfpStores/\*} | <var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var>`/store/`<var translate="no">{STORE_CODE}</var> | <var translate="no">{NAME}</var> | `name` is in the format of `accounts/`<var translate="no">{IFP_PARTNER_ACCOUNT_ID}</var>`/lfpStores/`<var translate="no">{TARGETMERCHANT_ID}</var>\~<var translate="no">{STORE_CODE}</var> |
| `list` | `GET https://shoppingcontent.googleapis.com/content/v2.1/`<var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var>`/store` | `GET https://merchantapi.googleapis.com/lfp/v1/`{parent=accounts/\*}`/lfpStores` | /<var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var> | <var translate="no">{PARENT}</var> | `{PARENT}` is in the format of `accounts/`<var translate="no">{IFP_PARTNER_ACCOUNT_ID}</var> |

Here's what changed for the inventory API methods in the local feeds partnership
API:

|---|---|---|---|---|---|
| Method | URL in Content API for Shopping | URL in Merchant API | Identifiers in Content API for Shopping | Identifiers in Merchant API | Description |
| `insert` | `POST https://shoppingcontent.googleapis.com/content/v2.1/`<var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var>`/store` | `POST https://merchantapi.googleapis.com/lfp/v1/`<var translate="no">{PARENT}</var>`/lfpInventories:insert` | <var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var> | <var translate="no">{PARENT}</var> | `parent` is in the format of `accounts/`<var translate="no">{IFP_PARTNER_ACCOUNT_ID}</var> |

Here's what changed for the sales API methods in the local feeds partnership
API:

|---|---|---|---|---|---|
| Method | URL in Content API for Shopping | URL in Merchant API | Identifiers in Content API for Shopping | Identifiers in Merchant API | Description |
| `insert` | `POST https://shoppingcontent.googleapis.com/content/v2.1/`<var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var>`/store` | `POST https://merchantapi.googleapis.com/lfp/v1/`<var translate="no">{PARENT}</var>`/lfpSales:insert` | <var translate="no">{MERCHANT_ID}</var>`/pos/`<var translate="no">{TARGETMERCHANT_ID}</var> | <var translate="no">{PARENT}</var> | `{PARENT}` is in the format of `accounts/`<var translate="no">{IFP_PARTNER_ACCOUNT_ID}</var> |

## Resources

Here's what has changed for the store resource in the local feeds partnership
API. Fields not included here are unchanged.

|---|---|---|
| Content API for Shopping | Merchant API | Description |
| Not supported | `name: string` | Added new field to differentiate different stores |
| Not supported | `targetAccount: integer` | The Merchant Center account to insert inventories for |
| `targetCountry: string` | `regionCode: string` | `targetCountry` has been renamed to `regionCode` |
| `websiteUrl: string` | `websiteUri: string` | `websiteUrl` has been renamed to `websiteUri` |
| `kind: string` | Not supported | `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.

|---|---|---|
| Content API for Shopping | Merchant API | Description |
| Not supported | `name: string` | Added new field to differentiate different inventories |
| Not supported | `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` has been renamed to `offerId` |
| `quantity: string` | `quantity: string` | `quantity` has been updated to be optional |
| Not supported | `availability: string` | `availability` is required |
| ` price: { object (Price) } ` | ` price: { object (Price) } ` | Price definition has changed. For more information, see [Price](https://developers.google.com/merchant/api/guides/compatibility/overview#price). |
| `timestamp: string` | `collectionTime: string` | `timestamp` has been renamed to `collectionTime` |
| `kind: string` | Not supported | `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.

|---|---|---|
| Content API for Shopping | Merchant API | Description |
| Not supported | `name: string` | Added new field to differentiate different inventories |
| Not supported | `targetAccount:integer` | The Merchant Center account to insert sales for |
| `targetCountry: string` | `regionCode: string` | The CLDR territory code for the country where the product is sold. |
| `itemId: string` | `offerId: string` | `itemId` has been renamed to `offerId` |
| `price: { object (Price) } ` | ` price: { object (Price) } ` | Price definition has changed. For more information, see [Price](https://developers.google.com/merchant/api/guides/compatibility/overview#price). |
| `timestamp: string` | `saleTime: string` | `timestamp` has been renamed to `saleTime` |
| `kind: string` | Not supported | `kind` isn't supported in the local feeds partnership API. |