0% found this document useful (0 votes)
59 views86 pages

GMC Document

The Google Merchant Center APIs support batch requests, allowing multiple API calls to be executed in a single HTTP request using the `custombatch` method. This is particularly useful for initial uploads or synchronizing large datasets, but the execution order of entries is not guaranteed. Developers should be aware of potential failure modes and use `BatchId` to correlate requests and responses.

Uploaded by

Aditi Agarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views86 pages

GMC Document

The Google Merchant Center APIs support batch requests, allowing multiple API calls to be executed in a single HTTP request using the `custombatch` method. This is particularly useful for initial uploads or synchronizing large datasets, but the execution order of entries is not guaranteed. Developers should be aware of potential failure modes and use `BatchId` to correlate requests and responses.

Uploaded by

Aditi Agarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 86

Summary of URL:

https://developers.google.com/shopping-content/guides/quickstart/exploring-the-
content-api:
## Content API for Shopping - Summary

### Overview
The Content API for Shopping allows developers to manage their product listings and
orders in the Google Merchant Center via API calls. This API integrates data from a
selling partner and posts it to the customer's selling account.

### Key Features


- **Authorization**: Uses OAuth for secure access to accounts.
- **Requests**: Supports batch requests for efficiency and standard query
parameters for API calls.

### Important Concepts


- **Merchant API Beta**: This is a new version of the Content API that aims to
improve integrations and functionalities. Users are encouraged to utilize this for
future projects.

### Code Examples


- **Setting up a Python Client Library**:
```python
from google.oauth2 import service_account
from googleapiclient.discovery import build

# Initialize the Content API


credentials =
service_account.Credentials.from_service_account_file('path/to/credentials.json')
service = build('content', 'v2.1', credentials=credentials)
```

- **Making an API Call**:


To insert a product:
```python
product = {
'offerId': '12345',
'title': 'Sample Product',
'description': 'This is a sample product.',
'link': 'http://www.example.com/sample-product',
'condition': 'new',
'availability': 'in stock',
'price': '10.00 USD',
# Add more fields as necessary
}

response = service.products().insert(merchantId='YOUR_MERCHANT_ID',
body=product).execute()
```

### Important Classes and Methods


- **Products Resource**: Managing products within the Merchant Center, it includes
methods like `insert`, `update`, and `delete`.
- **Orders Resource**: Handling order-related information, including order tracking
and management.

### Additional Resources


- **Reference Documentation**: Comprehensive documentation provides detailed
information about API resources, their fields, and methods.
- **Samples and Libraries**: Collection of client libraries (available primarily
for Python) along with sample code.

### Notes and Caveats


- **Beta Version**: As the Merchant API is in beta, expect ongoing changes and new
features that may affect integrations.
- **Rate Limits**: Be aware of quotas and limits to avoid exceeding the API usage.
- **Test Your Code**: Utilize the API Explorer for testing calls with your Merchant
Center credentials before deployment.

This summary provides the essential information needed to start integrating with
the Google Content API for Shopping using Python. Developers should refer to the
documentation for more in-depth details about specific fields and advanced
features.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/how-tos/authorizing:
# Google Merchant Center Content API: Authorization Guide

## Overview
The authorization process for accessing the Google Merchant Center's Content API
follows the OAuth 2.0 protocol. This process allows third-party applications to
request access to user data and ensures secure communication between your
application and Google's services.

## Key Concepts

### OAuth 2.0


- **OAuth 2.0 Flow**: A process to authenticate and authorize access to the user's
data.
- **Registration**: Register your application in the Google API Console to obtain
a client ID and client secret.
- **Request Access**: Your application requests access to specific data scopes.
- **Consent Screen**: Google presents a consent screen for user approval.
- **Access Token**: Upon user approval, an access token is granted.
- **Data Requests**: Use the access token to make API requests.

- **Scopes**: Determine the level of access requested. For the Content API, the
relevant scope is:
- `https://www.googleapis.com/auth/content`: Read/write access.

- **Incremental Authorization**: It’s recommended to request minimum access


required and then ask for more permissions as necessary.

### Verification
Apps that access the Content API must undergo an OAuth verification review.
Unverified apps will display warnings and may have limited functionality. The
review process typically takes 3-5 business days.

## API Example

### PHP Example


This snippet demonstrates how to configure your client and authorize requests using
OAuth 2.0 for a web application.

```php
require_once 'Google/Client.php';

session_start();
$client = new Google_Client();
$client->setApplicationName('Sample Content API application');
$client->setClientId('YOUR_CLIENT_ID');
$client->setClientSecret('YOUR_CLIENT_SECRET');
$client->setRedirectUri('YOUR_REDIRECT_URI');
$client->setScopes('https://www.googleapis.com/auth/content');

if (isset($_SESSION['oauth_access_token'])) {
$client->setAccessToken($_SESSION['oauth_access_token']);
} elseif (isset($_GET['code'])) {
$token = $client->authenticate($_GET['code']);
$_SESSION['oauth_access_token'] = $token;
} else {
header('Location: ' . $client->createAuthUrl());
exit;
}

// Create a Service object to make API requests


require_once 'Google/Service/ShoppingContent.php';
$service = new Google_Service_ShoppingContent($client);
```

### Key Classes and Methods


- **Google_Client**: Main class for handling OAuth 2.0 authentication and API
client functionality.
- `setApplicationName()`: Sets the name of your application.
- `setClientId()`: Sets the client ID obtained from the console.
- `setClientSecret()`: Sets the client secret obtained from the console.
- `setRedirectUri()`: Sets the URI where Google redirects after user approval.
- `setScopes()`: Defines the scopes of access requested.

- **Google/Service/ShoppingContent**: Class for interacting with the Shopping


Content API after authentication.

## Important Notes
- Ensure your application is OAuth verified to avoid limitations and warnings for
users.
- Use session management to store and retrieve the access token for user sessions.
- Follow best practices for handling sensitive data like client secrets and access
tokens.
- Refer to the Google OAuth 2.0 documentation for more extensive details on
additional flows and methods.

This guide focuses exclusively on Python examples related to the Google Merchant
Center APIs for those specifically looking for Python implementations, while
acknowledging that alternate options in other languages (like Node.js, PHP, and
Ruby) are available as needed.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/how-tos/service-accounts:
### Summary of Service Accounts for the Content API for Shopping

#### Key Concepts


- **Service Accounts**: Special Google accounts intended for programmatic access to
Google APIs without human authorization. They use OAuth 2.0 and a key file for
authentication.
- **OAuth 2.0 Flow**: Service accounts operate under a different authentication
model that does not involve user interaction; instead, access is determined by the
permissions granted in the Merchant Center.

#### Prerequisites
- A Merchant Center account.

#### Steps to Access the Content API with Service Accounts


1. **Generate Service Account Credentials**:
- Go to the [Google API Console](https://console.developers.google.com/).
- Select or create a new project.
- Enable the Content API for Shopping.
- Go to "Credentials" and select "Create Credentials" -> "Service Account".
- Name the service account, and record the service account ID for later use.
- Click "Create", follow any optional steps, and select a role (usually "Project
> Viewer" suffices).
- Under the Keys tab, create a new JSON key to download the private key file.

2. **Add the Service Account to Merchant Center**:


- Navigate to "Account Access" in Merchant Center settings.
- Click "+ Add user" and use the service account ID as the email address.
- Set user access and notification preferences, ensuring Admin access for the
Accounts service is given.
- Click "Add user" to save.

3. **Access Merchant Center**:


- Use the service account either through Google Application Default Credentials
or directly through the service account flow.

#### Important Notes


- **Access Limitations**: Service accounts can only access their own Merchant
Center accounts. For third-party applications needing access to client accounts,
consult the "Authorizing Requests" guide.
- **UI Access**: Service accounts cannot sign in to the Merchant Center UI; they
are not regular Google accounts.
- **Token Refresh**: Access tokens are valid for one hour. After expiry, use the
client library to fetch a new token.

#### Code Example Usage


To utilize service account keys in Python, you would typically employ libraries
such as `google-auth` and `googleapiclient`. Here is a basic structure for
accessing the Content API:

```python
from google.oauth2 import service_account
from googleapiclient.discovery import build

# Load the service account credentials from the JSON key file
credentials = service_account.Credentials.from_service_account_file(
'path/to/your/service-account.json'
)

# Build the service object


service = build('content', 'v2.1', credentials=credentials)

# Example API call to list the Merchant Center accounts


merchant_id = 'your_merchant_id'
accounts = service.accounts().list(merchantId=merchant_id).execute()

print(accounts)
```

### Important Classes and Methods


- **`service_account.Credentials`**: Handles loading and managing service account
credentials.
- **`build(service_name, version, credentials)`**: Constructs a resource for
interacting with the specified API service.

### Developer Caveats


- Always ensure that the service account has been granted the appropriate
permissions in Merchant Center to perform required operations.
- Manage the security of the JSON key file carefully, as it provides access to your
API and can be sensitive information.

For detailed examples specific to Python, consult the [Content API for Shopping
Samples](https://developers.google.com/shopping-content/samples).
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/control-


access:
**Google Merchant Center API: Control Access Guidelines**

### Overview
The Control Access section of the Content API for Shopping outlines how to manage
user permissions within a Merchant Center account.

### User Roles and Access Levels


- **Super Admin**: This role has unrestricted access and cannot be removed from the
Merchant Center.
- **Admin**: Can add, remove, and edit accounts. Admins can manage apps and stores.
- **Standard**: Sign in and access all features, but cannot modify user access or
manage apps.
- **Email-only Access**: No account access, but receives reports and notifications
via email.
- **Reporting Manager**: Can view and edit all reports and dashboards within the
account.

### Key Considerations


- A single user can be added to a maximum of **100 Merchant Center accounts**.
- Access levels define the permissions available to users, which impacts how they
interact with the various features of the Merchant Center.

### Important Notes


- The Content API leverages **OAuth** for authorization.
- Proper management of user roles is crucial for the security and organization of
the Merchant Center account.

### API Integration


Although this documentation does not provide specific code examples or API snippets
for user role management, it’s essential for developers interested in integrating
with the Google Merchant Center APIs to refer to detailed documentation in the API
reference section for the exact endpoints and request structures.
### Summary
Developers should focus on understanding user roles and their implications on
account management within the Merchant Center. Proper access control ensures that
only authorized users can perform sensitive operations, helping maintain account
security.

### Licensing
Content is offered under the Creative Commons Attribution 4.0 License, and code
samples are under the Apache 2.0 License. Please refer to the Google Developers
Site Policies for further information.

---

For practical coding examples and the latest updates, developers should consult the
API Reference and other guides available on the official [Google Developers site]
(https://developers.google.com/shopping-content/guides/control-access).
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/making-


requests:
# Summary of Google Merchant Center Content API for Shopping

## Overview
The Google Content API for Shopping allows users to manage product data in a
Merchant Center account programmatically. This documentation guide provides code
snippets primarily for Python for creating, retrieving, and updating products,
using the API efficiently and following best practices.

## Key Concepts
- **Merchant Account**: You need an active Merchant Center account to interact with
the API.
- **API Requests**: Interaction with the API is done through HTTP requests,
including GET, POST, and batch requests.
- **Authorization**: All requests must be authorized, typically using OAuth 2.0.

## API Snippets

### 1. Create a Product


To add a product, use the following request format:

**Endpoint:**
```
POST /content/v2.1/YOUR_MERCHANT_ID/products
```

**Request Body:**
```json
{
"offerId": "book123",
"title": "A Tale of Two Cities",
"description": "A classic novel about the French Revolution",
"link": "http://my-book-shop.com/tale-of-two-cities.html",
"imageLink": "http://my-book-shop.com/tale-of-two-cities.jpg",
"contentLanguage": "en",
"targetCountry": "GB",
"feedLabel": "GB",
"channel": "online",
"availability": "in stock",
"condition": "new",
"googleProductCategory": "Media > Books",
"gtin": "9780007350896",
"price": {
"value": "2.50",
"currency": "GBP"
},
"shipping": [{
"country": "GB",
"service": "Standard shipping",
"price": {
"value": "0.99",
"currency": "GBP"
}
}],
"shippingWeight": {
"value": "200",
"unit": "grams"
}
}
```

### 2. Get a List of Products


To retrieve a list of products:

**Endpoint:**
```
GET /content/v2.1/YOUR_MERCHANT_ID/products
```

**Python Code Example:**


```python
productsList = service.products().list(merchantId)
response = productsList.execute()
for product in response.get('resources', []):
print(product['id'], product['title'])
```

### 3. Retrieve a Specific Product


To get details about a specific product:

**Endpoint:**
```
GET /content/v2.1/YOUR_MERCHANT_ID/products/online:en:GB:book123
```

**Python Code Example:**


```python
product = service.products().get(merchantId, "online:en:GB:book123").execute()
print(product['id'], product['title'])
```

### 4. Update Product Availability


To update the availability of an online product using supplemental feeds:

**Endpoint:**
```
POST /content/v2.1/YOUR_MERCHANT_ID/products?YOUR_SUPPLEMENTAL_FEED_ID
```

**Request Body:**
```json
{
"offerId": "book123",
"contentLanguage": "en",
"targetCountry": "GB",
"feedLabel": "GB",
"channel": "online",
"availability": "out of stock"
}
```

### 5. Update Local Product Availability


For local inventory updates:

**Endpoint:**
```
POST
/content/v2.1/YOUR_MERCHANT_ID/localinventory/online/products/online:en:GB:book123
```

**Request Body:**
```json
{
"availability": "out of stock"
}
```

## Important Notes
- **Batch Requests**: The API supports batch requests, which can be more efficient
for multiple operations.
- **Best Practices**: Following best practices for error handling and API calls is
essential. Refer to related best practices documentation.
- **Quotas and Limits**: Be aware of usage limits to avoid service interruptions.
- **Merchant API Beta**: There is a newer Merchant API Beta version available, with
enhancements for integration.

## Conclusion
This guide provides essential information to interact with the Google Content API
for Shopping through Python code examples. Be sure to refer to the official
documentation for the most recent updates and comprehensive details.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/how-tos/batch:
### Summary: Google Merchant Center Batch Requests

The Google Merchant Center APIs allow you to gather data from customers and post
data to their selling accounts using various API calls. The focus here is on batch
requests, which enable multiple calls to be executed in a single request.

#### Key Concepts

1. **Batch Requests**:
- Group several API calls (entries) into a single HTTP request using the
`custombatch` method.
- Suitable for initial uploads or synchronizing large amounts of data.

2. **Execution Order**:
- There is no guarantee that entries will be executed in the order they are
sent.
- Responses may also be returned out of order; use `BatchId` to correlate
requests and responses.

3. **Failure Modes**:
- Two types of failures:
- Top-level errors: Individual entry responses are not returned.
- Individual entry errors: Responds with details for each failing entry.

#### API Methods for Batch Requests

You can organize your batch requests using the following custom batch methods for
different resources:

- **Accounts**: `accounts.custombatch`
- **Account Statuses**: `accountstatuses.custombatch`
- **Account Tax**: `accounttax.custombatch`
- **Datafeeds**: `datafeeds.custombatch`
- **Datafeed Statuses**: `datafeedstatuses.custombatch`
- **Local Inventory**: `localinventory.custombatch`
- **Local Inventory Settings**: `liasettings.custombatch`
- **POS**: `pos.custombatch`
- **Products**: `products.custombatch`
- **Product Statuses**: `productstatuses.custombatch`
- **Shipping Settings**: `shippingsettings.custombatch`

#### Important Limits

- Maximum number of entries in each custom batch request: **1,000**


- Maximum payload size: **32MB**
- Exceeding limits raises errors:
- "Too many requests in a batch."
- "Request payload size exceeds the limit: %d bytes."

#### Usage Example

Here is a basic structure for making a batch request:

```json
POST https://shoppingcontent.googleapis.com/content/v2.1/accounts/custombatch
{
"entries": [
{
"batchId": "1",
"method": "insert",
"accountId": 123456,
"product": {
"offerId": "ABC123",
"title": "Sample Product",
"description": "Sample product description.",
"link": "http://www.example.com/product/ABC123",
"condition": "new",
"availability": "in stock",
"price": "19.99 USD"
}
},
{
"batchId": "2",
"method": "update",
"accountId": 123456,
"product": {
"offerId": "DEF456",
"price": "24.99 USD"
}
}
]
}
```

#### Important Notes and Caveats

- **Do not include interdependent calls** in a single batch request to avoid order
issues.
- Ensure your implementation is updated to comply with limits imposed as of May 31,
2022.
- This API is currently in beta, and information can be found in the [Merchant API
Beta announcement](https://developers.google.com/shopping-content/guides/how-tos/
batch).

This summary provides a clear reference for developers looking to utilize Google
Merchant Center's batch request capabilities through its API, focusing on Python
programming for API interaction.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/parameters:


# Summary of Google Merchant Center APIs Documentation

## Overview
The Google Content API for Shopping allows developers to interact programmatically
with the Google Merchant Center. It is designed to gather data from a selling
partner’s account and post data to that account. The API is being succeeded by the
Merchant API Beta, which is more advanced. Relevant query parameters apply to all
operations within the API.

## Key Features
- **API Methods:** The API offers methods for managing product data, shipping, and
ads.
- **Authorization:** Uses OAuth for service accounts to control access.
- **Query Parameters:** Standard query parameters are documented and are applicable
to all methods.

## Important Classes and Methods


- **Content API for Shopping**: The main entry point to interact with various
resources related to products, accounts, and orders.

## Code Examples
Currently, no specific code snippets or API requests are provided in the extracted
content. However, developers looking for Python examples should only refer to the
Python SDK and avoid other languages like Node.js, PHP, or Ruby.

### Example API Call Structure


```python
# Hypothetical Example - replace with actual endpoints and parameters
import requests

url = 'https://content.googleapis.com/content/v2.1/accounts/{accountId}/products'
headers = {'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
response = requests.get(url, headers=headers)

if response.status_code == 200:
data = response.json()
print(data) # Handle the retrieved product data
else:
print(f'Error: {response.status_code} - {response.text}')
```

## Key Concepts
- **OAuth for Service Accounts**: Required for accessing the API securely.
- **Query Parameters**: Standard query parameters applicable across API methods
must be referenced to understand integration deeply.
- **Merchant API Beta**: Future-focused API with enhanced capabilities, which
developers can provide feedback on to improve.

## Important Notes and Caveats


- The page content noted that "except as otherwise noted," licenses for content and
code samples should be checked as they fall under different licenses (Creative
Commons and Apache).
- Be aware that the Content API for Shopping is transitioning to the Merchant API
Beta, which may have different integration scopes and features.
- Follow best practices for performance and quota management when making API calls.

## Conclusion
Developers should focus on the query parameters applicable to their required
operations and stay updated on the transition to the Merchant API Beta, ensuring
they are using the most appropriate resources for interactions with Google Merchant
accounts.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/how-tos/testing:
### Summary of Google Merchant Center Testing Documentation

#### Overview
The documentation provides guidance on testing code that utilizes the Content API
for Shopping. The approach is to set up a separate Merchant Center account
specifically for testing purposes, which allows you to conduct manual and automated
tests without impacting active feeds or Shopping campaigns.

#### Key Steps to Set Up a Test Environment


1. **Create a New Google Account**: This account will be associated with your
testing Merchant Center.
2. **Set Up a Merchant Center Account**: Follow the "Getting Started" guide to set
up your new account without validating a website URL.
3. **Create a Developer Project**: In the Google API Console, create a new project
and enable the Content API for Shopping for that project.
4. **Create Credentials**: Generate appropriate credentials using the service
account flow for easier testing without dealing with access tokens.
#### Important Concepts
- **Merchant API Beta**: This is the new version of the Content API for Shopping,
signifying a transition and future developments in API usage.
- **Testing Limitations**: The testing Merchant Center account may face suspension
due to invalid products as it's expected to operate without a valid storefront
website, but API validation checks will still provide feedback on common errors.

#### Recommended Practices


- Utilize the Python client library for effective testing with the Content API.
Sample code can be found on the Samples and Libraries page.

#### Important Notes


- Any products uploaded during testing will be automatically disapproved due to the
invalid account state, even though validation checks for required fields will still
occur.
- The API is designed to be tested thoroughly, and developers should anticipate
receiving feedback on data quality issues during these engagements.

### Conclusion
Developers looking to test the Google Merchant Center APIs should focus on setting
up a dedicated test environment with the steps provided and keep in mind the
limitations associated with using an account without a valid storefront. Utilizing
the Python client library will enhance the ease of testing and integration.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/how-tos/severity-mapping:
### Summary of Google Merchant Center API: Issue Severity Mapping

#### Overview
The Google Merchant Center APIs allow users to monitor their product status and
manage issues affecting their accounts or products. This is particularly useful for
automating alerts regarding issues through the Content API.

#### Key Concepts


- **Account Level Issues**: These represent problems that affect the entire
Merchant Center account like policy violations.
- **Item Level Issues**: These are specific to individual products and affect their
visibility or ability to serve in ads.
- **Severity Levels**: Issues are prioritized as critical, error, or suggestion,
corresponding to:
- **Critical**: Account suspension or major violations.
- **Error**: Problems that require immediate action to continue serving products.
- **Suggestion**: Recommendations for optimizations that are not mandatory but
advisable.

#### API Snippets

##### 1. Get Account Status


You can check for issues related to your account using the `accountstatuses.get`
method. The response structure is as follows:

```json
{
"kind": "content#accountStatus",
"accountId": "...",
"accountLevelIssues": [
{
"id": "editorial_and_professional_standards_destination_url_down_policy",
"title": "Account suspended due to policy violation",
"country": "US",
"severity": "critical",
"documentation": "https://support.google.com/merchants/answer/6150244#wycd-
usefulness"
},
{
"id": "missing_ad_words_link",
"title": "No Google Ads account linked",
"severity": "error",
"documentation": "https://support.google.com/merchants/answer/6159060"
}
],
"products": [
{
"channel": "online",
"destination": "Shopping",
"country": "US",
"statistics": {
"active": "0",
"pending": "0",
"disapproved": "5",
"expiring": "0"
},
"itemLevelIssues": [
{
"code": "image_link_broken",
"servability": "disapproved",
"resolution": "merchant_action",
"attributeName": "image link",
"description": "Invalid image [image link]",
"detail": "Ensure the image is accessible.",
"documentation": "https://support.google.com/merchants/answer/6098289",
"numItems": "2"
}
]
}
]
}
```

##### 2. Get Product Status


To retrieve issues affecting specific products, use the `Productstatuses.list`
method:

```json
{
"kind": "content#productstatusesListResponse",
"resources": [
{
"kind": "content#productStatus",
"productId": "online:en:US:online-en-US-GGL614",
"itemLevelIssues": [
{
"code": "mobile_landing_page_crawling_not_allowed",
"servability": "disapproved",
"resolution": "merchant_action",
"attributeName": "link",
"description": "Mobile page not crawlable due to robots.txt",
"documentation": "https://support.google.com/merchants/answer/6098296"
}
]
}
]
}
```

#### Important Classes and Methods


- **accountstatuses.get**: Retrieves issues impacting the Merchant Center account
status.
- **Productstatuses.list**: Fetches issues for each product along with their
severity levels.

#### Usage Notes


- Use the severity field in the account and item level issues to determine the
urgency of addressing specific problems.
- Critical errors can lead to account suspension, whereas errors may lead to
product disapprovals.
- Notifications suggest best practices for improving product data quality and do
not require immediate action.

#### Caveats
- Stay updated with the relevant documentation for each error type to resolve
issues effectively.
- Maintain a routine check on the account and product statuses using the provided
API methods to ensure compliance and optimal performance.

By understanding and utilizing these API methods along with the severity levels,
developers can manage their Google Merchant Center accounts proactively.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/merchant-


support:
# Summary of Google Merchant Center APIs Documentation

## Overview
The Merchant API is the newer version of the Content API for Shopping, designed to
help third-party developers create diagnostic pages for merchants. This guide
provides insights on accessing and utilizing the MerchantSupport service for
troubleshooting within the Merchant Center.

## Key Concepts

### MerchantSupport Service


- **Purpose**: To create UI diagnostics similar to those in the Merchant Center for
merchants using third-party applications.
- **Request Trigger**: Should be triggered by merchant interactions within your
app.

### Important API Methods

1. **Render Account Issues**


- **Endpoint**:
```
POST
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/merchantsupport/
renderaccountissues
```
- **Parameters**:
- `{merchantId}`: Unique identifier for the merchant account.
- Request Body:
```json
{
"user_input_action_option": "BUILT_IN_USER_INPUT_ACTIONS" // For complex
actions
}
```
- **Response Structure**:
```json
{
"issues": [
{
"title": "Misrepresentation",
"impact": {
"message": "Prevents all products from showing in all countries",
"severity": "ERROR",
// More fields...
},
"actions": [
{
"externalAction": {
"type": "REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER",
"uri": "https://merchants.google.com/.../accountissues"
},
"buttonLabel": "Request review"
}
],
// Details and prerendered HTML...
}
]
}
```

2. **Trigger Action**
- **Endpoint**:
```
POST
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/merchantsupport/
triggeraction
```
- **Parameters**:
- `{merchantId}`: Unique identifier for the merchant account.
- Request Body:
```json
{
"actionContext": "ActionContextValue=",
"actionInput": {
"actionFlowId": "flow1",
"inputValues": [
{ "input_field_id": "input1", "checkbox_input_value": { "value":
true } }
]
}
}
```

## Important Classes and Methods

- **User Input Actions**:


- Allows merchants to perform complex actions directly in the app via a dialog
interface.
- Enables displaying multiple action flows for merchant selection.

### Actions Types


- **External Actions**: Redirects merchants to the Merchant Center for resolution.
- **Built-in Simple Actions**: Allows resolution within the application.
- **Built-in User-input Actions**: Can open dialogs for merchants to submit
necessary information.

## Implementation Notes

- **UI Integration**:
- Use of pre-rendered HTML content directly from the API response should be
embedded in the application.
- Ensure to sanitize HTML inputs to prevent XSS vulnerabilities (recommended
usage of libraries like DOMPurify).

- **Caching**:
- Do not cache responses from the MerchantSupport service to always display the
most recent data.

- **Error Handling**:
- Anticipate possible errors such as `INVALID_ARGUMENT` and `FAILED_PRECONDITION`
and guide users to reload or provide the correct inputs.

## Examples

### Displaying Diagnostic Issues


When you receive a response with issues, display them in order of importance:
```json
{
"title": "Misrepresentation",
"impact": {
"message": "Prevents all products from showing in all countries"
}
}
```

### CSS Example for Styling


You can apply CSS styles for better presentations:
```css
.issue-detail {
text-align: left;
width: 700px;
background: white;
padding: 16px;
}
```

### Tooltop Implementation


Include tooltips for additional guidance:
```css
.tooltip:hover .tooltip-text {
visibility: visible;
}
```

## Key Caveats
- Ensure compliance with Google policies for content representation when using the
API.
- Regularly review changes in API and policy as Google may introduce updates that
could affect functionality.

This summary provides the essential steps and considerations for developers to
utilize the Merchant API effectively. For a successful integration, developers
should actively follow the guidelines, handle errors adeptly, and maintain up-to-
date knowledge of documentation changes.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/merchant-


support#user-input:
# Summary of Google Merchant Center APIs Documentation

## Overview of Content API for Shopping


Google Merchant Center APIs provide functionalities to retrieve and post data
necessary for managing a merchant's selling account.

### Key Concepts


- **MerchantSupport Service**: This service allows third-party developers to create
diagnostic pages within their applications, enabling merchants to troubleshoot
account and product issues.
- **User Input Action Options**:
- `REDIRECT_TO_MERCHANT_CENTER`: Default option that redirects merchants to the
Merchant Center for actions requiring more input.
- `BUILT_IN_USER_INPUT_ACTIONS`: Used to implement complex actions within the app
that require merchant input.

### API Calls


#### 1. Requesting Diagnostics
```http
POST
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/merchantsupport/
renderaccountissues?timeZone=America/Los_Angeles&languageCode=en-GB
```
- **Parameters**:
- `{merchantId}`: Unique identifier of the merchant account.
- `timeZone`: Merchant's time zone.
- `languageCode`: Language for the response.

#### Request Body Example


```json
{}
```

#### Sample Response


```json
{
"issues": [
{
"title": "Misrepresentation",
"impact": {
"message": "Prevents all products from showing in all countries",
"severity": "ERROR",
...
},
...
}
],
...
}
```

#### 2. Triggering a User Input Action


```http
POST
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/merchantsupport/
triggeraction
```
- **Request Body Example**:
```json
{
"actionContext": "ActionContextValue=",
"actionInput": {
"actionFlowId": "flow1",
"inputValues": [
{
"input_field_id": "input1",
"checkbox_input_value": {
"value": true
}
}
]
}
}
```

#### Important Notes


- **No Caching**: Do not cache responses from the MerchantSupport service to ensure
the latest information is displayed.
- **Injection Safety**: Always use a sanitizer like DOMPurify before embedding HTML
from external sources into your app.
- **Handling Errors**:
- Validation errors return a status of `INVALID_ARGUMENT`.
- State or internal errors return a status of `FAILED_PRECONDITION` or
`INTERNAL`, instructing the merchant to reload or try again later.

## Implementation Workflow for Diagnostics Page


1. Merchant opens a diagnostics page in the app.
2. App requests diagnostics by calling the MerchantSupport service.
3. Display issues with actionable links to resolve them.
4. Merchant selects an issue to view detailed information and possible actions.
5. Implement actions (external or built-in) based on merchant interactions.

### UI Considerations
- Use styled elements for displaying issues, recommendations, and user input
dialogues.
- Ensure that tooltips and messages visually stand out to assist merchants easily.
### Useful Links
- [Misrepresentation Policy](https://support.google.com/merchants/answer/6150127?
hl=en-US)
- [Adult-oriented Content
Policy](https://support.google.com/merchants/answer/6150138?hl=en-US#wycd-
restricted-adult-content)
- [Missing Policy Information](https://support.google.com/merchants/answer/9158778?
hl=en-US)

By following these guidelines and using the provided API snippets, developers can
effectively integrate Google Merchant Center's functionalities into their
applications.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/best-


practices:
# Google Merchant Center Content API Best Practices Summary

## Overview
The Content API for Shopping allows users to programmatically manage their product
inventory and account settings in Google Merchant Center. This guide highlights
best practices and critical considerations for utilizing the API.

## Key Functions and Usage

### Making API Calls


1. **Send Requests Programmatically**: Use the API to update inventory and product
data as changes occur.
2. **Receive Immediate Feedback**: Instant responses on requests instead of email
summaries.
3. **Incremental Updates**: Update product inventory frequently without resending
whole feeds.

### Managing Accounts


- **Multi-Client Accounts (MCA)**: Use MCA for complex product management across
several sub-accounts.

### API Usage Guidelines


- **Do Not Use Both Data Feeds and Content API for Updates**: Choose one method to
prevent conflicting updates.
- **Batch Requests**: Use the `custombatch` method to optimize processing multiple
requests. Avoid sending multiple updates for the same item in a single batch.
- **Updating Unchanged Items**: Only update items that have changed. Using
Supplemental Feeds can help manage quickly changing attributes like pricing.

## Important Classes and Methods


- **Product Resource**:
- Methods: `products.insert`, `products.get`, `products.update`,
`products.delete`.
- Use `products.get` or `products.list` sparingly for debugging.

- **Account Management**:
- Methods related to account settings: `Accounts.link`, `Accounts.approve`,
`Accounts.remove`.

### Example of a Simple API Snippet


```python
from googleapiclient.discovery import build

# Initialize the Content API service


service = build('content', 'v2.1', developerKey='YOUR_API_KEY')

# Insert a product
product = {
"offerId": "12345",
"title": "Sample Product",
"description": "This is a sample product description.",
"link": "http://www.example.com/sample-product",
"imageLink": "http://www.example.com/image.jpg",
"condition": "new",
"availability": "in stock",
"price": {"value": "15.00", "currency": "USD"}
}

# Call the products.insert method


request = service.products().insert(merchantId='YOUR_MERCHANT_ID', body=product)
response = request.execute()
print(response)
```

## Key Concepts
- **Tokens**: Utilize refresh tokens for maintaining user authentication after
initial access tokens expire (60 mins).
- **Destinations Attributes**: Control which products appear in various shopping
programs using `includedDestinations` and `excludedDestinations`.

## Important Notes
- **Keep Client Libraries Updated**: Always ensure that you are using the latest
version of Google client libraries to prevent issues.
- **Focusing on Product Updates**: Be strategic about when to conduct large updates
or clean-up actions to avoid deactivating items.
- **Managing Item Expiration**: Items must be updated before they reach 30 days of
expiration to prevent deactivation.

## Caveats
- **Interchanging Between API and Data Feeds**: Understand how product ownership
operates between data feeds and API to avoid loss of product data when switching
methods.
- **Deleting Content API Feeds**: Do not delete Content API feeds in the Merchant
Center, as it may lead to loss of product data added through the API.

### Conclusion
The Content API for Shopping is a powerful tool for managing product data, provided
developers adhere to best practices to maintain operational efficiency and data
integrity.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/how-tos/performance:
# Summary of Google Merchant Center Content API Performance Tips

## Key Concepts

1. **Gzip Compression**:
- To reduce bandwidth for API requests, enable gzip compression.
- Required HTTP headers:
```http
Accept-Encoding: gzip
User-Agent: my program (gzip)
```

2. **Partial Responses**:
- Request only the necessary fields in a response to improve performance, which
conserves network, CPU, and memory resources.
- Use the `fields` request parameter to specify the desired fields.
- Example request for full response:
```http
GET https://www.googleapis.com/demo/v1
```

3. **Fields Parameter Syntax**:


- Comma-separated list for multiple fields.
- Nested fields can be accessed with slashes (e.g., `a/b/c`).
- Use parentheses (`( )`) for specific sub-fields:
```http
fields=items(title,characteristics/length)
```

## Code Examples

### Example of Full vs. Partial Response

1. **Full Resource Response**:


```json
{
"kind": "demo",
"items": [
{
"title": "First title",
"comment": "First comment.",
"characteristics": { "length": "short", "accuracy": "high" }
},
{
"title": "Second title",
"comment": "Second comment.",
"characteristics": { "length": "long", "accuracy": "medium" }
}
]
}
```

2. **Partial Response Request**:


```http
GET https://www.googleapis.com/demo/v1?fields=kind,items(title,characteristics/
length)
```
**Partial Resource Response**:
```json
{
"kind": "demo",
"items": [
{ "title": "First title", "characteristics": { "length": "short" }},
{ "title": "Second title", "characteristics": { "length": "long" }}
]
}
```

### Fields Parameter Usage

- **Basic Usage Examples**:


1. Request all elements in an array, but with only `etag` and `items`:
```http
fields=etag,items
```
2. Request only the `title` from all elements:
```http
fields=items/title
```
3. Access only specific nested fields:
```http
fields=author/uri
```

### Handling Errors

- If an error occurs with the `fields` parameter, the server will respond with:
```http
400 Bad Request
```
Example error message: "Invalid field selection a/b".

## Important Notes

- **API Pagination**: For APIs supporting pagination (like `maxResults`), use these
parameters to keep responses manageable. This enhances performance when dealing
with large datasets.
- Always URL encode the `fields` parameter values for successful requests.

By following these guidelines, you can optimize interactions with the Google
Merchant Center APIs effectively.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/how-tos/performance#partial-
response:
### Summary of Google Merchant Center APIs - Performance Tips

#### Key Concepts


1. **Performance Improvement Techniques**:
- Utilize gzip compression to reduce bandwidth.
- Set HTTP Headers:
```
Accept-Encoding: gzip
User-Agent: my program (gzip)
```
- Use partial responses to limit the amount of data returned. This improves
resource efficiency by transferring only necessary fields.

#### Partial Response


- **Requesting Partial Responses**:
- By default, the server returns a full representation of a resource.
- To request only relevant data, use the `fields` request parameter.

- **Example of a request for a full resource**:


```http
GET https://www.googleapis.com/demo/v1
```

- **Example of a request for a partial response**:


```http
GET https://www.googleapis.com/demo/v1?fields=kind,items(title,characteristics/
length)
```

- **Response Format** for a partial request:


```json
{
"kind": "demo",
"items": [{
"title": "First title",
"characteristics": {
"length": "short"
}
}, {
"title": "Second title",
"characteristics": {
"length": "long"
}
}]
}
```

#### Fields Parameter Syntax


- To specify fields in the `fields` parameter, you can:
- Use a comma-separated list to select multiple fields.
- Use nested syntax `a/b` to select sub-fields.
- Use sub-selector syntax `( )` to request specific sub-fields.

- **Examples**:
```plaintext
fields=items // Selects all items
fields=etag,items // Selects etag and all items
fields=items/title // Selects only the title field of items
fields=items(id,author/email) // Selects id and author's email only
```

#### Handling Errors


- If a `fields` parameter has an error, the server returns:
```http
HTTP 400 Bad Request
{
"error": "Invalid field selection a/b"
}
```

#### Notes and Caveats


- Always URL encode the `fields` parameter value for proper functioning.
- For APIs that support pagination (e.g., `maxResults`, `nextPageToken`), utilize
these parameters to limit the results and ensure better performance.
This summary provides essential information for developers working with the Google
Merchant Center Content API to optimize their integration and manage API requests
effectively.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/limits:


# Google Content API for Shopping: Quotas and Limits Summary

## Overview
The Content API for Shopping has strict quotas and limits to ensure fair usage.
These quotas can change without notice. Key points include limits on how often you
can update product data and account information.

## Key Concepts

### Quotas
- **General Policy**: Recommended to update products no more than twice a day and
sub-accounts once a day.
- **Quota Tracking**: Quotas are per-method. Different methods like `get` and
`update` have separate limits.
- **Batch Requests**: Each method call (like those in `custombatch`) counts against
its respective quota.

### Checking Quotas


- Use `quotas.list` with the `merchantId` to check your current quota and usage.
Regularly monitor this to avoid hitting limits.

### Error Handling


- **Exceeded Quotas**:
- Per-minute: `quota/request_rate_too_high`
- Per-day: `quota/daily_limit_exceeded`
- Failed calls due to quota issues do not count towards daily limits, but other
unsuccessful calls do.

### Resource Representation Limits


- **Shipping Settings**: Important limits for various shipping-related fields:
- Shipping services per country: **20**
- Shipping groups per shipping service: **20**
- Labels per shipping group: **30**
- Subtables per shipping group: **100**
- Length of shipping labels: **150 characters**

These limits mirror those in the Merchant Center and cannot be extended.

## Important Notes
- **Method Call Limits**: Calls to `datafeeds.fetchnow` should be minimized; use
the products service for updates more than once daily.
- **Quota Increases**: If you hit quota limits, you can request increases by
providing:
- Your Merchant Center ID
- Methods hitting limits
- Estimated daily calls needed
- Reason for the increase

## Conclusion
Being aware of these quotas and limits is critical for developers using the Content
API for Shopping to avoid service disruptions. Regularly monitor usage and follow
best practices to stay within limits and ensure smooth operation.

---

This summary contains the essential information about quotas, API usage guidelines,
and error handling for the Google Content API for Shopping, focusing on practical
considerations for developers.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/accountstatuses:
# Summary of Google Merchant Center APIs - Account Statuses Resource

The Google Merchant Center API provides methods to view the status of a Merchant
Center account or multi-client accounts (MCAs) and all associated sub-accounts. The
key resource discussed on the documentation page is `accountstatuses`, which allows
merchants to manage and troubleshoot their accounts.

### Key Concepts

- **Account Status**: Utilizes resources to observe the current state and any
issues associated with the Merchant Center account or its sub-accounts.
- **Multi-Client Account (MCA)**: Allows a merchant to manage multiple sub-accounts
under one main account, ideal for merchants with multiple stores or brands.
- **Account Level Issues**: Problems that affect the entire account, such as policy
violations or missing configurations.

### Key Methods

1. **accountstatuses.get**
- **Description**: Retrieves the status for a single merchant account.
- **Request**:
```http
GET
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accountstatuses/
{accountId}
```
- **Response**: Returns account status and associated issues.
- **Example Response**:
```json
{
"kind": "content#accountStatus",
"accountId": "123456789",
"websiteClaimed": true,
"accountLevelIssues": [
{
"id":
"editorial_and_professional_standards_destination_url_down_policy",
"title": "Account suspended due to policy violation: landing page not
working",
"country": "US",
"severity": "critical"
},
...
],
...
}
```

2. **accountstatuses.list**
- **Description**: Fetches status information for all sub-accounts of a given
MCA.
- **Request**:
```http
GET
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accountstatuses
```
- **Response**: Returns a list of account status information across all sub-
accounts.

3. **accountstatuses.custombatch**
- **Description**: Allows querying of multiple sub-accounts in a single request.
- **Request**:
```http
POST https://shoppingcontent.googleapis.com/content/v2.1/accountstatuses/batch
```
- **Request Body (Sample)**:
```json
{
"entries": [
{
"accountId": "1212121212",
"merchantId": "4444444444",
"method": "get",
"batchId": 1
},
...
]
}
```
- **Response**: Returns status for multiple accounts.

### Important Notes

- When calling `accountstatuses.list` on a non-MCA account, a 403 error will occur,


indicating the operation is not permitted. Only certain operations like `get`,
`update`, `authinfo`, and `claimwebsite` are allowed.

- The response includes both **account-level issues** (e.g., suspended accounts)


and **item-level issues** (e.g., issues with individual products).

### Usage Guidelines

- Always ensure that your Merchant Center account adheres to Google's policies to
avoid critical issues such as account suspension.

- Use the `destination` parameter in `accountstatuses.get` or


`accountstatuses.list` to filter for specific product issues relevant to your
inquiry.

### Conclusion

The Account Status resource of Google Merchant Center API is essential for managing
and troubleshooting merchant accounts in an efficient manner. Through the
utilization of the `accountstatuses.get`, `accountstatuses.list`, and
`accountstatuses.custombatch` methods, merchants can effectively monitor their
account status and resolve any issues related to account compliance and product
listings.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/review-free-


listings:
### Summary of Google Merchant Center APIs for Free Listings

#### Overview
The Google Merchant Center APIs help gather data from a customer’s selling partner
and enable posting data to the customer’s selling account. This documentation
focuses on the free listings and the methods available to manage them.

---

#### Key API Methods and Usage

1. **Get Free Listing Status**


- **Method**: `freelistingprogram.get`
- **Description**: Retrieves the current status of free listings for a specified
region.
- **URL**:
```
GET
https://shoppingcontent.googleapis.com/content/v2.1/merchantId/freelistingprogram
```
- **Request Parameters**:
- `merchantId`: The ID of your merchant account.
- **Response Example**:
```json
{
"globalState": "NOT_ENABLED",
"regionStatuses": [
{
"regionCodes": ["US"],
"eligibilityStatus": "DISAPPROVED",
"reviewIssues":
["editorial_and_professional_standards_destination_url_down_policy"],
"onboardingIssues": ["home_page_issue"],
"disapprovalDate": "2013-02-25",
"reviewEligibilityStatus": "INELIGIBLE",
"reviewIneligibilityReason": "IN_COOLDOWN_PERIOD",
"reviewIneligibilityReasonDescription": "Cool down applies: Wait for
one-week cool-down period to end before you can request a review from Google. End
of cool down is 2013-02-30"
}
]
}
```

2. **Request a Review for Free Listings**


- **Method**: `freelistingprogram.requestreview`
- **Description**: Requests a review after making changes to address issues with
free listings.
- **URL**:
```
POST
https://shoppingcontent.googleapis.com/content/v2.1/merchantId/freelistingsprogram/
requestreview
```
- **Request Parameters**:
- `merchantId`: The ID of your merchant account.
- `regionCode`: Specific region for which the review is requested.
- **Important Note**:
- Before sending a request, ensure:
- You have a verified address.
- Your phone number is verified.
- You have claimed a website.
- You have uploaded products.
- **Response**: Returns an empty body upon successful completion.

---

#### Key Concepts

- **Free Listings**: These are product listings which appear in Google Search for
free without requiring a paid advertisement. Merchants must comply with the
policies set forth by Google.

- **Approval and Review Statuses**:


- Each region can have its own approval status and review eligibility. You must
resolve any issues that lead to disapprovals or warnings within given deadlines to
avoid limiting impressions on products.

- **Severity Levels**:
- Issues can have different severity levels:
- **WARNING**: Could lead to future disapproval if unresolved.
- **DISAPPROVED**: Products cannot appear in free listings until resolved.

---

#### Important Notes


- Ensure compliance with all guidelines related to free listings, as Google
reserves the right to enforce policies and take appropriate actions on violations.
- Review requests are comprehensive and assess your entire free listing program for
a specified region, not just individual products.

#### Supported Programming Language


- Python: This documentation provides examples only for Python; do not use samples
from other languages like Node.js, PHP, or Ruby.

---

Adherence to this overview will assist in using the Google Merchant Center APIs
effectively for managing free listings.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/add-checkout-


link:
# Summary of Google Merchant Center API: Adding a Checkout Link to Free Listings

## Overview
The Content API for Shopping allows sellers to provide a direct checkout link for
customers through free listings in Google Merchant Center. You must meet specific
criteria and use the appropriate API calls to set up and manage checkout links.

## Key Concepts
- **checkoutSettings Attribute**: Used to provide a direct link to the checkout
page from free listings.
- **Requirements**:
- Have an active product feed in Google Merchant Center.
- Your merchant account must be enrolled in the free listings program.

## API Snippets and Usage

### 1. Add or Update Checkout URL


To add or update your checkout URL template, use the
`freelistingsprogram.checkoutsettings.insert` method.
```http
POST
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/freelistingsprogra
m/checkoutsettings
```
**Request Body:**
```json
{
"uri_settings": {
"checkout_uri_template": "https://mystore.com/path-to-product/{id}"
}
}
```
- Replace `https://mystore.com/path-to-product/{id}` with your URL, where `{id}`
will be replaced by the `offerId` of the product.

### 2. View Current Checkout URL


To retrieve your existing checkout URL, use the
`freelistingsprogram.checkoutsettings.get` method.
```http
GET
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/freelistingsprogra
m/checkoutsettings
```
- This method is read-only and requires your `merchantId`.

### 3. Remove Checkout URL


To remove your checkout URL, thus opting all offers out of the checkout feature,
use the `freelistingsprogram.checkoutsettings.delete` method.
```http
DELETE
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/freelistingsprogra
m/checkoutsettings
```

## Important Notes
- Ensure that you have completed the onboarding steps to enroll in the free
listings program.
- The checkout URL must be formatted correctly, and the `{id}` placeholder is
essential for the API to function correctly.
- The checkout functionality is currently in beta with the Merchant API, which may
change in future releases.

By following the outlined API methods and noting the essential requirements, you
can effectively integrate checkout links into your free listings on Google Merchant
Center using the Content API for Shopping.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/review-


shopping-ads:
# Summary of Google Merchant Center APIs Documentation

## Overview
The Content API for Shopping allows access to shopping ads and facilitates the
management of products within a Google Merchant account. It provides methods to
retrieve, submit, and manage shopping ads and product information through APIs.

## Key Concepts
- **Merchant API**: A new version of the Content API for Shopping designed to
improve integration with additional features in beta.
- **Merchant ID**: A unique identifier required for making API calls to interact
with your shopping ads and Merchant Center account.
- **Shopping Ads Program**: A program that allows merchants to showcase their
products to users through ads.

## Important API Methods

### 1. **Get Current Status of Shopping Ads**


- **Method**: `shoppingadsprogram.get`
- **Description**: Retrieves the current status of shopping ads for a specified
region.
- **Request**:
```
GET
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/shoppingadsprogram
```
- **Response Example**:
```json
{
"globalState": "NOT_ENABLED",
"regionStatuses": [
{
"regionCodes": ["US"],
"eligibilityStatus": "DISAPPROVED",
"reviewIssues":
["editorial_and_professional_standards_destination_url_down_policy"],
"onboardingIssues": ["home_page_issue"],
"disapprovalDate": "2013-02-25",
"reviewEligibilityStatus": "INELIGIBLE",
"reviewIneligibilityReason": "IN_COOLDOWN_PERIOD",
"reviewIneligibilityReasonDescription": "Cool down applies: Wait for one-
week cool-down period to end before you can request a review from Google.",
"reviewIneligibilityReasonDetails": {
"cooldownTime": "2013-02-30"
}
}
]
}
```

### 2. **Request Review of Shopping Ads**


- **Method**: `shoppingadsprogram.requestreview`
- **Description**: Requests a review after resolving issues related to shopping
ads.
- **Request**:
```
POST
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/shoppingadsprogram
/requestreview
```
- **Prerequisites**:
- Have an address set up.
- Verify a phone number.
- Claim a website.
- Upload products.

- **Note**: No response is returned if the request is processed successfully.

## Important Notes
- **Warnings and Disapprovals**: Warnings may lead to disapprovals if not resolved
by certain deadlines. Some warnings impact impressions, while others do not.
- **Compliance**: Merchants are responsible for adhering to the Shopping ads
policies set by Google. Non-compliance can result in account actions.
- **Issue Severity**: Issues reported can either be warnings or errors that require
action to avoid potential disapprovals or impression impacts.

## Key Takeaways
- Focus on resolving issues promptly to maintain healthy ad performance.
- Utilize the `get` and `requestreview` methods effectively to manage and optimize
your shopping ads.
- Stay informed about potential policy changes and adhere to established guidelines
to prevent account penalties.

With the above information, developers can effectively utilize the Google Merchant
Center APIs to manage their shopping ads and ensure compliance while benefiting
from the available resources.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/flagging/overview:
### Summary of Google Merchant Center APIs - Content API for Shopping

#### Overview
The Content API for Shopping allows Google Shopping partners to manage
relationships with merchants, enabling services such as product data management and
order management.

#### Key Concepts

- **Account Linking**:
- Partners can programmatically create and manage links between their Merchant
Center account and other merchants using the `accounts.link` method.
- Link requests must be approved by the merchant before being finalized.

#### API Methods


- **`accounts.link`**:
- Used to flag a relationship between a partner and a merchant.
- After sending a link request, merchants can manage account links via the Google
Merchant Center interface.

#### Request and Approval Workflow


1. **Partner sends an account link request**.
2. **Merchant receives the request and must approve it**.
3. **Both parties can view existing and pending links**.
4. **Either party can remove the link at any time**.

#### Notes
- The API is currently available only to enabled Shopping partners.
- Flagging an account with `accounts.link` does not automatically merge accounts
into a multi-client account.

#### Important Caveats


- Integration with the new Merchant API (in beta) is recommended as the future
direction of the Content API for Shopping.
- Developers should be aware that account link management is a multi-step process
involving both the partner and the merchant.

### Code Examples


Currently, no specific code snippets or API calls were provided in the content, but
partners can refer to the Google's developer documentation for detailed programming
instructions and code samples suitable for Python.

### Conclusion
For further integration, users should refer to the **Requesting Links** page for
additional details about defining services and finalizing account link setups.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/flagging/request:
# Google Merchant Center Content API for Shopping - Request Links Overview

This documentation provides an overview of the Content API for Shopping, focusing
on linking requests between Shopping partners and merchants.

## Key Concepts

1. **Linking Request**: A Shopping partner can send a linking request to a merchant


account using the `accounts.link` method. The link request is pending until the
merchant approves it.

2. **Services Provided**: Each linking request must specify which services the
partner offers. The supported service values include:
- `shoppingAdsProductManagement`: Manages product data for Shopping ads.
- `shoppingActionsProductManagement`: Manages product data for Buy on Google.
- `shoppingActionsOrderManagement`: Manages orders for Buy on Google.

3. **Link Type**: A valid `linkType` must be included to categorize the type of


Shopping partner:
- `channelPartner`
- `eCommercePlatform`

## Code Example

Here is an example of how to send a link request using the Content API:
### API Call

```http
POST https://shoppingcontent.googleapis.com/content/v2.1/123456789/accounts/
123456789/link
```

### Request Body

```json
{
"linkedAccountId": "98765",
"linkType": "eCommercePlatform",
"services": [
"shoppingAdsProductManagement",
"shoppingActionsOrderManagement"
],
"action": "request"
}
```

### Breakdown of Fields

- `linkedAccountId`: ID of the merchant account being requested for linkage.


- `linkType`: Specifies if the partner is a `channelPartner` or an
`eCommercePlatform`.
- `services`: An array of services that the partner will offer to the merchant.
- `action`: Set to "request" to indicate a linking request.

## Important Notes

- The link is not established until it is approved by the merchant.


- Ensure that the `linkedAccountId` is valid and corresponds to the correct
merchant.
- Familiarize yourself with the related services for proper functionality of your
API integration.

## Additional Information

- This beta version of the Merchant API is part of ongoing improvements to the
Content API for Shopping. For more information on how to adapt to the changes,
consult the "Announcing the Merchant API Beta" section.

This summary is structured to assist developers in efficiently implementing and


understanding the linking mechanism within the Google Merchant Center Content API
for Shopping.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/flagging/list:
# Google Merchant Center API: List Links Overview

## API Functionality
The `listlinks` method retrieves all links associated with a merchant center
account. It allows merchants to manage linking requests from partners.

### Key Concepts


- **Linked Accounts**: Both Shopping partners and individual merchant accounts can
have multiple flagged links with others.
- **Link Status**: Each service within a link starts in a `pending` state and
requires approval from the merchant. Once approved, services change to `active`,
while removed services will show `inactive`.

## API Usage

### HTTP Request

To list link requests, send an HTTP GET request to the following endpoint:
```
GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts/
{accountId}/listlinks
```

**Parameters**: No parameters are required.

### Example Request

To list the link requests for partner `123456789`, use the following request:
```http
GET https://shoppingcontent.googleapis.com/content/v2.1/123456789/accounts/
123456789/listlinks
```

### Example Response

An example response before approval by the merchant:


```json
{
"linkedAccountId": "98765",
"services": [
{
"service": "shoppingAdsProductManagement",
"status": "pending"
},
{
"service": "shoppingActionsOrderManagement",
"status": "pending"
}
]
}
```

## Important Notes

- **Approval Process**: Merchants must approve each service link for it to become
active. Services remain in a `pending` state until action is taken.
- **Service Removal**: If all services within a link are removed, the link will no
longer be retrieved by subsequent `listlinks` calls.

## Conclusion

This API allows for effective management of linked accounts in the Google Merchant
Center. It is vital for developers to understand the status transitions and
approval responsibilities to ensure proper integration and data sharing between
accounts.
### Note
For any integration, always refer to the latest documentation as APIs evolve and
may introduce new features or endpoints.

---

This summary is tailored specifically for Python developers interested in using the
Google Merchant Center APIs. No other programming languages were detailed per user
intent.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/flagging/approve:
## Summary of Google Merchant Center API - Approving Links

### Overview
The "Approve Links" feature allows a merchant to approve link requests from
partners within the Google Merchant Center. This can be done either through the
Google Merchant Center user interface or programmatically using the Content API for
Shopping.

### Key Concepts


- **Link Approval**: After a partner sends a link request, the merchant must
approve this request for it to become active. Approval can be partial, allowing the
merchant to approve specific services within the request.

- **Services**: A link request may include multiple services, such as


`shoppingAdsProductManagement` and `shoppingActionsOrderManagement`. The merchant
can choose to approve only a subset of these services.

### API Snippet for Approving Links


To approve a link programmatically, the following API call can be used:

```http
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts/
{merchantId}/link
```

#### Request Body Example:


```json
{
"linkedAccountId": "123456789",
"linkType": "eCommercePlatform",
"services": ["shoppingAdsProductManagement"],
"action": "approve"
}
```
### Fields
- `linkedAccountId`: The ID of the partner account that sent the link request.
- `linkType`: Type of the link, e.g., "eCommercePlatform".
- `services`: An array of services to be approved. It can contain one or more
services from the original request.
- `action`: Action to be performed, which should be "approve" for approval
requests.

### Important Notes


1. **Partial Approvals**: It is possible to approve only specific services in a
link request while leaving others in a pending state.

2. **Beta Version**: This functionality is part of the beta version of the Merchant
API, which is set to improve integration and overall functionality in the future.

3. **Licenses**: The content is licensed under Creative Commons Attribution 4.0


License, and code samples are licensed under the Apache 2.0 License.

### Recommended Actions


- Ensure to set up a Merchant Center account and client libraries properly before
making API calls.
- Use the appropriate API version (v2.1) and follow the endpoint structure
correctly to avoid errors during integration.

By utilizing the above API approach, developers can programmatically manage link
approvals with flexibility in service selection.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/flagging/remove:
### Summary of Google Merchant Center Content API for Shopping - Remove Links

#### Overview
The Content API for Shopping allows merchants to manage their listings on Google
Merchant Center programmatically. This documentation focuses on how to remove links
between the merchant account and partners.

#### Key Concepts

1. **Link Management**:
- Merchants can remove links to partners at any time through the Google Merchant
Center interface or programmatically via the API.

2. **Remove Action**:
- The `remove` action is used to unlink a specific service or a subset of
services associated with a partner.

#### API Method: Remove Links

- **Endpoint**:
```
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/accounts/
{accountId}/link
```

- **Fields**:
- `linkedAccountId`: The ID of the partner account to be unlinked.
- `linkType`: Type of the link (e.g., `eCommercePlatform`).
- `services`: List of services to be affected by the removal.
- `action`: Set to `"remove"` to indicate the operation type.

- **Example Request**:

```json
POST https://shoppingcontent.googleapis.com/content/v2.1/98765/accounts/98765/link
{
"linkedAccountId": "123456789",
"linkType": "eCommercePlatform",
"services": ["shoppingAdsProductManagement"],
"action": "remove"
}
```

In this example, the request is made to remove the link between the merchant
account **98765** and the partner account **123456789**, specifically for the
`shoppingAdsProductManagement` service.

#### Important Notes

- Once a link is removed, it can no longer be accessed and must be re-requested and
re-approved if needed.
- The new Merchant API, a beta version, is being developed as the future
replacement for the Content API for Shopping—information on its enhancements will
be available in the related documentation.

#### Additional Considerations

- Ensure that actions on links align with the overall strategy for managing
services in Google Merchant Center.
- Be aware of potential delays in the reflection of link removals in the Merchant
Center interface after making API calls.

#### Conclusion

This API allows merchants to effectively manage their partnerships with different
platforms by utilizing the remove link functionality, promoting better organization
and control of their listings on Google Merchant Center. For complete integration,
consider following the guidelines and updates about the Merchant API as it evolves.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/automatic-


improvements:
### Summary of "Enable Automatic Improvements" - Content API for Shopping

#### Overview
The **Content API for Shopping** allows you to automate updates to product data in
your Merchant Center account. Automatic improvements can enhance user experience by
ensuring that product prices, availability, and images are current, leading to
increased traffic and conversion rates.

#### Key Functions and Settings

1. **Automatic Item Updates**:


Automatic updates to product details based on structured data from your website:
- **Price Updates**: Google updates the active price of products.
- **Availability Updates**:
- Products are marked as `out_of_stock` if indicated on the site.
- Option to allow strict updates to switch `out_of_stock` to `in_stock` using
`allowStrictAvailabilityUpdates`.
- **Condition Updates**: Google updates the product's condition based on website
data.

**API Snippet**:
```json
{
"accountItemUpdatesSettings": {
"allowPriceUpdates": true,
"allowAvailabilityUpdates": false,
"allowStrictAvailabilityUpdates": false,
"allowConditionUpdates": true
},
"effectiveAllowPriceUpdates": true,
"effectiveAllowAvailabilityUpdates": false,
"effectiveAllowStrictAvailabilityUpdates": false,
"effectiveConditionUpdates": true
}
```

2. **Automatic Image Improvements**:


- Updates image quality and compliance with requirements for disapproved
products (e.g., removes overlays).

**API Snippet**:
```json
{
"accountImageImprovementsSettings": {
"allowAutomaticImageImprovements": true
},
"effectiveAllowAutomaticImageImprovements": true
}
```

3. **Automatic Shipping Improvements**:


- Google can automatically adjust estimated delivery times based on historical
performance rather than static settings.

**API Snippet**:
```json
{
"allowShippingImprovements": true
}
```

#### Important Concepts

- **Structured Data**: Essential for enabling automatic updates; requires proper


implementation on the website.
- **Effective Fields**: Indicate current settings for automatic updates. They are
read-only and show actual configurations after changes.

#### Notes and Caveats

- Automatic improvements are **turned off by default**.


- These capabilities are available for various entities including Shopping ads, Buy
on Google, and free listings.
- Sub-account settings inherit from the main account unless specified otherwise.
- Users should be cautious about how availability settings impact low-stock items.

#### Usage
To successfully use the Content API, developers must implement structured data on
their websites and utilize the above settings through the provided API snippets.
Each update allows for granular control over how product information is reflected
in Google’s shopping ecosystem, enhancing visibility and potential sales
conversions.

For more specific integrations or advanced features, consult the [announcements


about the Merchant API
Beta](https://developers.google.com/shopping-content/guides/automatic-
improvements).
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/manage-


conversion-sources:
# Summary of Google Merchant Center APIs for Managing Conversion Sources

## Overview
The Content API for Shopping in the Google Merchant Center allows you to manage
conversion sources for your merchant account, enabling the tracking of conversion
data from both free listings and your website.

## Key Concepts
1. **Conversion Sources**: Sources that allow merchants to track conversions from
Google Analytics or directly through a website.
2. **Auto-Tagging**: A prerequisite for managing conversion sources, which involves
linking your Google Analytics account to your Merchant account.
3. **Google Analytics Integration**: Enables tracking of conversion data through
Google Analytics properties linked to the Merchant Center.

## Code Examples and API Snippets

### 1. Create a Google Analytics Conversion Source


To create a new conversion source linked to Google Analytics, use the following API
call:

```http
POST
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/conversionsources/
```

**Request Body:**
```json
{
"googleAnalyticsLink": {
"propertyId": "{propertyId}"
}
}
```

**Response Example:**
```json
{
"conversionSourceId": "galk:{propertyId}",
"googleAnalyticsLink": {
"propertyId": "{propertyId}",
"attributionSettings": {
"attributionLookbackWindowInDays": 90,
"attributionModel": "CROSS_CHANNEL_DATA_DRIVEN",
"conversionType": [
{
"name": "purchase",
"includeInReporting": true
}
]
},
"propertyName": "My Property Name"
},
"state": "ACTIVE",
"controller": "MERCHANT"
}
```

### 2. Create a Website Conversion Source Using a Google Tag


For creating a website conversion source using Google tags, the API call is as
follows:

```http
POST
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/conversionsources/
```

**Request Body:**
```json
{
"merchantCenterDestination": {
"displayName": "My tag destination",
"attributionSettings": {
"attributionLookbackWindowInDays": 60,
"attributionModel": "CROSS_CHANNEL_LAST_CLICK"
},
"currencyCode": "CHF"
}
}
```

**Response Example:**
```json
{
"conversionSourceId": "mcdn:12341241234",
"merchantCenterDestination": {
"destinationId": "MC-ABCD1234",
"attributionSettings": {
"attributionLookbackWindowInDays": 60,
"attributionModel": "CROSS_CHANNEL_LAST_CLICK"
},
"displayName": "My tag destination",
"currencyCode": "CHF"
},
"state": "ACTIVE",
"controller": "MERCHANT"
}
```

## Important Classes and Methods


- **ConversionSource Object**: Represents conversion sources that can be created or
managed through the API. This object includes fields such as `conversionSourceId`,
`googleAnalyticsLink`, and `merchantCenterDestination`.

## Notes and Caveats


- Ensure you have admin access to your Google Analytics properties to link them to
the Merchant account.
- It’s important to set up auto-tagging and claim your website to effectively
manage conversion sources.
- Utilize the Google Tag Manager API if you do not have a pre-existing Google
Analytics property.

## Conclusion
This API facilitates the tracking and management of conversion sources effectively
within your Google Merchant Center account, ensuring accurate analytics and
reporting capabilities for your e-commerce operations. Only the Python data should
be downloaded for implementation, as stated in your intent.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/account-


issues:
## Google Merchant Center Content API Account Issues Documentation Summary

### Overview
The Google Merchant Center Content API provides functionality to manage merchant
accounts and handle account-level issues that may impact a merchant’s ability to
operate effectively within the platform.

### Key Concepts


- **Account Issues**: Problems that can affect a merchant's account and require
resolution. Common issues include policy violations, link problems, and missing
information.
- **Merchant API**: A beta version of the new implementation of the Content API for
Shopping, which is expected to provide enhanced features and improvements for
integrations.

### Important Classes and Methods


While the specific classes and methods are not detailed in the provided content,
the API will generally include:
- **Account Management Endpoints**: Used to retrieve and update account settings,
and check account status.
- **Issue Reporting Endpoints**: Utilized to retrieve specific account issues and
their status, severity, and recommended actions.

### Common Account Issues


Here is a list of critical account issues with their descriptions and severities:

1. **Missing AdWords Link**: No Google Ads account linked; severity: error.


2. **Merchant Quality Low**: Account is not eligible for enhanced free listings;
severity: error.
3. **Home Page Issue**: Issues with website URL; severity: critical.
4. **Pending Phone Verification**: Phone number needs to be verified; severity:
critical.
5. **Misrepresentation of Self or Products** (various types): Various violations
related to inaccuracies or insufficient information, often critical.

### Notable API Issues


The content lists many specific issue IDs associated with distinct problems that
can arise. Here are some selected severe issues:
- **abuse_of_the_network_spam_policy**: Account suspended due to policy violation
regarding spam. Severity: critical.
- **misrepresentation_of_self_or_products_unacceptable_business_practice_policy**:
Account suspended due to unacceptable business practices. Severity: critical.
- **dangerous_products_dangerous_knives_policy**: Account suspended due to selling
dangerous knives. Severity: critical.

### API Usage and Best Practices


- Regularly check the **Account Status** to view any listed issues and their
severities by calling the appropriate endpoints.
- Abide by **Merchant Center Policies** as these guide the use of acceptable
content and practices.
- Ensure all product and account information is accurate and complies with Google’s
requirements to avoid suspension.

### Important Notes


- The issues related to the account are often critical and can result in the
suspension of the account if not handled promptly.
- Maintain valid business information, including accurate contact methods and
payment options, to prevent misrepresentation claims or enforcement actions.

### Caveats
- Ensure all API endpoints are accessed following Google’s API usage guidelines,
including authorization requirements (OAuth).
- Regularly update any application using the Merchant API to align with the current
specifications and emerging practices outlined by Google.

### Conclusion
This summary provides an essential overview of account management issues within the
Google Merchant Center API, focusing on common issues, descriptions, and best
practices for maintaining a compliant merchant account. For further implementation
details or troubleshooting, refer to the specific API documentation entries related
to account management.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/account-


issues#missing_ad_words_link:
# Summary of Google Merchant Center Account Issues Documentation

## Key Concepts
- **Google Merchant Center**: A platform used to upload and manage product listings
for Google Shopping ads.
- **Content API for Shopping**: Allows developers to programmatically manage the
account, including product listings, orders, and promotions.
- **Account Issues**: Common problems related to account setup that can affect
marketing performance such as product visibility and ad status.

## Common Account Issues


The following account level issues may affect your Merchant Center experience:

1. **Missing Ad Words Link (`missing_ad_words_link`)**


- **Severity**: Error
- **Description**: No Google Ads account linked or a pending Google Ads account
link request.

2. **Merchant Quality Low (`merchant_quality_low`)**


- **Severity**: Error
- **Description**: Account not eligible for enhanced free listings.

3. **Home Page Issue (`home_page_issue`)**


- **Severity**: Critical
- **Description**: Website not claimed or URL not provided.

4. **Pending Phone Verification (`pending_phone_verification`)**


- **Severity**: Critical
- **Description**: Requires verification of the business phone number.

5. **Pending Address and Phone (`pending_address_and_phone`)**


- **Severity**: Critical
- **Description**: Business address and phone number need to be entered.

## API Usage
**Authorization**: Use OAuth for securing API calls to the Merchant Center.

### Sample API Call Structure


```python
import requests

def link_google_ads_account(merchant_id, google_ads_account_id, access_token):


url = f"https://shoppingcontent.googleapis.com/content/v2.1/{merchant_id}/
accounts/{google_ads_account_id}/link"
headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers)
return response.json()
```

### Key API Functions


- **Linking Accounts**: Link a Google Ads account to a Merchant Center account.
- **Checking Account Status**: Use an API endpoint to retrieve the current status
of the account, including any issues flagged.

## Important Notes
- **Error Handling**: Always check for errors after making an API call. Handle
exceptional cases based on the error returned.
- **Account Verification**: Ensure that your phone number and address are verified
before trying to resolve other issues.
- **Documentation Updates**: The guidelines are subject to change; refer to the
[Content API Documentation](https://developers.google.com/shopping-content/guides/
account-issues#missing_ad_words_link) for the latest information.
- **Language Preferences**: The documentation focuses on supporting Python. Other
languages like Node.js, PHP, and Ruby are not supported for download.

## Conclusion
This summary outlines the critical issues related to Google Merchant accounts and
provides a basic structure for making API calls related to account linkage and
verification. Developers should ensure that their accounts are properly set up to
avoid critical errors and maintain compliance with Google’s policies.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/account-


issues#merchant_quality_low:
### Google Merchant Center APIs: Account Issues Overview

#### Important Account Issues


The following are key account issues that can impact your merchant account on
Google Merchant Center:

1. **merchant_quality_low**
- **Description**: The account is not eligible for enhanced free listings.
- **Severity**: Error

2. **home_page_issue**
- **Description**: Website not claimed or website URL not provided.
- **Severity**: Critical

3. **pending_phone_verification**
- **Description**: Your phone number needs to be verified.
- **Severity**: Critical

4. **missing_ad_words_link**
- **Description**: No Google Ads account linked or pending Google Ads account
link request.
- **Severity**: Error

5. **misrepresentation_of_self_or_products** (Various Policies)


- These issues may include insufficient contact or payment info, missing refund
policies, and unacceptable business practices. They often have a **critical
severity** rating.

### API Usage

While the specific code snippets for API calls are not provided in the document,
it’s essential to follow these guidelines for implementing API calls within your
code:

- Use **OAuth** for authorization to access the Google Merchant Center APIs.
- Use the provided issue IDs when dealing with account issues in API requests.

### Important Classes & Functions

- **Account Issues**: Familiarize yourself with the potential issue types and their
severity ratings. This knowledge will be essential for troubleshooting.
- **Merchant API**: The future version of the Content API expected to streamline
integrations.

### Key Concepts

- **Authorization**: Ensure you are using OAuth for secure access to your Merchant
Center account.
- **Batch Requests**: Implement batch processing to manage multiple API calls
efficiently.
- **Account Status**: Regularly check your account's status and resolve any issues
listed in the 'Account Issues' guide.

### Notes and Caveats

- Regularly monitor your Merchant Center account for issues and resolve them
promptly to prevent account suspension or ineligibility for features like enhanced
free listings.
- Ensure that your contact information and website URL are accurate and that your
website conforms to Google’s specifications to avoid misrepresentation issues.
- Familiarize yourself with policies regarding prohibited and misrepresented
content to ensure compliance and maintain account integrity.

### Conclusion

Utilizing the Google Merchant Center APIs effectively involves understanding common
account issues, proper API integration, adherence to guidelines for authorization,
and ensuring account compliance with Google’s policies. Regular monitoring and
prompt issue resolution are critical for maintaining the health of your merchant
account.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/account-


issues#home_page_issue:
### Google Merchant Center APIs Documentation Summary

**Overview:**
The Google Merchant Center Content API enables interaction with the customer's
selling partner by gathering data and posting to their selling account. It's
essential for managing account issues that may impact merchant functionality and
visibility on Google platforms.

### Key API Concepts

1. **Merchant API Beta:**


- A new version of the Content API for Shopping is in beta, aiming to improve
integration and allow developers to shape its future. Developers who are interested
should refer to the announcement for specific improvements.

2. **Common Account Issues:**


- **Home Page Issue:** Account may be suspended if the website is not claimed or
the URL is not provided. **Severity: critical**.
- **Merchant Quality Low:** The account might not qualify for enhanced free
listings. **Severity: error**.
- **Missing AdWords Link:** Lack of linked Google Ads account. **Severity:
error**.
- Common issues include **phone verification problems**, **product
misrepresentation**, and **delivery and payment issues**.

3. **Important Fields:**
- Commonly used fields in API calls include:
- **merchantId** (required): The ID of the merchant account.
- **accountStatus**: Indicates if the account status is good, suspended, etc.
- **productId**: Unique identifier for the product being managed.

### Example API Calls

```python
import requests

# Example to check account status


def check_account_status(merchant_id):
url = f"https://content.googleapis.com/content/v2.1/{merchant_id}/accounts"
headers = {"Authorization": "Bearer your_access_token"}
response = requests.get(url, headers=headers)
return response.json()
```
### Key Classes and Methods

- **Accounts Resource:**
- Manages account-level settings, including **status**, **linking**, and
**settings**.

- **Products Resource:**
- Handles product data including API calls for adding/updating products, status
checks, and managing supplemental feeds.

### Usage Examples


- **To Set Up a Merchant Center Account:**
Follow the setup guide which typically involves:
- Signing up or integrating with Google Merchant Center.
- Linking your Business Profile and verifying your phone number.

### Important Notes and Caveats

- Ensure that your website is fully functional and that there are no placeholders
or generic text. Accounts may face suspension if landing pages do not load
correctly or contain outdated content.
- Always provide visible contact information and return/refund policies to comply
with Google’s merchant guidelines and enhance user trust.
- Keep track of quota limits and performance tips mentioned in the documentation to
avoid disruptions in service.

### Conclusion
This summary provides a foundational understanding of the Account Conditions and
Content API for Shopping essential for engaging effectively with Google Merchant
Center. Ensure to refer to specific API documentation for complete usage details
and further advanced features.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/account-


issues#pending_phone_verification:
### Summary of Google Merchant Center API Documentation

#### Overview
The Google Content API for Shopping enables developers to manage their Merchant
Center accounts, which includes operations like gathering and posting product data
from a selling partner. This documentation specifically addresses issues related to
merchant accounts, especially regarding pending phone verification.

#### Key Concepts


- **Merchant Center Account Issues**: Common issues can impact account visibility
and product listings. Alerts on these issues should be addressed quickly for
compliance.
- **Pending Phone Verification**: This critical issue indicates that the merchant
needs to verify their business phone number. This is essential to ensure the
integrity of merchant accounts.

#### Key Issue Types and Severity


- **Pending Phone Verification**:
- **Severity**: Critical
- **Detail**: Users need to verify their business phone number on the business
information page.
##### Common Account Issues
1. **Missing AdWords Link**: No Google Ads account linked.
2. **Merchant Quality Low**: Account not eligible for enhanced listings.
3. **Home Page Issue**: Website not claimed or URL not provided.
4. **Pending Address and Phone**: Missing business address and phone number.
5. **Custom Label**: Misrepresentation due to erroneous custom labels.

#### Using the API


While specific code examples and API snippets were not explicitly provided in the
provided content, a general approach for interacting with the API includes:

1. Setting up an OAuth 2.0 service account for authorization.


2. Making API calls via GET/POST requests to manage product data and resolve
account issues.

#### Important Classes and Methods


- **MerchantAccount**: Represents the account and its associated status. Methods
related to retrieving account issues and verifying account information are crucial.
- **Product**: Manages product data within the Merchant Center.
- **Error Handling**: Developers must implement error handling to manage responses
related to account statuses and ensure proper logging and follow-up on critical
issues.

#### Important Notes


- Phone verification is required for all accounts to maintain a trustworthy
merchant identity.
- Failure to resolve critical issues may lead to account suspension or reduced
visibility of product listings.
- Developers are advised to regularly check for account issues and respond promptly
to alerts.

#### Conclusion
Ensure compliance with Google Merchant Center policies to maintain account health.
Address pending verification issues urgently and utilize API features to optimize
product listings and account management.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/account-


issues#misrepresentation_of_self_or_products_unacceptable_business_practice_policy:
### Summary of Google Merchant Center APIs Documentation

**Overview:**
The Google Merchant Center APIs facilitate the retrieval of data from customer's
selling partners using APIs and enable posting data to the merchant account. This
includes managing account issues, product information, and customer interactions.

#### Important API Concepts

- **Content API for Shopping**: An API used to manage product listings, account
statuses, and various settings on Google Merchant Center.

- **Merchant API**: A beta version of the new Content API for Shopping aimed at
improving integration with additional functionality.

#### Account Issues


Account-level issues can affect the merchant's standing. Here are key issues
related to misrepresentation and critical violations:
1. **Misrepresentation of Self or Products Policies:**
- **Misrepresentation of self or products - Unacceptable business practice
policy**
- **Severity**: Critical
- **Details**: It is required to display at least one contact method (business
address, phone number, email, or contact form) clearly on your online store and on
the Merchant Center 'Business Information' page.

2. **Common Account Issues**


- **Required Fields for Contact Information**:
- Business address
- Phone number
- Email
- Contact form link
- Social media business profile link

3. **Severity Levels**: Issues are rated as **critical**, **error**, or


**warning**, which indicates the urgency and type of response required to resolve
them.

### API Snippets and Usage

The API helps manage various aspects of the merchant account. Example API calls
typically involve resources such as accounts, products, orders, and settings. Below
are useful snippets (similar to the typical GO MENT API calls):

#### Example: CRUD Operations on Products

```python
# Example code to insert a product
import requests

url = "https://content.googleapis.com/content/v2.1/{merchantId}/products"

headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}

product_data = {
"offerId": "123456",
"title": "Sample Product",
"description": "This is a sample product description.",
"link": "http://www.example.com/product",
"imageLink": "http://www.example.com/product.jpg",
"contentLanguage": "en",
"targetCountry": "US",
"channel": "online",
"price": {
"value": "99.99",
"currency": "USD"
},
"availability": "in stock"
}

response = requests.post(url, headers=headers, json=product_data)

if response.status_code == 200:
print("Product inserted successfully.")
else:
print("Error inserting product:", response.text)
```

### Important Notes

1. **Authorization**: All API requests require OAuth 2.0 authentication. Ensure you
have implemented the OAuth service for secure access.

2. **Account Management**: Familiarize yourself with how to set up and verify your
Merchant Center account, paying special attention to security measures such as
phone verification and providing clear business contact information.

3. **Batch Requests**: The API supports batch processes, which can improve
efficiency when dealing with large datasets.

4. **Quotas and Limits**: Be mindful of the usage limits imposed by Google Merchant
Center APIs to avoid service interruption.

5. **Error Handling**: Always include error handling in your API calls. Monitor for
different severity levels of issues to maintain compliance.

6. **Documentation Updates**: Keep an eye on updates to the API documentation, as


changes might affect integration or add new features.

This summary provides essential information for developers looking to use the
Google Merchant Center APIs effectively, particularly focusing on account
management and product operations. Please refer to the official documentation for
further details on specific endpoints and their functionalities.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/account-


issues#custom_label:
## Summary of Google Merchant Center Content API for Shopping

### Overview
The Google Merchant Center Content API allows interaction with Merchant accounts
through API calls to both gather data and post information related to products and
account status. The API has been under constant development with its beta version
announced recently.

### Important Account Issues


Developers should be aware of common account-level issues that can impact
integration and account status, including:

1. **Critical Issues**
- **custom_label**: Suspended due to policy violation for misrepresentation.
- **missing_ad_words_link**: No Google Ads account linked.
- **home_page_issue**: Website not claimed or URL not provided.
- **pending_phone_verification**: Phone number needs to be verified, requiring
verification via the business information page.

2. **Common Account Issues by ID**


- **abuse_of_the_network_affiliate_spam_policy**: Suspended for affiliate spam
(Severity: Critical).
- **merchant_quality_low**: Account not eligible for enhanced listings
(Severity: Error).

For a complete list of issues, developers can refer to the Account statuses guide.

### Code Examples and API Usage


To interact with the Content API using Python, follow these common API request
patterns:

#### Example: Get Account Status


```python
import requests
from google.oauth2 import service_account

# Set up the credentials and request parameters


credentials = service_account.Credentials.from_service_account_file(
'path/to/service-account.json'
)
merchant_id = 'YOUR_MERCHANT_ID'
url = f"https://content.googleapis.com/content/v2.1/{merchant_id}/accounts"

# Perform the API request


response = requests.get(url, headers={'Authorization': f'Bearer
{credentials.token}'})
print(response.json())
```

### Key Concepts


- **Authorization**: Use OAuth2 with service accounts for authenticating API
requests. Ensure the service account has the appropriate permissions for the
Merchant Center.
- **Account Linking**: To utilize advertising features, link your Google Ads
account to the Merchant Center using the API.
- **Issue Management**: Monitor account issues via API and resolve them according
to severity and documented solutions.

### Important Notes


- **Quota and Limits**: There are quotas and limits on API calls which developers
must consider when designing integrations.
- **Error Handling**: Implement robust error handling for account issues and API
responses to enable smooth user experiences.
- **Custom Labels**: Ensure correct labeling of products to prevent
misrepresentation issues.

### Caveats
- **Stay Updated**: The API frequently receives updates, and developers should stay
informed about changes.
- **Endpoint Variations**: API endpoints may change; always refer to the [official
documentation](https://developers.google.com/shopping-content/guides/account-
issues#custom_label) for the most current information.

This summary provides a foundational understanding and guidance for developers


working with the Google Merchant Center Content API and should facilitate effective
integration and use of the library.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/account-


issues#pending_address_and_phone:
## Google Merchant Center API - Account Issues Management

### Overview
The Content API for Shopping allows you to manage your Merchant Center account,
handling various account issues that may arise. Specifically, the focus is on the
API responses related to account issues such as pending verification or quality
concerns.

### Common Account Issues


A selection of the most common account issues and their implications is listed
below:

1. **pending_address_and_phone**:
- **Description**: You need to enter your business address and phone number.
- **Severity**: Critical
- **Detail**: Verify a valid phone number for your business.

2. **pending_phone_verification**:
- **Description**: Your phone number needs to be verified.
- **Severity**: Critical
- **Detail**: Go to the business information page to verify your business phone
number.

3. **missing_ad_words_link**:
- **Description**: No Google Ads account linked/Pending Google Ads account link
request.
- **Severity**: Error

4. **merchant_quality_low**:
- **Description**: Account isn't eligible for enhanced free listings.
- **Severity**: Error

### Important API Concepts


- **Account Statuses**: This section serves to respond to API queries about the
current settings and issues related to the account.
- **Issue Severity**: Issues returned by the API are classified by severity:
critical or error, dictating the urgency of required user actions.

### Example API Snippets

Here's a hypothetical example of how one might retrieve account status issues using
the API:

```python
import requests

def get_account_issues(merchant_id, access_token):


url =
f"https://content.googleapis.com/content/v2.1/{merchant_id}/accountIssues"

headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)


return response.json()
```
### Important Notes for Developers
- **Resolving Critical Issues**: Always prioritize resolving critical issues such
as missing contact information or pending verifications, as these can lead to
account suspensions.
- **Business Information Page**: Regularly check the business information page in
the Merchant Center to ensure all details are up-to-date and correct.
- **Linking Accounts**: Make sure to link your Google Ads account to avoid missing
out on potential advertising features.
- **Documentation Updates**: Regularly consult the official Google Developer
documentation for updates related to API specifications and error handling
procedures.

By keeping these points in mind and referring to the example snippets, developers
can effectively manage account issues and enhance their integration with the Google
Merchant Center APIs.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/account-


issues#merchant_image_rejected:
### Summary of Google Merchant Center Account Issues Documentation

#### Overview
The Google Merchant Center APIs primarily facilitate the collection and posting of
data related to customers' selling partners using API calls. This document
specifically addresses common account issues that may impact a merchant's account.

#### Key Account Issues


Here are some of the most common account issues with their identifiers,
descriptions, and severity levels:

1. **missing_ad_words_link**
- *Description*: No Google Ads account linked or pending link request.
- *Severity*: Error

2. **merchant_image_rejected**
- *Description*: The uploaded logo contains errors or does not conform to logo
requirements.
- *Severity*: Error

3. **merchant_quality_low**
- *Description*: Account isn't eligible for enhanced free listings.
- *Severity*: Error

4. **home_page_issue**
- *Description*: Website not claimed or website URL not provided.
- *Severity*: Critical

5. **pending_phone_verification**
- *Description*: Phone number needs verification.
- *Severity*: Critical

6. **pending_address_and_phone**
- *Description*: Business address and phone number need to be entered.
- *Severity*: Critical

7. **misrepresentation_of_self_or_products**
- *Description*: Various issues related to false representation of self or
products.
- *Severity*: Critical, with multiple sub-policies including insufficient
contact/payment info and missing refund policy.

#### Important Notes


- **OAuth Authorization**: Ensure that authorization workflows are correctly set up
using OAuth for secure access to the APIs.

- **API Version**: The documentation mentions a beta version of the Merchant API,
which is the future of the Content API for Shopping. Developers should explore the
beta for improvements in integration.

- **Image Guidelines**: Ensure that uploaded logos comply with the specified
requirements to avoid rejection.

- **Contact Information**: Provide sufficient contact information (address, phone,


email) on the online store, ideally in the footer.

- **Policy Compliance**: It is critical to adhere to policy guidelines to prevent


account suspensions due to misrepresentation or policy violations.

#### API Snippets and Examples


While specific code examples for API calls related to the described issues were not
provided in the content, here are some general placeholder examples for reference:

**Example API Call to Check Account Status**


```python
import requests

url = "https://api.merchantcenter.google.com/v1/accounts/{accountId}/status"

headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}

response = requests.get(url, headers=headers)

if response.status_code == 200:
account_status = response.json()
print(account_status)
else:
print("Error fetching account status:", response.status_code, response.text)
```

**Updating Contact Information**


```python
update_url =
"https://api.merchantcenter.google.com/v1/accounts/{accountId}/businessInformation"

payload = {
"businessAddress": "123 Example St, City, State, Zip",
"phone": "+1234567890"
}

response = requests.put(update_url, headers=headers, json=payload)

if response.status_code == 200:
print("Business information updated successfully.")
else:
print("Failed to update business information:", response.status_code,
response.text)
```

### Conclusion
To maintain a healthy merchant account and ensure compliance, familiarize yourself
with common account issues and their resolutions provided in this documentation.
Make sure to leverage the APIs effectively, especially in relation to account
verification and data submission. Always ensure that the required images and
information meet Google's guidelines.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/account-


issues#misrepresentation_of_self_or_products_missing_refund_policy_policy:
### Summary of Google Merchant Center Account Issues - Content API for Shopping

#### Account Issues Overview


The Content API for Shopping allows merchants to manage their product listings and
accounts on Google Merchant Center. It includes mechanisms to report and resolve
various account-level issues that could impact the merchant’s ability to sell
products effectively.

#### Common Account Issues


Here are some significant account-level issues that merchants might face:

1. **Missing AdWords Link**


- **Issue ID:** `missing_ad_words_link`
- **Severity:** Error
- **Description:** No Google Ads account linked or pending link request.

2. **Merchant Quality Low**


- **Issue ID:** `merchant_quality_low`
- **Severity:** Error
- **Description:** Account isn't eligible for enhanced free listings.

3. **Misrepresentation of Self or Products**


- **Issue ID:** Various (e.g.,
`misrepresentation_of_self_or_products_missing_refund_policy_policy`)
- **Severity:** Critical
- **Details:** Affects listings when there are issues such as false
representation, insufficient contact info, or missing refund policies.

4. **Pending Verification Requirements**


- **Issue ID:** `pending_phone_verification`, `pending_address_and_phone`
- **Severity:** Critical
- **Description:** Business address and phone number need to be verified.

#### Important Concepts and Key Actions

- **API Calls for Account Status:**


To check the status of your account or resolve specific issues, you may need to
make an API call using the content API. Below is a sample snippet for checking
account status.

```python
import requests
# Example API endpoint for checking account status
API_ENDPOINT = 'https://content.googleapis.com/content/v2.1/accounts/accountId'
HEADERS = {'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}

response = requests.get(API_ENDPOINT, headers=HEADERS)


print(response.json())
```

- **Authorization:**
Ensure complete OAuth 2.0 setup for authorization when making API requests.
Tokens should be valid and refreshed as necessary.

- **Handling Errors:**
Always handle errors explicitly by checking response status codes and
implementing retries for rate limits when making API calls.

#### Code Examples and API Contract


- **Adding Contact Info:**
To resolve the "insufficient contact info" issue, you need to ensure your store
displays business address, phone number, and other relevant contact methods:

```python
import requests

# Sample request to update business information


API_ENDPOINT =
'https://content.googleapis.com/content/v2.1/accounts/accountId/businessInfo'
HEADERS = {'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}

data = {
"businessAddress": "123 Example St.",
"phoneNumber": "+1234567890"
}

response = requests.patch(API_ENDPOINT, json=data, headers=HEADERS)


if response.status_code == 200:
print("Business information updated successfully.")
else:
print("Error updating business information:", response.json())
```

#### Important Notes and Caveats


- **Ensure Compliance with Policies:** Always adhere to Google Merchant Center
policies to avoid account suspension. Regularly check the account status for
compliance updates.
- **Clear Return and Refund Policy:** It is imperative to have a clear refund and
return policy shown on your website to avoid issues related to misrepresentation.
- **Frequent Monitoring:** Regularly monitor the account for any issues that could
arise, particularly after updates or changes to product listings.

This summary should provide developers with a clear overview of how to interact
with the Google Merchant Center APIs and resolve common account issues with coding
examples. Always refer to the official documentation for detailed implementation
guides and updates.
_____________________________
Summary of URL: https://developers.google.com/shopping-content/guides/account-
issues#misrepresentation_of_self_or_products_insufficient_contact_info_policy:
### Summary of Google Merchant Center Account Issues through Content API for
Shopping

#### Overview
The Google Merchant Center Content API allows merchants to gather and manage data
related to their shopping accounts. It is crucial for maintaining account status
and addressing common merchant issues that may impede the use of the platform.

#### Key API Features


- **Account Issues Management**: Check the status of your Merchant account and
troubleshoot common account issues directly through API calls.

#### Common Account Issues


The following are prominent account issues and their corresponding severity from
the API documentation:

1. **Missing AdWords Link**


- Severity: Error
- Description: No Google Ads account linked. Pending link request.

2. **Merchant Quality Low**


- Severity: Error
- Description: Account not eligible for enhanced free listings.

3. **Misrepresentation of Self or Products**


- **Insufficient Contact Info Policy**
- Severity: Critical, Error
- Requirements: Display at least one contact method (address, phone, email,
contact form, or social media) ideally in the footer of the site.
- **Missing Refund Policy Policy**
- Severity: Critical, Error
- Requirements: Clearly display a return and refund policy in the same
language as the store, detailing the return process and conditions.
- **Unacceptable Business Practice Policy**
- Severity: Critical
- Requirements: Similar to above regarding contact methods.

4. **Pending Address and Phone**


- Severity: Critical
- Action Required: Verify a valid phone number for your business.

5. **Pending Phone Verification**


- Severity: Critical
- Action Required: Verify your business phone number listed on the Business
Information page.

#### Important API Functions


While specific function signatures and code snippets were not provided in the
content, here are some general actions to perform when using the API:

- **Make an API Call**:


```python
import requests

url = "https://content.googleapis.com/content/v2.1/<merchantId>/accountIssues"
headers = {"Authorization": "Bearer <your_access_token>"}
response = requests.get(url, headers=headers)
if response.status_code == 200:
print("Account Issues:", response.json())
else:
print("Error:", response.status_code)
```

#### Best Practices and Notes


- Always ensure your Merchant Center account provides adequate contact and refund
information to avoid account issues.
- Regularly check the status of your Merchant account and rectify issues as they
arise using the API endpoints.
- Follow the guidelines for displaying contact information and refund policies
clearly and accessible on your website to enhance transparency and alignment with
Google's policies.

#### Important Caveats


- Ensure that all landing pages and product pages can load properly across browsers
and aren’t under construction to comply with Google Merchant Center policies.
- Use proper naming conventions for API calls and manage your quotas and limits in
accordance with Google’s specifications.

This summary provides a targeted view of how to utilize the Content API for
Shopping to manage common account issues effectively within the Google Merchant
Center.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/products/overview:
### Overview of Google Merchant Center Content API for Shopping

The **Content API for Shopping** allows merchants to manage their product listings
and online store catalogs on Google Shopping. This API provides resources for
creating, updating, and deleting product information in a more efficient manner
compared to traditional file uploads.

#### Key Concepts

- **Products Resource**: The primary method for managing product data within the
Merchant Center. Merchants can create an online catalog of products, upload initial
product sets, and manage listings through various API calls.

- **Primary Feed**: A file used to load products into the merchant account. While
effective, using the Content API has advantages such as faster responses and real-
time updates without needing to manage multiple feeds.

- **Automatic Improvements**: Google can help maintain certain product attributes


automatically, enhancing the shopping experience without additional manual effort.

#### API Functions and Usage

- **Create, Update, and Delete Products**: Merchants have methods to:


- Upload product information to the Shopping Merchant Center database.
- Access, update, or delete product information individually or in batch mode.

**Code Example**:
Here's a simplified Python example of how to interact with the Content API:
```python
import google.auth
from googleapiclient.discovery import build

# Authenticate and initialize the API client


credentials, project = google.auth.default()
service = build('content', 'v2.1', credentials=credentials)

# Create a product
product = {
"offerId": "12345",
"title": "Sample Product",
"description": "This is a sample product description.",
"link": "http://www.example.com/sample-product",
"imageLink": "http://www.example.com/sample-product-image.jpg",
"contentLanguage": "en",
"targetCountry": "US",
"channel": "online",
"availability": "in stock",
"price": {
"value": "19.99",
"currency": "USD"
}
}

# Insert product into the Merchant Center


inserted_product = service.products().insert(merchantId='your-merchant-id',
body=product).execute()
print('Inserted Product:', inserted_product)
```

#### Important Classes and Methods

- **Product**: Represents a product in the Merchant Center. Key fields include:


- `offerId`: The unique identifier for the product.
- `title`: Title of the product.
- `link`: URL linking to the product page.
- `price`: Object containing `value` and `currency`.

##### Methods of Interest:

- **insert()**: Inserts a new product into the Merchant Center.


- **update()**: Updates existing product information.
- **delete()**: Removes a product from the Merchant Center.

#### Notes and Caveats

- **Policy Compliance**: Merchants must ensure that their product listings comply
with Google’s Shopping ads and free listings policies. Violations could result in
enforcement actions.

- **Batch Processing**: While API calls can process products individually, batch
processing enables multiple products to be updated simultaneously, which is more
efficient.

- **Latency**: There can be a delay of up to several hours for changes made through
the API to reflect in the Merchant Center database.
- **Automatic improvements** need to be enabled separately and may have specific
requirements to be effective.

### Summary
The Content API for Shopping equips merchants with the tools to effectively manage
their product listings, providing flexibility and real-time updates compared to
traditional methods. Developers should ensure compliance with policies and consider
using batch operations for efficiency. Python is the recommended language for
implementation as per the user's request.

For further details, please refer to the [official Content API documentation]
(https://developers.google.com/shopping-content/guides/products/overview).
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/products/product-id:
### Summary of Google Merchant Center Product IDs Documentation

#### Overview
The Content API for Shopping allows merchants to manage their product data in
Google Merchant Center. Understanding the various product identifiers is crucial
for effective integration and data management.

#### Key Concepts

1. **Product Identifiers**:
- **Offer ID**:
- Unique string assigned by the merchant to a product.
- Represents an individual product.
- Format: Usually a numeric sequential number.

- **REST ID**:
- Unique identifier assigned by Google for a product.
- Used in REST API calls.
- Format: `channel:contentLanguage:feedLabel:offerId`.
- Example: `online:en:label:1111111111`.

- **External Seller ID** (for Marketplaces):


- Required for offers uploaded to multi-seller accounts.
- Must meet criteria: 1-50 characters, case-sensitive, can include specific
special characters.
- Example: `example-Seller1`.

2. **Usage of IDs in API Calls**:


- **productId**: Refers to the REST ID in API calls.
- **id**: Same value as REST ID and productId, used in JSON body of products.
- **external_seller_id**: Seller identifier for multi-seller accounts.

#### API Examples

1. **Product Identifiers Table**:

| Attribute | Description
| Example | Notes
|
|------------------|---------------------------------------------------------------
-----|-------------------------------------|---------------------------------------
-----------------------------------------------|
| **offerId** | Merchant-assigned ID for the product.
| `1111111111` | Unique identifier for a product's offer.
|
| **REST ID** | Google-assigned ID in the format
`channel:contentLanguage:feedLabel:offerId`. | `online:en:label:1111111111` |
Full ID including offerId.
|
| **productId** | REST ID used in API calls.
| `online:en:label:1111111111` | Represents the product in REST API calls.
|
| **id** | Same value as REST ID and productId.
| `online:en:label:1111111111` | Used inside JSON body to refer to its
productId. |
| **external_seller_id** | Marketplace-assigned seller ID for multi-seller
accounts. | `example-Seller1` | Must be 1-50 characters and
case-sensitive. |

#### Important Notes


- Understanding the structure and purpose of each ID type is essential for
effective API usage.
- The REST ID format is crucial for correctly referencing products in API calls.
- Ensure compliance with the length and character requirements for external seller
IDs when working with marketplaces.

This information is critical for any developer working with the Google Merchant
Center APIs to successfully manage product listings, especially when integrating
with multi-seller accounts.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/products/testing:
## Summary of Testing the Products Resource | Content API for Shopping

### API Overview


The Content API for Shopping allows you to manage products in your Google Merchant
Center account. It supports adding, viewing, updating, and deleting products.

### Key API Endpoints and Usage

1. **Add a Product**
- **Endpoint**:
```
POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products
```
- **Request Body**: Construct valid JSON for a product.
- **Expected Response**: HTTP 200 status code.

2. **View a Product**
- **Endpoint**:
```
GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products/
productId
```
- **Parameters**:
- `merchantId`: Your Merchant ID.
- `productId`: The ID of the product you want to view.
- **Expected Response**: HTTP 200 status code and the JSON data for the product.

3. **Update a Product**
- **Endpoint**:
```
POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products
```
- **Request Body**: Construct new JSON for the product (e.g., changing
`availability`).
- **Expected Response**: HTTP 200 status code.
- **Note**: Wait at least five minutes to confirm changes using a GET request.

4. **Delete a Product**
- **Endpoint**:
```
DELETE
https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products/productId
```
- **Parameters**:
- `merchantId`: Your Merchant ID.
- `productId`: The ID of the product you want to delete.
- **Expected Response**: HTTP 204 status code.

### Key Concepts


- **JSON Structure**: It's essential to build the valid JSON structure for products
before making requests. Ensure fields such as `availability`, `price`, `title`,
etc., are correctly included.
- **HTTP Status Codes**: Understanding the meaning of the returned HTTP status
codes is critical for troubleshooting. A 200 status implies success, while a 204
indicates successful deletion.

### Important Notes


- Ensure you have the correct OAuth authorization to access the Content API.
- When making any updates to products, be patient and wait for a verification
period (at least five minutes) before checking if the updates were applied.
- The API relies heavily on the correct configuration of the Merchant Center
account.

This summary provides a focused overview of testing the products resource


functionality within the Content API for Shopping, aiming to assist developers in
integrating and testing API calls effectively.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/products/rich-product-data:
## Summary of Rich Product Data for Google Merchant Center API

### Overview
The Google Content API for Shopping allows developers to upload rich product data
to enhance product description pages (PDP) for improved customer experience and
product discovery. This rich data includes product features, images, variants, and
detailed descriptions, which help build customer trust and improve conversion
rates.

### Key Concepts


1. **Rich Product Data:** Refers to detailed product information including
features, images, and variants.
2. **Product ID Attributes:** Unique identifiers for products, composed of:
- **channel:** "online" or "local"
- **contentLanguage:** Two-letter language code (e.g., "en" for English)
- **feedLabel:** Country code (e.g., "US")
- **offerId:** A unique string identifier for the merchant

3. **Products Resource:** Contains attributes for product information, used while


making API calls to insert products.

### Important API Methods


- **products.insert:** Use this method to create new products with rich data.

### Sample Request for `products.insert`


Below is an example of a JSON request to upload rich product data:
```json
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/products

{
"channel": "online",
"contentLanguage": "en",
"offerId": "pixel4",
"targetCountry": "US",
"feedLabel": "US",
"title": "Google Pixel 4 64GB Unlocked Smartphone 5.7' FHD Display 6GB RAM 4G
Clear White",
"description": "The Google phone. MotionSense, an evolved camera, and the new
Google Assistant make Pixel 4 our most helpful phone yet.",
"imageLink": "https://example.com/gallery/500/image1.jpg",
"additionalImageLinks": [
"https://example.com/gallery/500/image2.jpg",
"https://example.com/gallery/500/image3.jpg"
],
"brand": "Google",
"gtin": "842776114952",
"mpn": "GA01188-US",
"price": {
"currency": "USD",
"value": "549.99"
},
"productHighlights": [
"6GB RAM lets you enjoy multitasking conveniently",
"Touch screen feature offers user friendly interface"
],
"productDetails": [
{
"sectionName": "General",
"attributeName": "Product Type",
"attributeValue": "Smartphone"
}
],
"availability": "in stock",
"condition": "new"
}
```

### Attribute Definitions


- **channel:** Specifies whether the product is for online or local sales.
- **contentLanguage:** Specifies the language used for the content.
- **title:** A detailed description of the product, aimed at helping customers
identify the product quickly.
- **description:** A rich narrative that educates customers about the product.
- **imageLink:** URL to the primary image of the product.
- **additionalImageLinks:** URLs to secondary images for enhanced viewing options.
- **gtin:** Global Trade Item Number - a unique identifier for products.
- **mpn:** Manufacturer Part Number - specifies the product's manufacturer.
- **price:** Object defining the currency and value of the product.

### Notes & Caveats


- **Default Behavior:** Calling `products.insert` replaces all existing product
data by default. To update without replacing certain data, use supplemental feeds.
- **Unique Identifiers:** GTIN is highly recommended to ensure proper product
identification. If not available, both brand and MPN must be provided.
- **Impact of Changes:** Google may modify the presentation of product highlights
and details based on GTIN matches.

By following the guide and using the provided sample request, developers can
effectively utilize the Content API for Shopping to upload rich product data to
their Google Merchant Center account.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/products/rich-product-
data#example:
# Summary of Google Merchant Center API for Rich Product Data

## Overview
The Google Merchant Center's **Content API for Shopping** allows sellers to upload
and manage their product data, including rich descriptions that enhance product
discovery and customer trust.

## Key Concepts

### Rich Product Data


Rich product data is detailed information about products, including features,
benefits, images, categories, and prices, aimed at improving shopping experiences.

### Product ID Attributes


To uniquely identify a product, the following attributes are essential:
- **channel**: "online" or "local"
- **contentLanguage**: Language code (e.g., "en" for English)
- **feedLabel**: Country code (e.g., "US")
- **offerId**: Unique identifier provided by the merchant

### JSON Request Structure


A full JSON request should include product-specific attributes, structured as
follows:

```json
{
"channel": "online",
"contentLanguage": "en",
"offerId": "pixel4",
"targetCountry": "US",
"feedLabel": "US",
"title": "Google Pixel 4 64GB Unlocked Smartphone 5.7' FHD Display 6GB RAM 4G
Clear White",
"description": "The Google phone...",
"imageLink": "https://example.com/gallery/500/image1.jpg",
"additionalImageLinks": [
"https://example.com/gallery/500/image2.jpg",
"https://example.com/gallery/500/image3.jpg"
],
"brand": "Google",
"gtin": "842776114952",
"mpn": "GA01188-US",
"productHighlights": [
"6GB RAM allows multitasking",
"Touch screen feature"
],
"productDetails": [
{
"sectionName": "General",
"attributeName": "Product Type",
"attributeValue": "Smartphone"
}
],
"availability": "in stock",
"condition": "new"
}
```

## Important Methods
- **products.insert**: Use this method to upload rich product data. This method
will replace existing product data by default unless supplemental feeds are used
for updates.

## Sample Request
Here’s an example of a request for `products.insert` to upload rich product data:

```http
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/products
{
"channel": "online",
"contentLanguage": "en",
"offerId": "pixel4",
... // Additional product attributes
}
```

**Caution**: Directly updating an existing product with `products.insert` replaces


all data. For partial updates, consider using supplemental feeds.

## Required Attributes and Their Definitions


- **gtin**: Global Trade Item Number. Required for product identification.
- **brand**: Brand name of the product.
- **mpn**: Manufacturer Part Number. Required if GTIN is not provided.
- **productHighlights**: A bulleted list summarizing key product features.
Suggested minimum: five highlights.
- **productDetails**: Detailed product specifications broken down into sections
with names, attributes, and values. Suggested minimum: six details.

## Notes
- Ensure that the provided product details match the GTIN, as Google may use this
for matching with review data.
- Maintain high-quality product images, providing multiple angles and contexts to
enhance the product description pages.

## Conclusion
Utilizing the Content API for Shopping effectively allows sellers to provide
detailed, rich product experiences that can improve search visibility and
conversion rates on Google Shopping. Ensure adherence to the structure and
requirements of the API for successful integration.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/productstatuses:
# Summary of Google Merchant Center Product Statuses API

The Product Statuses API is part of the Content API for Shopping and allows
merchants to view and manage the status of their products in Google Merchant
Center. This API provides detailed information about product approval statuses and
common issues that may affect the visibility of products.

## Key Concepts

### Product Statuses Resource


- **Purpose**: To retrieve detailed statuses of products listed in Google Merchant
Center.
- **Compliance**: Merchants must comply with Shopping Ads and Free Listings
policies outlined by Google.

### Main API Methods

1. **Get Product Status**


- **Method**: `productstatuses.get`
- **Usage**: Retrieve status of a specific product.
- **Endpoint**:
```http
GET
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/productstatuses/
{productId}?destinations={destination}&fields={fields}
```
- **Parameters**:
- `destinations`: Filter responses for specific destinations (e.g., Shopping,
ShoppingActions).
- `fields`: Specify which fields to return in the response.
- **Response Fields**:
- `kind`: Always set to "content#productStatus".
- `creationDate`: Date the product was created.
- `lastUpdateDate`: Date the product was last updated.
- `googleExpirationDate`: Expiration date of the product.
- `productId`: The product's REST ID.
- `title`: The product title.
- `link`: URL link to the product.
- `destinationStatuses`: Array of destination statuses that include:
- `destination`: Name of the destination.
- `status`: Status of the product (approved, disapproved).
- `disapprovedCountries`: List of countries where the product is
disapproved.
- `itemLevelIssues`: Common issues affecting the product.

- **Example Request**:
```http
GET
https://shoppingcontent.googleapis.com/content/v2.1/123456/productstatuses/
online:en:US:63?destinations=Shopping&fields=productId,title
```

2. **List Product Statuses**


- **Method**: `productstatuses.list`
- **Usage**: Retrieve statuses for all products in the account.
- **Endpoint**:
```http
GET
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/productstatuses?
destinations={destination}&maxResults={number}&pageToken={token}
```
- **Parameters**:
- `destinations`: Filter by destination.
- `maxResults`: Maximum number of results per page.
- `pageToken`: Token for pagination.

- **Example Request**:
```http
GET
https://shoppingcontent.googleapis.com/content/v2.1/123456/productstatuses?
destinations=Shopping&maxResults=3&pageToken=5108b52782905aa9
```

### Item-Level Issues


Each issue affecting a product includes:
- **Code**: Error code indicating the problem.
- **Servability**: Indicates if the product is disapproved or unaffected.
- **Resolution**: Suggested merchant action to resolve the issue.
- **Attribute Name**: Product attribute affected.
- **Destination**: Specific destination impacted.
- **Description & Detail**: Explain the issue further.
- **Documentation**: URL to relevant support documentation.
- **Applicable Countries**: Countries where the issue is present.

### Important Notes


- **Testing**: The `productstatuses.list` call is safe for production testing as it
does not modify data.
- **Destinations**: Understand the various product destinations:
- **Shopping**: Shopping Ads products.
- **ShoppingActions**: Buy on Google products.
- **SurfacesAcrossGoogle**: Free listings products.
- **Local Inventory Ads**: Local Inventory Ads products.

### Documentation Reference


Documentation provides additional insights into error codes, specific
implementation details, and examples to handle responses effectively. For detailed
documentation, developers can refer to the official [Google Merchant Center API
documentation](https://developers.google.com/shopping-content/guides/
productstatuses).

This summary highlights the essential functions and constructs relevant to


developers implementing Google Merchant Center's Product Statuses API.
Understanding these elements is crucial for managing product visibility and
compliance effectively.
_____________________________
Summary of URL:
https://developers.google.com/shopping-content/guides/productstatuses#destinations:
# Summary of Google Merchant Center APIs - Product Statuses

The Product Statuses API is part of the Content API for Shopping, enabling
developers to retrieve and manage product statuses for a Merchant Center account.
The following is a concise overview of key functions, code examples, and important
concepts.

## Key Concepts and Features

### Product Statuses


- The `productstatuses` resource provides detailed information about the status of
shopping products.
- Merchants must comply with Shopping ads and free listings policies to avoid
disapproval.

### Requirements for Accessing Product Statuses


1. Enroll your account in a destination.
2. Provide a valid country code in one of the following:
- `feedLabel` field
- `shipping` field
- At the feed level
- Shipping settings of the account

### Destinations
The API supports multiple destinations for shopping products:
- **Shopping Ads**: Products that appear in shopping ads.
- **Buy on Google (Shopping Actions)**: Allows purchases directly through Google
services.
- **Free Listings**: Products available in Google's free listing services.
- **Local Inventory Ads**: Local inventories of products available for sale.

## API Methods

### 1. Get a Product's Status

**Method**: `productstatuses.get`

- **Endpoint**:
```
GET
https://shoppingcontent.googleapis.com/content/v2.1/{merchantID}/productstatuses/
{productId}?destinations={destination}&fields=productId%2Ctitle
```

- **Response Fields**:
- `kind`: Always `content#productStatus`.
- `creationDate`: Date the product was created.
- `lastUpdateDate`: Date the product was last updated.
- `googleExpirationDate`: Expiration date of the product.
- `productId`: REST ID of the product.
- `title`: Title of the product.
- `link`: URL link of the product.
- `destinationStatuses`: Object detailing the product's status for each
destination and country.
- `itemLevelIssues`: List of item-specific issues affecting the product based on
the request.

**Example Request**:
```http
GET https://shoppingcontent.googleapis.com/content/v2.1/123456789/productstatuses/
online:en:US:63?destinations=Shopping&fields=productId%2Ctitle
```

### 2. List All Product Statuses

**Method**: `productstatuses.list`

- **Endpoint**:
```
GET
https://shoppingcontent.googleapis.com/content/v2.1/{merchantID}/productstatuses?
destinations={destination}&maxResults={number}&pageToken={token}
```

- **Parameters**:
- `destinations`: Specific destination to view statuses for.
- `pageToken`: Token to fetch subsequent pages.
- `maxResults`: Maximum results per page.

**Response Fields**:
- `kind`: Always `content#productstatusesListResponse`.
- `nextPageToken`: Token for the next page of results.
- `resources`: Array of `productStatus` objects containing status details for each
product.

**Example Request**:
```http
GET https://shoppingcontent.googleapis.com/content/v2.1/123456789/productstatuses?
destinations=Shopping&maxResults=3&pageToken=5108b52782905aa9
```

## Item-Level Issues
Each issue associated with a product includes:
- `code`: Error code for identifying the problem.
- `servability`: Indicates if the product is **disapproved** or **unaffected**.
- `resolution`: Suggested remediation action.
- `attributeName`: Specific attribute impacted by the issue.
- `destination`: The affected destination.
- `description`: Brief description of the problem.
- `detail`: Additional information.
- `documentation`: Link to further documentation.
- `applicableCountries`: Countries where the issue is applicable.

## Important Notes
- The `productstatuses.list` method is safe to test in production since it doesn't
modify any data.
- Ensure to follow the policies set by Google for Shopping to prevent product
disapproval.

### Additional Resources


For further details and up-to-date information, refer to the official
documentation: [Google Merchant Center
APIs](https://developers.google.com/shopping-content/guides/productstatuses#destina
tions).
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/productstatuses#item-
level_issues:
# Google Merchant Center APIs: Product Statuses Overview

The **Content API for Shopping** provides methods for accessing and managing
product statuses in Google Merchant Center. Below is a summary of key
functionalities, code examples, and important concepts relevant for developers
using Python.

## Key Concepts

1. **Product Statuses Resource**: Allows you to view the detailed status of your
Shopping products and manage item-level issues.

2. **Destinations**: The potential destinations for Shopping products include:


- `shopping`: Shopping Ads products
- `ShoppingActions`: Buy on Google products
- `surfaces across google`: Free Listings products
- `local inventory ads`: Local Inventory Ads products

3. **Item-Level Issues**: Each product can have item-level issues that detail
specific problems affecting its visibility. Key fields for these issues include:
- **code**: Identifier for the issue.
- **servability**: Indicates if the product is disapproved or unaffected.
- **resolution**: Suggests actions the merchant can take to resolve the issue.
- **documentation**: A link to further documentation on how to address the
issue.

## API Methods and Usage

### Getting a Product's Status

Use the `productstatuses.get` method to retrieve the status for a specific product.

**Endpoint:**
```http
GET
https://shoppingcontent.googleapis.com/content/v2.1/{merchantID}/productstatuses/
{productId}?destinations=Shopping&fields=productId%2Ctitle
```

**Sample JSON Response:**


```json
{
"kind": "content#productStatus",
"productId": "online:en:US:63",
"title": "Third Product",
"link": "http://examplemenc.com/",
"destinationStatuses": [
{
"destination": "Shopping",
"status": "disapproved",
"disapprovedCountries": ["US", "UK"]
}
],
"itemLevelIssues": [
{
"code": "strong_id_inaccurate",
"servability": "disapproved",
"resolution": "merchant_action",
"attributeName": "mpn",
"destination": "Shopping",
"description": "Incorrect product identifier [mpn]",
"detail": "Use the manufacturer's product identifiers (GTIN, brand, MPN)",
"documentation": "https://support.google.com/merchants/answer/160161",
"applicableCountries": ["US", "UK"]
}
],
"creationDate": "2019-02-15T20:30:15Z",
"lastUpdateDate": "2019-02-26T16:40:11Z",
"googleExpirationDate": "2019-03-28T16:40:11Z"
}
```

### Listing All Product Statuses

To get a list of all products and their statuses, use the `productstatuses.list`
method.

**Endpoint:**
```http
GET
https://shoppingcontent.googleapis.com/content/v2.1/{merchantID}/productstatuses?
destinations=Shopping&maxResults=3&pageToken=5108b52782905aa9
```

**Sample JSON Response:**


```json
{
"kind": "content#productstatusesListResponse",
"nextPageToken": "632fd090c95712c6",
"resources": [
{
"kind": "content#productStatus",
"productId": "online:en:US:online-en-US-GGL614",
"title": "Green Headphones",
"link": "https://example.com/green-headphones/",
"destinationStatuses": [
{
"destination": "Shopping",
"status": "disapproved",
"disapprovedCountries": ["US", "UK"]
}
],
"itemLevelIssues": [
{
"code": "mobile_landing_page_crawling_not_allowed",
"servability": "disapproved",
"resolution": "merchant_action",
"attributeName": "link",
"destination": "Shopping",
"description": "Mobile page not crawlable due to robots.txt",
"detail": "Update your robots.txt to allow crawling",
"documentation": "https://support.google.com/merchants/answer/6098296",
"applicableCountries": ["US"]
}
],
"creationDate": "2020-01-09T15:36:39Z",
"lastUpdateDate": "2020-01-14T19:17:02Z",
"googleExpirationDate": "2020-02-13T19:17:02Z"
}
]
}
```

### Important Notes

- Ensure that your account is enrolled in a destination and you provide a valid
country code in feed labels or shipping settings to see product statuses.
- The `productstatuses.list` method does not alter any data, making it safe to test
in production.
- Always check the item-level issues and follow documentation links for resolutions
if products are disapproved or have issues.

### Conclusion

The **Content API for Shopping** allows you to efficiently manage product statuses.
By utilizing the provided endpoints and maintaining an awareness of the item-level
issues, developers can ensure their products remain compliant and visible across
Google platforms. Always refer to the latest API documentation when implementing or
updating your integration.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/products/supplemental-feeds:
### Google Merchant Center Supplemental Feeds Documentation Summary

#### Overview
Supplemental feeds are part of the Content API for Shopping, allowing for partial
updates of product data. This feature enables requests to include only the fields
to be modified without affecting the entire product data.

#### Key Concepts

1. **Supplemental Feeds**:
- These are used for performing partial updates to existing product data.
- You can create supplemental feeds in the Merchant Center to help update
product attributes selectively.

2. **Partial Updates**:
- Only fields specified in the supplemental feed will be updated.
- The expiration date of the product will not reset when a supplemental feed is
used. To reset the expiration date, a full `Products.insert` request must be
submitted.

3. **Limitations**:
- Supplemental feeds can only update existing products; new products cannot be
created via supplemental feeds.
#### API Usage

- **API Methods**:
- **`Products.insert`**: Used for creating new products or partially updating
existing ones. When updating, include the `feedId` query parameter to specify the
supplemental feed being used.
- **`Products.delete`**: Used to delete an existing product.

#### Important Notes


- Ensure that you have set up a Merchant Center account before working with
supplemental feeds.
- The use of supplemental feeds facilitates improved organization and
categorization of products within your inventory.
- The Merchant API is the beta version of the Content API for Shopping and is
expected to enhance integration capabilities.

### Additional Information


- For information on getting started, visit the initial setup section which covers
creating a Merchant Center account and configuring the necessary client libraries.
- Be aware of Google’s guidelines and policies regarding content submission and
usage.

### Licensing
- Content on this page is licensed under the Creative Commons Attribution 4.0
License, and code samples are licensed under the Apache 2.0 License.

This summary includes aspects critical for understanding and utilizing the
supplemental feeds feature within the Google Merchant Center's API effectively. For
practical coding, focus on the `Products.insert` and `Products.delete` methods as
primary tools for managing your product listings.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/products/supplemental-feeds/
creating-supplemental-feeds:
### Summary of Creating Supplemental Feeds in Google Merchant Center using Content
API for Shopping

#### Overview
To interact with the Google Merchant Center using the Content API for Shopping, you
must create a supplemental feed. Supplemental feeds allow for additional data to
complement your primary feed, which can utilize various sources including Google
Sheets or direct upload.

#### Steps to Create Supplemental Feeds


1. **Create a Supplemental Feed in Merchant Center**:
- You cannot create supplemental feeds directly via the Content API.
- Follow the instructions in "Create a feed" and ensure you select **Content
API** as the feed source.

2. **Retrieve the `feedId`**:


- After the supplemental feed is created, retrieve its `feedId` to make Content
API calls:
- In Merchant Center, navigate to **Products > Feeds**.
- Click the feed name in the **Supplemental feeds** section, and then the
**Settings tab**.
#### Important Notes
- The primary feed you alter with the supplemental feed can have various sources.
- Ensure you have set up your Merchant Center account and prepared to authenticate
using OAuth for secure API requests.
- It is strongly recommended to be aware of quotas and limits for API usage to
avoid interruptions.

#### Code Examples & API Snippets


While specific code examples were not directly provided in the text, general REST
API usage in Python to handle feed operations would involve using the `requests`
library for sending HTTP requests.

```python
import requests

# Sample function to retrieve a supplemental feed


def get_supplemental_feed(feed_id, access_token):
url = f"https://content.googleapis.com/content/v2.1/{merchant_id}/feeds/
{feed_id}"
headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)

if response.status_code == 200:
return response.json() # Return the feed details
else:
print(f"Error: {response.status_code}, {response.text}")

# Example usage
merchant_id = 'your-merchant-id'
feed_id = 'your-feed-id'
access_token = 'your-oauth-access-token'
feed_details = get_supplemental_feed(feed_id, access_token)
print(feed_details)
```

### Key Concepts


- **Merchant Center**: The Google platform where you can manage your product
listings and data.
- **Supplemental Feeds**: Additional data feeds that enhance the core product data
provided in the primary feeds.
- **FeedId**: A unique identifier for your supplemental feeds, required for making
API requests.
- **OAuth Authentication**: A required login method for accessing Google APIs
securely.

### Caveats
- Supplemental feeds cannot be created using the Content API directly, so setup
must be completed within the Merchant Center interface first.
- Stay updated with API changes as there is a beta version of the Merchant API that
is expected to replace the current Content API in the future.

This summary provides foundational information necessary for developers to begin


integrating with the Content API for Shopping in regards to supplemental feeds
effectively.
_____________________________
Summary of URL:
https://developers.google.com/shopping-content/guides/products/supplemental-feeds/
using-supplemental-feeds:
### Google Merchant Center Supplemental Feeds - Content API for Shopping

#### Overview
Supplemental feeds allow you to make partial updates to product data in Google
Merchant Center using the Content API. These updates can overwrite existing fields
without affecting other product data.

### Key Methods

1. **products.insert (with supplemental feeds)**


- **Function**: Adds or updates product fields specified in the request.
- **URL**:
```
POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products?
feedId=feedId
```
- **Required Fields** in Request Body:
- `offerId`
- `contentLanguage`
- `feedLabel`
- `channel`
- **Example Request**:
```json
{
"offerId": "1111111111",
"contentLanguage": "en",
"feedLabel": "US",
"channel": "online",
"availability": "out of stock"
}
```
- **Important Note**: Omitting any field in subsequent requests will remove that
field from the product data. Ensure `feedId` is included; otherwise, data will be
replaced entirely.

2. **products.delete (with supplemental feeds)**


- **Function**: Deletes supplemental data associated with the specified feed
without affecting the original product data.
- **URL**:
```
DELETE
https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products/productId?
feedId=feedId
```
- **Example**: No request body needed.

3. **products.custombatch**
- **Function**: Allows batch insertion or deletion of supplemental feed data.
- **URL**:
```
POST https://shoppingcontent.googleapis.com/content/v2.1/products/batch
```
- **Required Fields** in Request Body:
- `batchId`
- `merchantId`
- `method` (either "insert" or "delete")
- `feedId`
- **Example to Insert**:
```json
{
"entries": [
{
"batchId": 1111,
"merchantId": 1234567,
"method": "insert",
"feedId": "7654321",
"product": {
"offerId": "1111111111",
"contentLanguage": "en",
"feedLabel": "US",
"channel": "online",
"price": {
"value": "30.99",
"currency": "USD"
}
}
}
]
}
```
- **Example to Delete**:
```json
{
"entries": [
{
"batchId": 1115,
"merchantId": 1234567,
"method": "delete",
"feedId": "7654321",
"productId": "online:en:US:1111111111"
}
]
}
```

### Key Concepts


- **FeedId**: Identifies the supplemental feed used for updates. It is mandatory
for all methods that modify data.
- **Supplemental Feed Behavior**: Values from the most recently created
supplemental feed take precedence if multiple feeds update the same attributes. You
can control this behavior with feed rules in the Merchant Center.

### Important Notes


- Always include the `feedId` in your requests to avoid accidentally replacing all
product data.
- When using custom batch methods, avoid mixing insertions and deletions for the
same product in one call to prevent unexpected behavior.
- Regular API call methods behave differently than those utilizing supplementary
feeds, particularly concerning how product data is overwritten.

### Summary
The Content API for Shopping enables users to create and manage supplemental feeds
for updating product data efficiently. Understanding the methods, required fields,
and behaviors associated with product data will facilitate better integration and
management of the Google Merchant Center.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/products/supplemental-feeds/
using-feed-rules:
### Summary: Using Merchant Center Feed Rules with Supplemental Feeds

**Overview:**
This documentation page introduces how to apply feed rules to supplemental feeds
within the Google Merchant Center using the Content API for Shopping. The main goal
is to enhance product data management by providing additional control and
flexibility.

#### Important Concepts:

- **Supplemental Feeds:**
- These are additional feeds that provide more granular data updates for
products.
- You can create unique feed rules for different types of supplemental data
(e.g., price, availability).

- **Feed Rules:**
- Feed rules enable more specific modifications to your product data based on the
supplemental feeds.
- **Note:** Feed rules can only be created directly in the Merchant Center; they
are not accessible via the Content API.

#### Key Notes:

- A new version of the Content API, referred to as the **Merchant API Beta**, is
available. This version promises to improve the integration experience.
- The documentation encourages users to explore feed rules for managing product
data effectively.

#### Important Caveats:

- Only supplemental feeds can utilize feed rules. Direct API calls cannot generate
or alter feed rules.

#### Additional Resources:

For comprehensive integration and coding practices, developers should refer to the
[Google Merchant API
Beta](https://developers.google.com/shopping-content/guides/products/supplemental-
feeds/using-feed-rules).

#### Recommendations for Developers:

1. **Setting Up:**
- Ensure you have a Merchant Center account and access to the Content API.

2. **Best Practices:**
- Utilize separate feed rules for each supplemental feed for better data
organization.
- Regularly check updates and improvements to the Merchant API Beta for enhanced
functionalities.

This page provides an essential guide for developers seeking to enhance product
data management through the use of supplemental feeds and feed rules in the Google
Merchant Center.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/products/feed-labels:
## Google Merchant Center API: Feed Labels

### Overview
The Google Merchant Center API facilitates management of product data, enabling
users to label and categorize products effectively within their selling accounts.
The introduction of feed labels is part of the transition to the Merchant API beta,
which improves integration and data handling.

### Key Concepts


- **Feed Labels**: Used to label your products and datafeeds. They are limited to
20 characters, and can include uppercase letters, numbers, and dashes.

- **REST ID Format**: The historical `targetCountry` field in the REST ID format


(`online:language:targetCountry:offerId`) has been replaced with `feedLabel` for
new product entries, resulting in `online:language:feedLabel:offerId`. This affects
how data is sent and retrieved.

- **Targeting Countries**: The `feedLabel` field is critical for country targeting


when inserting or updating products; either `feedLabel` or `targetCountry` must be
present, and they must match if both are provided.

### Important API Fields


- **Products Resource**:
- `feedLabel`: A field that specifies the label for products. It enables
categorization of products under specific labels.

- **Datafeeds Resource**:
- `targetCountries`: Configure explicit country targeting for datafeeds using
this field along with `feedLabel` instead of earlier country configuration methods.

### API Usage


#### Inserting or Updating Products
The API requires either `feedLabel` or `targetCountry`:
```json
{
"product": {
"title": "Sample Product",
"feedLabel": "US",
"targetCountry": "US", // Optional, must match feedLabel if provided
// Additional product fields
}
}
```

#### Example Error Handling


- If both `feedLabel` and `targetCountry` are empty, or do not match, the API
returns an error.
#### REST ID Retrieval
- Use the `get` method to retrieve products, which will always include the
`feedLabel`.

### Important Notes and Caveats


- Compatibility: If `feedLabel` is not a valid CLDR territory code, the
`targetCountry` field will remain empty; it doesn't allow products to serve in the
specified countries without valid shipping definitions.

- **UK to GB Conversion**: The UK is automatically treated as GB for targetCountry;


however, if a product has `feedLabel` as UK, it does not undergo this conversion
and should be treated as a distinct string.

- **Deprecation Notice**: The `targetCountry` field for products is deprecated in


favor of using `feedLabel` and the `shipping` field for country targeting.

### Conclusion
The transition to using feed labels in the Google Merchant Center API represents a
significant change in how products are categorized and targeted. Developers must
ensure that they are using the correct format and mindful of the deprecation of
older fields to maintain effective data management.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/products/local-inventory:
# Google Merchant Center Local Inventory API Summary

## Overview
The **Local Inventory Service** is part of the **Content API for Shopping** that
enables users to create and update local inventory instances tied to physical store
locations. This data can be used for Local surfaces across Google and Local
Inventory Ads programs.

### Key Concepts


- **Local Inventory Instances**: Created for existing local products using the
local inventory service, each instance corresponds to a specific store location.
- **Product Resource**: Each local inventory instance is a child of an existing
product resource and can inherit data like ID and description.
- **Prerequisites**: You must create and verify a Business Profile, link it to your
Merchant Center account, and ensure your account is enrolled in a local program
(Local surfaces across Google or Local inventory ads).

## Methods
### 1. `localinventory.insert`
- **Description**: Creates a local inventory instance for a single local product.
- **Request Format**:
```http
POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/products/
productId/localinventory
{
"storeCode": "1235",
"salePrice": {
"value": "100.00",
"currency": "USD"
},
"salePriceEffectiveDate": "2021-02-24T13:00-0800/2021-02-28T15:30-0800",
"quantity": 200
}
```

### 2. `localinventory.custombatch`
- **Description**: Allows the creation of multiple local inventory instances for
either a single product across multiple stores or multiple local products.

### Required Fields


- **storeCode**: Identifier for the store (required for all requests).
- **productId**: Identifier for the product (required in the URL).

### Optional Fields


- **quantity**: Stock available.
- **price**: Base price of the product.
- **salePrice**: Discounted price.
- **salePriceEffectiveDate**: Time period for the sale price.
- **availability**: Availability status (e.g., in stock).
- **pickupMethod**: Methods available for pickup.
- **pickupSla**: Service level agreement for pickup.
- **instoreProductLocation**: Physical location in the store.

For a complete list of local inventory fields, refer to the local inventory
reference page.

## Important Notes
- Local products need to be created first, either through the Content API products
service or Merchant Center data feeds by setting the channel to local before using
local inventory service.
- You cannot retrieve, list, or delete local inventory instances through the API.
They can be viewed in Merchant Center under the product’s local inventory section.
- If the Merchant Center account is not enrolled in a local program, setting a
product’s channel field to local will return an error.

## Conclusion
Utilizing the Local Inventory Service allows merchants to effectively manage in-
store inventory and promote products through Google's local advertising
initiatives. Follow the prerequisites and use the provided API methods to integrate
this functionality into your application.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/product-


collections:
# Summary of Product Collections in Content API for Shopping

## Overview
Google Merchant Center's Content API allows the management of product collections
that can be utilized with various rich formats, primarily Shoppable Images. This
beta feature introduces a new way to group products for enhanced advertisement
capabilities.

## Key Concepts
- **Product Collections**: A collection can contain up to 100 products. It helps in
organizing products for advertising formats, especially Shoppable Images.
- **Services**:
- `collections`: For getting, listing, inserting, and deleting collections.
- `collectionstatuses`: For checking the status of collections to identify
potential issues affecting their validity for ads.

## Important API Endpoints


### Creating a Collection for Shoppable Images
To create a new collection, make a POST request to the following endpoint:

### Request:
```
POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/collections
```

### Request Body:


```json
{
"id": "exampleCollection",
"language": "en",
"productCountry": "UK",
"imageLink": ["www.imageLink.example"],
"featuredProduct": [
{
"offerId": "432",
"x": 0.11,
"y": 0.99
},
{
"offerId": "433",
"x": 0.53,
"y": 0.89
}
],
"link": "www.link.example",
"mobileLink": "www.mobileLink.example",
"headline": "www.link.example",
"customLabel0": "Organize",
"customLabel1": "Your",
"customLabel2": "Bidding/Reporting",
"customLabel3": "With",
"customLabel4": "Me"
}
```
### Important Fields:
- **id**: Unique identifier for the collection.
- **language**: Language for the collection.
- **productCountry**: Country of the products.
- **imageLink**: Links to the image used for Shoppable Images.
- **featuredProduct**: Specifies the products in the image along with their
coordinates.
- **headline**: Optional field to provide additional details about the collection.

### Caveats:
- If a collection ID already exists, making a new request with the same ID will
replace the existing resource entirely.

### Checking the Status of a Collection


To check the status of a created collection, retrieve its status using:

### Request:
```
GET
https://shoppingcontent.googleapis.com/content/v2.1/merchantID/collectionstatuses/
collectionID
```

### Example Status Response:


```json
{
"id": "exampleCollection",
"creationDate": "2020-09-22T00:26:51Z",
"lastUpdateDate": "2020-09-22T00:26:51Z",
"collectionLevelIssues": [
{
"code": "invalid_url",
"servability": "unaffected",
"resolution": "merchant_action",
"attributeName": "link",
"description": "Invalid URL [link]",
"detail": "Use a complete URL starting with http:// or https://.",
"documentation": "https://support.google.com/merchants/answer/7052112"
},
{
"code": "invalid_url",
"servability": "unaffected",
"resolution": "merchant_action",
"attributeName": "imageLink",
"description": "Invalid URL [imageLink]",
"detail": "Use a complete URL starting with http:// or https://.",
"documentation": "https://support.google.com/merchants/answer/7052112"
}
]
}
```

## Important Notes:
- **Shoppable Images**:
- Configured through collections.
- Use an array for `imageLink`, but only the first value is used.
- **Coordinates**: For Shoppable Images, ensure that x and y coordinates for each
product are between 0 and 1.
- **Headlines**: While the `headline` accepts an array, only the first value is
relevant for Shoppable Images.

## Additional Resources
- For a more detailed integration with the Merchant API and to keep updated with
its future changes, refer to the provided documentation and announcements regarding
the Merchant API Beta.

This summary contains essential guidelines, code snippets, and caveats needed for
developers to effectively utilize the Product Collections feature in the Content
API for Shopping.
_____________________________

Summary of URL:
https://developers.google.com/shopping-content/guides/products/product-delivery-
time:
### Summary of Google Merchant Center Product Delivery Time API
The **Product Delivery Time** API allows shipping signals partners to set and
manage estimated delivery times for orders placed through a Merchant account. Below
are key components and usage instructions for this API.

---

#### **Key Concepts**


- **Product Delivery Time**: An estimate of the time it takes for an order to be
delivered once placed.
- **Shipping Signals Partner**: A partner that manages delivery times on behalf of
merchants. Merchants themselves cannot directly edit delivery times.
- **ProductDeliveryTime Resource**: Each instance can store multiple delivery times
for an offer, but there can only be one instance per offer.

---

#### **Important Methods**

1. **Create or Update Product Delivery Time**


- **Endpoint**:
```
POST
https://shoppingcontent.googleapis.com/content/v2.1/merchantId/productdeliverytime
```
- **Request Body**:
```json
{
"productId": {
"productId": "online:en:US:offer-id"
},
"areaDeliveryTimes": [
{
"deliveryArea": {
"countryCode": "US",
"postalCodeRange": {
"firstPostalCode": "123*",
"lastPostalCode": "456*"
}
},
"deliveryTime": {
"minHandlingTimeDays": "0",
"maxHandlingTimeDays": "1",
"minTransitTimeDays": "2",
"maxTransitTimeDays": "4"
}
},
{
"deliveryArea": {
"countryCode": "US",
"administrativeAreaCode": "NY"
},
"deliveryTime": {
"minHandlingTimeDays": "0",
"maxHandlingTimeDays": "1",
"minTransitTimeDays": "5",
"maxTransitTimeDays": "7"
}
}
]
}
```
- **Description**: Use this method to create a new delivery time or update an
existing one. All fields of `ProductDeliveryTime` must be provided, as omitted
fields will be lost.

2. **Get Delivery Time**


- **Endpoint**:
```
GET
https://shoppingcontent.googleapis.com/content/v2.1/merchantId/productdeliverytime/
productId
```
- **Usage**: Retrieve the delivery time for a specific product by providing the
`merchantId` and `productId`.

3. **Delete Product Delivery Time**


- **Endpoint**:
```
DELETE
https://shoppingcontent.googleapis.com/content/v2.1/merchantId/productdeliverytime/
productId
```
- **Usage**: Remove the delivery time associated with a product.

---

#### **Notes and Caveats**


- **Authentication**: Requests must be authenticated as your Merchant Center
account, not the merchant account being updated.
- **Limitations**: Each `ProductDeliveryTime` can have a maximum of **100
areaDeliveryTimes** entries. If a shipping signals partner tries to create, modify,
or delete a `ProductDeliveryTime` item without proper authorization, they will
encounter errors.
- **Beta Version**: This feature is part of the beta version of the Merchant API,
which represents future enhancements over the current Content API for Shopping.

---

This summary provides essential details for developing with the Google Merchant
Center APIs related to product delivery times and should serve as a quick reference
for coders working within this domain.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/promotions:


# Google Merchant Center Promotions API Summary

## Overview
The Promotions section of the Content API for Shopping allows you to showcase
special offers for products sold on Google, such as discounts or free shipping.
Promotions can appear on Google Search, Shopping, and Chrome. To utilize this
feature, you need to meet certain criteria, including having an active product feed
in the Google Merchant Center and belonging to the Promotions program.

### Key Concepts


1. **Merchant Account Requirements:**
- Active product feed in Google Merchant Center.
- Google Ads account for Shopping campaigns.
- Enrollment in the Promotions program; check the Merchant Center UI and
complete the request form if not enrolled.

2. **Promotion Creation and Management:**


- **promotions.create**: Used to create or update a promotion. The entire
promotion resource is replaced by this call, requiring all promotion details each
time.
- **promotions.get**: Used to view an existing promotion. This method is read-
only and retrieves the promotions resource using `merchantId` and the promotion ID.
- Promotions must be approved by Google before they can be displayed.

3. **Ending Promotions:**
- A promotion can be ended by updating the promotion's `timePeriod` to a past
date using the `promotions.create` method.

## API Snippets

**Create or Update a Promotion**


```http
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/promotions
```
- **Request Body**: Must include the entire promotion details.

**View an Existing Promotion**


```http
GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/promotions/
{id}
```
- **Parameters**:
- `merchantId`: ID of your Merchant account.
- `id`: ID of the promotion you want to view.

### Important Notes


- Promotions must be reviewed and approved by Google before they are displayed to
the public.
- Ensure that all required fields in the promotions resource are included in the
request to avoid data loss.

## Useful Links
- Participation criteria and policies (for enrolling in the Promotions program).
- Promotion approval process documentation (for understanding how Google reviews
promotions).

This summary provides a clear and concise overview of the Promotions functionality
within the Google Merchant Center APIs, including usage examples and important
considerations for developers.
_____________________________

Summary of URL: https://developers.google.com/shopping-content/guides/order-


tracking-signals:
### Summary of Order Tracking Signals - Content API for Shopping

#### Overview
The Order Tracking Signals feature in the Content API for Shopping allows merchants
to submit historical order tracking data to Google. This enhances product listings
by providing more accurate shipping estimates and enables free and fast shipping
annotations.

---

### Key Concepts

1. **Order Tracking Signals**: Submit historical data for completed orders to


improve shipping estimates presented to buyers.
2. **Service Structure**: The `ordertrackingsignals` service has a single `create`
endpoint to submit tracking data.
3. **Required Data Submission**:
- Only submit data for delivered orders.
- Submit one order per request with detailed order and shipping info.

---

### API Call Structure

#### Create Order Tracking Signals Data

**Endpoint:**
```
POST
https://shoppingcontent.googleapis.com/content/v2.1/merchantId/ordertrackingsignals
```

**Request Body:**
```json
{
"merchantId": "987654321",
"orderCreatedTime": {
"year": 2020,
"month": 1,
"day": 2,
"hours": 0,
"minutes": 0,
"seconds": 0,
"timeZone": { "id": "America/Los_Angeles" }
},
"orderId": "123456789",
"shippingInfo": [
{
"shipmentId": "1",
"trackingId": "100",
"carrierName": "FEDEX",
"carrierServiceName": "GROUND",
"shippedTime": {
"year": 2020,
"month": 1,
"day": 3,
"hours": 0,
"minutes": 0,
"seconds": 0,
"timeZone": { "id": "America/Los_Angeles" }
},
"shippingStatus": "DELIVERED"
}
],
"lineItems": [
{
"lineItemId": "item1",
"productId": "online:en:US:item1",
"quantity": "3"
}
],
"shipmentLineItemMapping": [
{
"shipmentId": "1",
"lineItemId": "item1",
"quantity": "1"
}
],
"customerShippingFee": {
"value": "4.5",
"currency": "USD"
},
"deliveryPostalCode": "94043",
"deliveryRegionCode": "US"
}
```

#### Update Existing Order Tracking Data


To update previously submitted order tracking data, resend the request with the
modified data while using the same `orderId`. Only the most recently submitted data
for each `orderId` will be utilized for shipping estimates.

---

### Important Notes

- **Data Submission Restrictions**: Only data for delivered orders should be


submitted.
- **Merchant ID Field**: Including the `merchant_id` in submissions is optional and
is used when submitting on behalf of another merchant. Permission must be requested
to submit as another merchant.
- **Access Request**: To request additional features or access, contact
[email protected].

---

This summary consolidates the key information and API usage for developers looking
to implement order tracking signals to enhance their merchant accounts in the
Google Merchant Center.
_____________________________

You might also like