The Merchant API and Content API for Shopping allow you to interact directly with Merchant Centre, vastly increasing the efficiency of managing large or complex Merchant Centre accounts. They both enable programmatic access to complex account structures, product data management, insights and other capabilities to power organic and Shopping ads experiences on Google, while being a complementary interface to the Merchant Centre platform.
Debug API errors
Errors with your API requests can prevent your shop from managing your presence on Google and from reaching online customers. To diagnose and fix errors with your API requests, access the 'API diagnostics' tab, which allows you to:
- View all the successful and failed API requests for a selected time period
- Determine the number of successful and failed requests per API version, service, method
- Review examples of failed requests
API diagnostics
Errors from your API requests may prevent your products from showing on Google. Follow the directions below to review these errors:
- In your Merchant Centre account, navigate to Settings
in the left navigation menu, then select API diagnostics.
- From here, you can monitor, diagnose and fix errors with your API requests. You can also determine which methods cause critical errors across API versions.
Review API requests
There are two main parts of the API diagnostics tab:
- A timeline graph that shows the number of successful and failed API requests for a specific time period
- A table that shows the total API requests and the number of failed API requests
To review API requests:
- In your Merchant Centre account, select Settings
in the left navigation menu, then select API diagnostics.
- Use the 'Time period' filter to specify the time period.
- Use the filter bar at the top of the page to specify the API service request (for example, products with the 'Insert' method) that you want to review. Both the table and the timeline update to show the specific API service request.
View failed API requests
When the table displays the results for your selected data range, you can browse through the listed services and methods to quickly determine the causes of the failed API requests. By default, the errors are listed by service name, but you can change the sort order by selecting a column header.
To view the failed requests:
- In your Merchant Centre account, select Settings
in the left navigation menu, then select API diagnostics.
- Go to the 'Errors/Impacted API calls' column in the 'Details of your API calls' table, and select Show more to view more details of your error message.
- Use the error message as a guideline to fix failed API requests.