Übersicht über die Programs-Unter-API

Mit Programmen können Sie die Werbung für Ihre Produkte steuern und die Funktionen Ihres Kontos auf verschiedenen Google-Plattformen verbessern.

Ein typisches Beispiel dafür ist das Programm für kostenlose Produkteinträge, mit dem Produkte aus Ihrem Onlineshop kostenlos auf Google präsentiert werden können.

Mit der Unter-API „Programs“ können Sie Ihre Teilnahme an allen verfügbaren Shopping-Programmen abrufen und aktualisieren.

Verwenden Sie die folgenden Methoden, um Programme abzurufen, zu aktivieren und zu deaktivieren:

Alle Programme auflisten

Verwenden Sie die accounts.programs.list Methode, um alle Programme für das Konto abzurufen.

Ein Beispiel für eine Anfrage:

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

Ein Beispiel für eine Antwort auf eine erfolgreiche Anfrage:

{
  "programs": [
    {
      "name": "accounts/{ACCOUNT_ID}/programs/free-listings",
      "documentationUri": "{URI}",
      "state": "{ACCOUNT_STATE}",
      "unmetRequirements": [
        {
          "title": "{TITLE}",
          "documentationUri": "{URI}",
          "affectedRegionCodes": [
            "{REGION_CODE}"
          ]
        }
      ]
    }
  ]
}

Einzelnes Programm abrufen

Verwenden Sie die accounts.programs.get Methode, um ein bestimmtes Programm abzurufen.

Ein Beispiel für eine Anfrage:

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

Ein Beispiel für eine Antwort auf eine erfolgreiche Anfrage:

{
  "name": "accounts/{ACCOUNT_ID}/programs/free-listings",
  "documentationUri": "{URI}",
  "state": "{ACCOUNT_STATE}",
  "unmetRequirements": [
    {
      "title": "{TITLE}",
      "documentationUri": "{URI}",
      "affectedRegionCodes": [
        "{REGION_CODE}"
      ]
    }
  ]
}

Programm aktivieren

Verwenden Sie die accounts.programs.enable Methode, um die Teilnahme am angegebenen Programm für das Konto zu aktivieren. Sie benötigen Administratorzugriff um diese Berechtigung auszuführen.

Ein Beispiel für eine Anfrage:

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

Ein Beispiel für eine Antwort auf eine erfolgreiche Anfrage:

{
  "name": "accounts/{ACCOUNT_ID}/programs/free-listings",
  "documentationUri": "{URI}",
  "state": "{ACCOUNT_STATE}",
  "unmetRequirements": [
    {
      "title": "{TITLE}",
      "documentationUri": "{URI}",
      "affectedRegionCodes": [
        "{REGION_CODE}"
      ]
    }
  ]
}

Programm deaktivieren

Verwenden Sie die accounts.programs.disable Methode, um die Teilnahme am angegebenen Programm für das Konto zu deaktivieren. Sie benötigen Administratorzugriff um diese Berechtigung auszuführen.

Ein Beispiel für eine Anfrage:

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

Ein Beispiel für eine Antwort auf eine erfolgreiche Anfrage:

{
  "name": "accounts/{ACCOUNT_ID}/programs/free-listings",
  "documentationUri": "{URI}",
  "state": "{ACCOUNT_STATE}"
}