Merchant API का इस्तेमाल करने के लिए, आपके पास Merchant Center खाता होना चाहिए. इसे बनाने के लिए, Merchant Center के यूज़र इंटरफ़ेस (यूआई) का इस्तेमाल किया जा सकता है.
अगर आपको एक से ज़्यादा खाते मैनेज करने हैं, तो Merchant API का इस्तेमाल करके उप-खाते बनाए जा सकते हैं.
Merchant Center के यूज़र इंटरफ़ेस (यूआई) में या एपीआई के ज़रिए, अपने खाते को कॉन्फ़िगर किया जा सकता है. इसके बारे में आगे बताया गया है.
Merchant Center की सेवा की शर्तें स्वीकार करना
सभी व्यापारियों/कंपनियों को Merchant Center की सेवा की शर्तें स्वीकार करनी होंगी. अपने Merchant Center खाते के लिए, सेवा की शर्तें स्वीकार करने का तरीका यहां बताया गया है:
आपके खाते के लिए सेवा की कौनसी शर्तें ज़रूरी हैं, यह जानने के लिए
accounts.termsOfServiceAgreementStates.retrieveForApplication
पर कॉल करें.अनुरोध का सैंपल यहां दिया गया है:
GET https://merchantapi.googleapis.com/accounts/v1beta/accounts/{ACCOUNT_ID}/termsOfServiceAgreementStates:retrieveForApplication
यहां किसी कॉल के सही तरीके से पूरा होने पर मिलने वाले जवाब का सैंपल दिया गया है:
{ "name": "accounts/{ACCOUNT_ID}/termsOfServiceAgreementStates/MERCHANT_CENTER-{COUNTRY}", "regionCode": {COUNTRY}, "termsOfServiceKind": "MERCHANT_CENTER", "accepted": { "termsOfService": "termsOfService/{VERSION}", "acceptedBy": "accounts/{ACCOUNT_ID}" } }
सेवा की शर्तें स्वीकार करने के लिए,
termsOfService.accept
पर कॉल करें.अनुरोध का सैंपल यहां दिया गया है:
GET https://merchantapi.googleapis.com/accounts/v1beta/{name=termsOfService/{VERSION}}:accept
अगर अनुरोध पूरा हो जाता है, तो रिस्पॉन्स बॉडी खाली होगा.
हमारा सुझाव है कि आप ऐसा यूज़र इंटरफ़ेस (यूआई) बनाएं जिसमें व्यापारी/कंपनी को सेवा की शर्तें दिखाई जा सकें और उनसे उन्हें स्वीकार करने के लिए कहा जा सके.
कारोबार के
regionCode
के साथtermsOfService.retrieveLatest
का इस्तेमाल करके, वह सेवा की शर्तें ढूंढें जिन्हें व्यापारी/कंपनी को स्वीकार करना होगा.अनुरोध का सैंपल यहां दिया गया है:
GET https://merchantapi.googleapis.com/accounts/v1beta/termsOfService:retrieveLatest
यहां किसी कॉल के सही तरीके से पूरा होने पर मिलने वाले जवाब का सैंपल दिया गया है:
{ "name": "termsOfService/{VERSION}", "regionCode": "{COUNTRY}", "kind": "MERCHANT_CENTER", "fileUri": "{URI}" }
व्यापारी/कंपनी को
fileUri
के नियम और शर्तें दिखाएं.जब व्यापारी/कंपनी आपके यूज़र इंटरफ़ेस (यूआई) में, सेवा की शर्तों को स्वीकार कर लेता है, तो स्वीकार करने के लिए,
termsOfService.accept
के साथ सेवा की शर्तों केname
को कॉल करें.
यहां एक सैंपल दिया गया है. इसका इस्तेमाल करके, किसी खाते के लिए सेवा की शर्तों का समझौता स्वीकार किया जा सकता है:
Python
from examples.authentication import configuration
from examples.authentication import generate_user_credentials
from google.shopping.merchant_accounts_v1beta import AcceptTermsOfServiceRequest
from google.shopping.merchant_accounts_v1beta import TermsOfServiceServiceClient
# Replace with your actual values.
_ACCOUNT_ID = configuration.Configuration().read_merchant_info()
_TOS_VERSION = ( # Replace with the Terms of Service version to accept
"VERSION_HERE"
)
_REGION_CODE = "US" # Replace with the region code
def accept_terms_of_service():
"""Accepts the Terms of Service agreement for a given account."""
credentials = generate_user_credentials.main()
client = TermsOfServiceServiceClient(credentials=credentials)
# Construct the request
request = AcceptTermsOfServiceRequest(
name=f"termsOfService/{_TOS_VERSION}",
account=f"accounts/{_ACCOUNT_ID}",
region_code=_REGION_CODE,
)
try:
print("Sending request to accept terms of service...")
client.accept_terms_of_service(request=request)
print("Successfully accepted terms of service.")
except RuntimeError as e:
print(e)
if __name__ == "__main__":
accept_terms_of_service()
कारोबारी या कंपनी के कानूनी समझौते को स्वीकार करने के बाद, Merchant API का इस्तेमाल करके, उसके खाते की बाकी जानकारी सेट अप की जा सकती है. Merchant Center खाते की कौनसी जानकारी, Merchant Center खाते के एपीआई की मदद से मैनेज की जा सकती है, इस बारे में जानने के लिए Account
संसाधन देखें.
अपनी वेबसाइट के यूआरएल पर दावा करना
Merchant Center खाते के एपीआई का इस्तेमाल करके, अपने कारोबार का Homepage
जोड़ा जा सकता है और उस पर दावा किया जा सकता है.
- अपने खाते में होम पेज जोड़ने के लिए,
accounts.updateHomepage
को कॉल करें. साथ ही, उसHomepage
संसाधन का इस्तेमाल करें जिसमें आपके होम पेज का यूआरएल शामिल हो. - होम पेज के मालिकाना हक पर दावा करने के लिए, अपने
Hompeage
संसाधन केname
का इस्तेमाल करके,accounts.homepage.claim
को कॉल करें.
अपने होम पेज की पुष्टि करने के लिए, Merchant API का इस्तेमाल नहीं किया जा सकता. ज़्यादा जानकारी के लिए, अपने स्टोर की वेबसाइट की पुष्टि करना और उस पर दावा करना लेख पढ़ें.
अपने कारोबार की जानकारी अपडेट करना
Merchant Center खाते में मौजूद अपने कारोबार की जानकारी में बदलाव करने के लिए, Merchant Center API का इस्तेमाल किया जा सकता है. जैसे, PostalAddress
,
CusomerService
,
और
BusinessIdentity
.
कारोबार की पहचान:
- अपने कारोबार की पहचान देखने के लिए,
accounts.businessIdentity.getBusinessIdentity
पर कॉल करें. - अपने कारोबार की पहचान में बदलाव करने के लिए,
accounts.businessIdentity.updateBusinessIdentity
पर कॉल करें.
आगे क्या करना है
- सब-खाते बनाने और मैनेज करने का तरीका जानें.
- व्यापारी/कंपनी/कारोबारी के खातों के बीच के संबंधों के काम करने का तरीका जानने के लिए, खातों के बीच के संबंध देखें.