AI-generated Key Takeaways
- 
          The Merchant API is the new version of the Content API for Shopping and is now in beta. 
- 
          Version 2 of the Content API for Shopping has been sunset; users need to migrate to version 2.1 immediately. 
- 
          Migrating to v2.1 involves updating endpoint URLs and accounting for breaking changes, like the removal of the inventoryservice and changes to various other services.
- 
          Version 2.1 introduces new features like the localinventoryandorderreturnsservices, supplemental feeds, and changes to theproductsservice.
- 
          For detailed information on the Merchant API Beta and migration, refer to the provided links. 
In March 2019, we released version 2.1 of the Content API for Shopping, and in April 2021, we announced that v2 would sunset on September 30, 2021. Version v2 has sunset. Please migrate to v2.1 immediately.
Migrate your application
Migrating from v2 to v2.1 involves updating your endpoint URLs to call the new v2.1 versions and modifying your applications to account for breaking changes introduced in v2.1.
Update your API calls to use v2.1 endpoints
To make calls to v2.1, update your requests to use the new v2.1 endpoints.
For example, to call the products.get method with v2, you would use:
GET https://shoppingcontent.googleapis.com/content/v2/merchantId/products/productId
For v2.1, update the URL to:
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products/productId
For complete information on v2.1 services and endpoints, see the API Reference.
Make required changes
In addition to updating the URLs for your API calls, you also need to update your application to account for several breaking changes introduced in v2.1. Review the following sections and update your application, as needed.
1. Update integrations with the inventory service
The v2 inventory service has been removed, and equivalent functionality is
available with the following v2.1 features:
- Use new Supplemental Feeds or - products.updatefor partial product updates. Updates are possible to all mutable product fields, including all fields previously updated with- inventory.set(excluding those exclusive to- localinventory). See Migrate to supplemental feeds for more details.
- Use the new - localinventoryservice for local product updates.
2. Update calls to the accounts service
- Calls to the - accounts.updatemethod in v2.1 completely overwrite the- accountsresource, instead of only updating the fields included in the request. To avoid deleting fields on the- accountsresource, update your call requests to include all fields.
- The - reviewsUrlhas been removed.
- The link status - inactivehas been removed for- adsLinks,- googleMyBusinessLink, and- youtubeChannelLinks.
3. Update calls to the products service
- Custom attributes no longer contain a type and unit. Instead, units are to be appended to the value and types should be automatically detected. 
- The repeated field - productTypeshas replaced both- productTypeand- additionalProductTypes.
- The repeated fields - includedDestinationsand- excludedDestinationshave replaced the repeated field- destinations.
- The following AdWords-related fields have been renamed: - adwordsGrouping->- adsGrouping
- adwordsLabels->- adsLabels
- adwordsRedirect->- adsRedirect
 
- The following fields have been removed: - aspects
- destinations
- onlineOnly
- validatedDestinations
- warnings
 
- The - includeInvalidInsertedItemsparameter has been removed. In v2.1, all products are returned by default.
- There is now a delay of a few minutes before an inserted product can be retrieved via - products.getor- products.list.
- The returned - offerIdis no longer guaranteed to be the same as the input- offerId. v2.1 trims leading and trailing whitespace in the- offerIdand merges multiple whitespace characters into one. This change does not impact- offerIdvalues that conform to the recommended- offerIdsyntax.
- Prices are now validated before product insertion. Only the following characters are allowed in the value string: - +,- -,- ., and digits (i.e.,- 0-- 9). Commas are no longer accepted.
- Responses from a - products.insertor- products.updatecall only contain the following attributes:- channel
- contentLanguage
- id
- offerId
- feedLabel
 
- The v2 option - includeAttributesis deprecated. Instead, use- products.getwith the- ProductIdto view full product information.
4. Update calls to the productstatuses service
- The - productattribute has been removed, along with the- includeAttributesparameter. To retrieve attributes of the product corresponding to a status, use the- productsservice and pass the value of the new- productIdfield.
- The - includeInvalidInsertedItemsparameter has been removed. The- productIdof every product is now returned regardless of whether the product is valid.
- The - intention,- approvalStatus, and- approvalPendingfields in- destinationStatuseshave been replaced by- status, which is a string that can be one of- approved,- disapproved, or- pending.
- dataQualityIssueshas been replaced by- itemLevelIssues.
5. Update calls to the datafeeds service
- The following target fields have been replaced: - contentLanguage->- language
- targetCountry->- country
- intendedDestinations->- includedDestinations, and- excludedDestinations
 
- Data feeds with - contentType = "product inventory update"have been removed.
6. Update calls to the orders and TestOrders services
- In v2.1, calls should not not include tax data because tax data is calculated automatically. If the order is fulfilled in a state with a Marketplace Fairness Act (MFA) or similar, calls that include tax data fail. If the order is fulfilled in a non-MFA state, tax is calculated based on settings configured in Merchant Center. If not configured, the calculated tax is 0. 
- The - InStoreRefundLineItemand- ReturnRefundLineItemfields- amountPretaxand- amountTaxhave been replaced by- priceAmountand- taxAmount, respectively.- priceAmountcan be pre-tax or post-tax, depending on the location of the order.
- The - ShipLineItemfields- carrier,- shipmentId, and- trackingIdin the request have been moved to- shipmentInfos.
- billingAddressand- predefinedBillingAddressare now top-level fields in- ordersand- TestOrder, respectively.
- customer.explicitMarketingPreferencehas been replaced by- customer.marketingRightsInfo.
- The - netAmountfield has been split into- netPriceAmountand- netTaxAmount.
- shippingOptionhas been replaced by- lineItems[].shippingDetails.
- The - CancelLineItemfields- amount,- amountPretax, and- amountTaxin the request have been removed. The refunded amount is now calculated automatically.
- CustomBatchhas been removed.
- Refundhas been removed. Use- refundOrderor- refundIteminstead.
- The - paymentMethodfield has been removed.
- The v2 methods - orders.returnlineitemand- orders.refundare replaced by- orderreturns.creatOrderReturnand- orderreturns.process.
- The - customer.email,- channelType, and- lineItem.product.channelfields have been removed.
- The - promotionsfield has been removed from the- TestOrderservice and its format changed in- Order.
7. Update calls to the orderinvoice service
- The - amountPretaxand- amountTaxfields have been replaced by- priceAmountand- taxAmount, respectively. The- priceAmountfield can be pre-tax or post-tax, depending on the location of the order.
- Removed balances (merchant, customer, Google) in - invoiceSummaryand promotion charge related fields.
8. Remove functionality not included in v2.1
Several other features have been removed from the Content API in v2.1. Review the following list and update your application, as needed:
- XML is no longer supported. For more information on switching to JSON, see Sunset of XML support in the Content API for Shopping. 
- The - dryRunparameter has been removed. This change applies to all API calls.
- All - HTTP BATCHmethods have been removed. Use- customBatchinstead.
- The - patchmethod has been removed from the following services:- accounts
- accounttax
- datafeeds
- liasettings
- shippingsettings
 
- The - orderpaymentsservice has been removed.
Test your migration
For more information on testing the changes to your applications after migrating to v2.1, see Testing Uses of the Content API for Shopping. If you encounter issues while testing your updates, you can contact us.
Additional changes in v2.1
In addition changes that require updates, v2.1 also introduces several new features and non-breaking changes:
- New services: - The new - localinventoryservice lets you make local product updates (in place of the- inventoryservice in v2).
- The new - orderreturnsservice makes it easier to manage Buy on Google (formerly known as Shopping Actions) by letting you process returns without having to use the- ordersservice.
 
- Supplemental Feeds let you make partial product updates. 
- Additional changes to the - productsservice:- products.insertrequests no longer report non-fatal warnings or errors. This lets you insert products and make subsequent updates to resolve issues via feed rules in Merchant Center, just as you would with feeds managed outside the Content API.
- products.updatehas been added to let you make updates to a chosen set of product fields. For more information on possible usage see the guide.
- Invalid values for the following attributes no longer trigger insertion errors, and returned as part of - itemLevelIssuesby the- productstatusservice:- ageGroup
- availability
- condition
- energyEfficiencyClass
- gender
- maxEnergyEfficiencyClass
- minEnergyEfficiencyClass
- sizeSystem
- sizeType
 
- Custom attributes are now recursive, which removes the need for custom groups. 
- Custom attributes now have a - groupValuesfield in addition to the original- valuefield. Exactly one of the fields must be set.