सेलर की समीक्षाओं की मदद से, लोग ऐसे कारोबार खोज सकते हैं जो ग्राहकों को बेहतर अनुभव देते हैं. इन समीक्षाओं से, लोगों का भरोसा जीतने और खरीदारी के बारे में सोच-समझकर फ़ैसला लेने में मदद मिलती है. इसलिए, स्टोर रेटिंग से कारोबारियों को विज्ञापनों और ऑर्गैनिक लिस्टिंग की परफ़ॉर्मेंस बेहतर बनाने में मदद मिल सकती है. साथ ही, अपने लैंडिंग पेजों पर ज़्यादा संभावित ग्राहकों को लाने में भी मदद मिलती है.
इस पेज पर बताया गया है कि Merchant API का इस्तेमाल करके, सेलर की समीक्षाओं को कैसे मैनेज किया जा सकता है.
ज़रूरी शर्तें
Google को आपसे कुछ खास जानकारी चाहिए. आपके पास ये चीज़ें होनी चाहिए:
- Google Merchant Center में, कारोबारी या कंपनी की समीक्षा का चालू डेटा सोर्स.
- आपका खाता, स्टोर रेटिंग प्रोग्राम में रजिस्टर होना चाहिए. अगर आपको नहीं पता कि आपने पहले से रजिस्टर किया है या नहीं, तो Merchant Center में जाकर देखें. अगर आपने अनुरोध फ़ॉर्म सबमिट नहीं किया है, तो ऐसा करें.
डेटा स्रोत बनाएं
कारोबारी या कंपनी की समीक्षाओं का फ़ीड बनाने के लिए, accounts.dataSources.create का इस्तेमाल करें. अगर कारोबारी या कंपनी की समीक्षाओं का कोई मौजूदा फ़ीड उपलब्ध है, तो dataSource.name
फ़ील्ड को फ़ेच करने के लिए, accounts.dataSources.get का इस्तेमाल करें.
अनुरोध का फ़ॉर्म इस तरह का होना चाहिए:
POST https://merchantapi.googleapis.com/datasources/v1beta/accounts/{ACCOUNT_ID} /dataSources/{DATASOURCE_ID}
उदाहरण
इस उदाहरण में, एक सामान्य अनुरोध और जवाब दिखाया गया है.
अनुरोध
POST https://merchantapi.googleapis.com/datasources/v1beta/accounts/123/dataSources {"displayName": "test api feed", "merchantReviewDataSource":{} }
रिस्पॉन्स
{
"name": "accounts/123/dataSources/1000000573361824",
"dataSourceId": "1000000573361824",
"displayName": "test api feed",
"merchantReviewDataSource": {},
"input": "API"
}
ज़्यादा जानकारी के लिए, व्यापारी/कंपनी/कारोबारी के डेटा सोर्स एपीआई की खास जानकारी देखें.
कारोबारी/कंपनी की समीक्षा करना
सेलर की समीक्षा बनाने या अपडेट करने के लिए, accounts.merchantReviews.insert
तरीका अपनाएं. accounts.merchantReviews.insert
तरीके में, इनपुट के तौर पर merchantreview
रिसॉर्स और डेटा सोर्स का नाम डालना होता है. अगर समीक्षा की प्रक्रिया पूरी हो जाती है, तो यह मर्चेंट की नई या अपडेट की गई समीक्षा दिखाता है. व्यापारी/कंपनी की समीक्षा बनाने के लिए, datasource.name
की ज़रूरत होती है.
अनुरोध का फ़ॉर्म:
POST https://merchantapi.googleapis.com/reviews/v1beta/{parent=accounts/*/}merchantReviews:insert
रेफ़रंस के लिए, कारोबारी या कंपनी की समीक्षा का यह सैंपल देखें.
POST https://merchantapi.googleapis.com/reviews/v1beta/accounts/{ACCOUNT_ID} /merchantReviews:insert?dataSource=accounts/{ACCOUNT_ID} /dataSources/{DATASOURCE_ID}
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'
}
कारोबारी या कंपनी की समीक्षा बनाने के बाद, उसे दिखने में कुछ मिनट लग सकते हैं.
कारोबारी या कंपनी को मिली समीक्षाएं देखना
कारोबारी या कंपनी की समीक्षा देखने के लिए, accounts.merchantReviews.get
का इस्तेमाल करें.
यह रीड-ओनली है. इसके लिए, नाम वाले फ़ील्ड में आपका merchantId
और व्यापारी/कंपनी की समीक्षा का आईडी डालना ज़रूरी है. get तरीका, कारोबारी की समीक्षा से जुड़ा संसाधन दिखाता है.
उदाहरण के लिए:
GET https://merchantapi.googleapis.com/reviews/v1beta/{name=accounts/*/merchantReviews/*}
किसी Merchant Center खाते के लिए एक प्रॉडक्ट को वापस पाने के लिए, यहां दिए गए सैंपल में दिखाए गए तरीके के मुताबिक, google.shopping.merchant.accounts.v1beta.GetProductRequest
का इस्तेमाल किया जा सकता है.
import com.google.api.gax.core.FixedCredentialsProvider;
import com.google.auth.oauth2.GoogleCredentials;
import com.google.shopping.merchant.products.v1beta.GetProductRequest;
import com.google.shopping.merchant.products.v1beta.Product;
import com.google.shopping.merchant.products.v1beta.ProductsServiceClient;
import com.google.shopping.merchant.products.v1beta.ProductsServiceSettings;
import shopping.merchant.samples.utils.Authenticator;
import shopping.merchant.samples.utils.Config;
/** This class demonstrates how to get a single product for a given Merchant Center account */
public class GetProductSample {
public static void getProduct(Config config, String product) throws Exception {
// Obtains OAuth token based on the user's configuration.
GoogleCredentials credential = new Authenticator().authenticate();
// Creates service settings using the credentials retrieved above.
ProductsServiceSettings productsServiceSettings =
ProductsServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(credential))
.build();
// Calls the API and catches and prints any network failures/errors.
try (ProductsServiceClient productsServiceClient =
ProductsServiceClient.create(productsServiceSettings)) {
// The name has the format: accounts/{account}/products/{productId}
GetProductRequest request = GetProductRequest.newBuilder().setName(product).build();
System.out.println("Sending get product request:");
Product response = productsServiceClient.getProduct(request);
System.out.println("Retrieved Product below");
System.out.println(response);
} catch (Exception e) {
System.out.println(e);
}
}
public static void main(String[] args) throws Exception {
Config config = Config.load();
// The name of the `product`, returned after a `Product.insert` request. We recommend
// having stored this value in your database to use for all future requests.
String product = "accounts/{datasource}/products/{productId}";
getProduct(config, product);
}
}
कारोबारी या कंपनी को मिली समीक्षाओं की सूची
कारोबारी या कंपनी की बनाई गई सभी समीक्षाएं देखने के लिए, accounts.merchantReviews.list
वाला तरीका अपनाएं.
GET https://merchantapi.googleapis.com/reviews/v1beta/accounts/{ACCOUNT_ID} /merchantReviews
कारोबारी या कंपनी की समीक्षाएं मिटाना
कारोबारी या कंपनी की समीक्षा मिटाने के लिए, accounts.merchantReviews.delete
का इस्तेमाल करें.
accounts.merchantReviews.get
तरीके की तरह ही, इस तरीके के लिए भी कारोबारी या कंपनी की समीक्षा के नाम वाले फ़ील्ड की ज़रूरत होती है. यह फ़ील्ड, समीक्षा बनाने के दौरान दिखता है.
उदाहरण के लिए:
DELETE https://merchantapi.googleapis.com/reviews/v1beta/{name=accounts/*/merchantReviews/*}
कारोबारी या कंपनी की समीक्षा की स्थिति
कारोबारी या कंपनी की समीक्षा वाले संसाधन में, अन्य एपीआई जैसा ही स्टेटस होता है. यह संसाधन का एक अहम हिस्सा है और समस्या और डेस्टिनेशन के एक ही स्ट्रक्चर का पालन करता है.