प्रोग्राम की मदद से, Google के अलग-अलग प्लैटफ़ॉर्म पर अपने प्रॉडक्ट के प्रमोशन को कंट्रोल किया जा सकता है. साथ ही, अपने खाते की सुविधाओं को बेहतर बनाया जा सकता है.
इसका एक आम उदाहरण, मुफ़्त में दिखाई जाने वाली प्रॉडक्ट लिस्टिंग का प्रोग्राम है. इसकी मदद से, आपके ऑनलाइन स्टोर के प्रॉडक्ट, Google के अलग-अलग प्लैटफ़ॉर्म पर बिना किसी शुल्क के दिखाए जा सकते हैं.
प्रोग्राम के सब-एपीआई की मदद से, शॉपिंग के उपलब्ध सभी प्रोग्राम में अपनी भागीदारी की जानकारी पाई जा सकती है और उसे अपडेट किया जा सकता है.
प्रोग्राम की जानकारी पाने, उन्हें चालू करने, और बंद करने के लिए, इन तरीकों का इस्तेमाल किया जा सकता है:
सभी प्रोग्राम की सूची पाना
खाते के लिए सभी प्रोग्राम की जानकारी पाने के लिए, accounts.programs.list
तरीके का इस्तेमाल करें.
अनुरोध का एक उदाहरण यहां दिया गया है:
HTTP
GET https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs
cURL
curl \
'https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs?key={YOUR_API_KEY}' \
--header 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
--header 'Accept: application/json' \
--compressed
अनुरोध के पूरा होने पर मिलने वाले जवाब का एक उदाहरण यहां दिया गया है:
{
"programs": [
{
"name": "accounts/{ACCOUNT_ID}/programs/free-listings",
"documentationUri": "{URI}",
"state": "{ACCOUNT_STATE}",
"unmetRequirements": [
{
"title": "{TITLE}",
"documentationUri": "{URI}",
"affectedRegionCodes": [
"{REGION_CODE}"
]
}
]
}
]
}
किसी एक प्रोग्राम की जानकारी पाना
किसी खास प्रोग्राम की जानकारी पाने के लिए, accounts.programs.get
तरीके का इस्तेमाल करें.
अनुरोध का एक उदाहरण यहां दिया गया है:
HTTP
GET https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs/free-listings
cURL
curl \
'https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs/free-listing?key={YOUR_API_KEY}' \
--header 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
--header 'Accept: application/json' \
--compressed
अनुरोध के पूरा होने पर मिलने वाले जवाब का एक उदाहरण यहां दिया गया है:
{
"name": "accounts/{ACCOUNT_ID}/programs/free-listings",
"documentationUri": "{URI}",
"state": "{ACCOUNT_STATE}",
"unmetRequirements": [
{
"title": "{TITLE}",
"documentationUri": "{URI}",
"affectedRegionCodes": [
"{REGION_CODE}"
]
}
]
}
कोई प्रोग्राम चालू करना
खाते के लिए, बताए गए प्रोग्राम में हिस्सा लेने की सुविधा चालू करने के लिए,
accounts.programs.enable
तरीके का इस्तेमाल करें. इस अनुमति को लागू करने के लिए, आपके पास एडमिन ऐक्सेस
होना चाहिए.
अनुरोध का एक उदाहरण यहां दिया गया है:
HTTP
POST https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs/free-listings:enable
cURL
curl --request POST \
'https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs/free-listing:enable?key={YOUR_API_KEY}' \
--header 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{}' \
--compressed
अनुरोध के पूरा होने पर मिलने वाले जवाब का एक उदाहरण यहां दिया गया है:
{
"name": "accounts/{ACCOUNT_ID}/programs/free-listings",
"documentationUri": "{URI}",
"state": "{ACCOUNT_STATE}",
"unmetRequirements": [
{
"title": "{TITLE}",
"documentationUri": "{URI}",
"affectedRegionCodes": [
"{REGION_CODE}"
]
}
]
}
कोई प्रोग्राम बंद करना
खाते के लिए, बताए गए प्रोग्राम में हिस्सा लेने की सुविधा बंद करने के लिए, accounts.programs.disable
तरीके का इस्तेमाल करें. इस अनुमति को लागू करने के लिए, आपके पास एडमिन ऐक्सेस
होना चाहिए.
अनुरोध का एक उदाहरण यहां दिया गया है:
HTTP
POST https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs/free-listings:disable
cURL
curl --request POST \
'https://merchantapi.googleapis.com/accounts/v1/accounts/{ACCOUNT_ID}/programs/free-listing:disable?key={YOUR_API_KEY}' \
--header 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{}' \
--compressed
अनुरोध के पूरा होने पर मिलने वाले जवाब का एक उदाहरण यहां दिया गया है:
{
"name": "accounts/{ACCOUNT_ID}/programs/free-listings",
"documentationUri": "{URI}",
"state": "{ACCOUNT_STATE}"
}