प्रोग्राम की मदद से, अपने प्रॉडक्ट के प्रमोशन को कंट्रोल किया जा सकता है. साथ ही, Google के अलग-अलग प्लैटफ़ॉर्म पर अपने खाते की सुविधाओं को बेहतर बनाया जा सकता है.
इसका एक उदाहरण मुफ़्त में दिखाई जाने वाली प्रॉडक्ट लिस्टिंग प्रोग्राम है. इसकी मदद से, आपके ऑनलाइन स्टोर के प्रॉडक्ट Google के सभी प्लैटफ़ॉर्म पर बिना किसी शुल्क के दिखाए जा सकते हैं.
Programs sub-API की मदद से, उपलब्ध सभी शॉपिंग प्रोग्राम में अपनी भागीदारी की जानकारी हासिल की जा सकती है और उसे अपडेट किया जा सकता है.
प्रोग्राम को वापस पाने, चालू करने, और बंद करने के लिए, इन तरीकों का इस्तेमाल किया जा सकता है:
सभी प्रोग्राम की सूची बनाएं
खाते के सभी प्रोग्राम की जानकारी पाने के लिए, 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}"
}