Test your code

To test code that uses the Content API for Shopping, we suggest creating a separate Merchant Center account devoted solely to testing. This lets you run both manual and automated tests for code that uses the Content API for Shopping without impacting active feeds or Shopping campaigns.

Set up your test environment

  1. Create a new Google account that will be associated with the Merchant Center account. Sign in to and use the new Google account for the following steps.

  2. Follow the steps in Getting Started to set up a new Merchant Center account. You don't need to validate the website URL for the testing account.

  3. Create a new developer project in the API Console, and enable the Content API for Shopping for that project.

  4. Create appropriate credentials for the code you plan to test. For test code, we suggest you use the service account flow described in the Service Accounts guide for your testing framework to avoid having to deal with requesting permission, access tokens, and refresh tokens.

With your new Merchant Center account and credentials, you should be ready to test your code with the Content API for Shopping. If you're just getting started with the Content API, read the Getting Started guide to learn how to use your test environment with the Python client library, or visit our Samples and Libraries page, where you can find code examples with which you can test your new test environment.

The API will still perform validation checks, which provide feedback to common errors such as missing required fields, but data quality checks won't be performed, as any uploaded products will be automatically disapproved.