Get started with the Merchant API

Enable the Merchant API in your Cloud project to get started.

Here's how to use the Merchant API:

Use client libraries

The Merchant API is made of multiple sub-APIs.

Each sub-API has code samples and client libraries to help you get started.

If you already use the Content API for Shopping, see Content API for Shopping compatibility.

Send requests

Merchant API uses resource names instead of IDs for identification. An example resource name for a product can be accounts/123/products/online~en~US~sku123, where 123 is the unique identifier of the account and online~en~US~sku123 is the unique identifier of the product.

To operate on a resource, send requests to URLs in the following format:

https://merchantapi.googleapis.com/{SUB_API}/{VERSION}/{RESOURCE_NAME}:{METHOD}

For example, this request will delete the regional inventory:

DELETE https://merchantapi.googleapis.com/inventories/v1beta/accounts/123/products/online~en~US~sku123/regionalInventories/456

To create a new resource, you can use the resource name of the parent resource and the following URL

POST https://merchantapi.googleapis.com/{SUB_API}/{VERSION}/{RESOURCE_NAME_OF_PARENT}/{RESOURCE}

For example, this is how you create a new region for account/123

POST https://merchantapi.googleapis.com/accounts/v1beta/accounts/123/regions

See the Merchant API reference documentation for more details on specific services.

Use gRPC or REST

The Merchant API supports gRPC and REST. Here are the two ways to make Merchant API calls:

gRPC (recommended) REST
  1. Create the body of the request as a protocol buffer.
  2. Send the request body to the server with HTTP/2.
  3. Deserialize the response to a protocol buffer.
  4. Interpret the results.
  1. Create the body of request as a JSON object.
  2. Send it to the server using HTTP 1.1.
  3. Deserialize the response as a JSON object.
  4. Interpret the results.

Get help

For information about getting support, see Get help with Merchant API.

Give feedback

The beta period gives us an opportunity to collect and address your feedback before the general availability release. To provide feedback, submit one of the following:

  • API features: Submit the feedback form
  • Documentation: Use the in-page thumb ratings and Send feedback button.
  • Samples and libraries: Use the New issue button on GitHub.

To provide general feedback after implementing each task, use the feedback form.