Review sellers using Merchant API

Seller reviews help people find businesses that offer high-quality customer experiences, helping to build trust and enabling more informed purchasing decisions. As a result, shop ratings can help businesses improve the performance of ads and organic listings and drive more qualified customers to their landing pages.

This page explains how you can manage seller reviews using Merchant API.

Prerequisites

Google needs you to provide specific information. You must have the following:

  • An active merchant review data source in the Google Merchant Center.
  • Your account must be enrolled into the store ratings program. If you are unsure whether you are already enrolled, check the Merchant Center. If you aren't enrolled, submit the request form.

Create a data source

Use the datasource.create API to create a promotion feed. If an existing Promotion feed is available, use datasource.get to fetch the datasource.name.

The form of the request is as follows:

POST https://merchantapi.googleapis.com/datasources/v1beta/accounts/{accountId}/dataSources/{dataSourceId}

Example

The example shows a typical request and response.

Request

POST https://merchantapi.googleapis.com/datasources/v1beta/accounts/123/dataSources {"displayName": "test api feed", "merchantReviewDataSource":{} }

Response

{
  "name": "accounts/123/dataSources/1000000573361824",
  "dataSourceId": "1000000573361824",
  "displayName": "test api feed",
  "merchantReviewDataSource": {},
  "input": "API"
}

Create merchant review

You can use the accounts.merchantreviews.insert method to create or update a seller review. The accounts.merchantreviews.insert method takes a merchantreview resource and a data source name as input. It returns the new or updated merchant review if successful. Creating a merchant review requires datasource.name.

The form of the request:

POST https://merchantapi.googleapis.com/reviews/v1beta/{parent=accounts/*/}merchantReviews:insert

Study the following sample merchant review for reference.

POST https://merchantapi.googleapis.com/reviews/v1beta/accounts/{accountId}/merchantReviews:insert?dataSource=accounts/{accountId}/dataSources/{dataSourceId}

  merchantReviewId = 'my_own_review'
  attributes {
    merchantId = 'merchant_id'
    merchantDisplayName = 'merchant_display_name'
    merchantLink = 'publisher_name'
    merchantRatingLink = 'https://www.google.com'
    minRating = 1
    maxRating = 10
    rating = 7.9
    title = 'Amazing Merchant'
    content = 'This is an incredible merchant'
    reviewerId = 'reviewer_id'
    reviewerUsername = 'reviewer_username'
    isAnonymous = false
    collectionMethod = 'AFTER_FULFILLMENT'
    reviewTime = '2024-04-01T00:00:00Z'
    reviewLanguage = 'en'
    reviewCountry = 'US'
  }

After merchant review creation, it may take a few minutes for the review to propagate.

View merchant reviews

To view a merchant review, use accounts.merchantreviews.get. This is read-only. It requires your merchantId and the ID of the merchant review as part of the name field. The get method returns the corresponding merchant review resource.

For example:

GET https://merchantapi.googleapis.com/reviews/v1beta/{name=accounts/*/merchantReviews/*}

List merchant reviews

You can use the merchantreviews.list method to view all created merchant reviews.

GET https://merchantapi.googleapis.com/reviews/v1beta/{parent=accounts/*}/merchantReviews

Delete merchant reviews

To delete a merchant review, use accounts.merchantreviews.delete. Similar to the get method, It requires the name field of the merchant review returned during creation.

For example:

DELETE https://merchantapi.googleapis.com/reviews/v1beta/{name=accounts/*/merchantReviews/*}

Merchant review status

The merchant review resource contains the status similar to other APIs, which is the integral part of the resource and follows the same issue & destination structure.