Programs सब-एपीआई के बारे में खास जानकारी

प्रोग्राम की मदद से, अपने प्रॉडक्ट का प्रमोशन कंट्रोल किया जा सकता है. साथ ही, 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}"
}