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