Stany produktów

Możesz użyć zasobu Product, aby wyświetlić szczegółowy stan swoich produktów w Zakupach Google.

Za pomocą Content API możesz pobierać stan produktu, wywołując metodę ProductStatuses.get. Za pomocą interfejsu Merchant API możesz pobierać stan produktów, pobierając zasób Accounts.Products.

Ponosisz odpowiedzialność za przestrzeganie zasad dotyczących reklam produktowych i bezpłatnych informacji. Reklamy produktowe zastrzegamy sobie prawo do egzekwowania tych zasad i odpowiedniego reagowania, jeśli zauważymy treści lub zachowania, które naruszają te zasady.

Wymagania

Aby wyświetlić stany produktów:

  • Zarejestruj konto w miejscu docelowym.
  • Podaj prawidłowy kod kraju w jednym z tych krajów:
    • Pole feedLabel.
    • Pole shipping.
    • Na poziomie pliku danych.
    • Ustawienia dostawy na Twoim koncie.

Sprawdzanie stanu produktu

Pobierz zasób Accounts.Products, aby wyświetlić stan produktu.

Oto przykładowe żądanie GET:

GET https://merchantapi.googleapis.com/products/v1beta/{name=accounts/*/products/*}

Wszystkie odpowiedzi z products.get zawierają te pola:

  • creationDate: data utworzenia produktu.
  • lastUpdateDate: data ostatniej aktualizacji produktu.
  • googleExpirationDate: data wygaśnięcia produktu.
  • destinationStatuses: planowane miejsca docelowe produktu.
  • itemLevelIssues: lista wszystkich problemów związanych z produktem.

Pole itemLevelIssues jest widoczne w odpowiedzi tylko wtedy, gdy w momencie przesłania prośby związane z produktem wystąpiły problemy na poziomie produktu.

Oto przykładowa odpowiedź JSON:

{
"name": "accounts/123/products/online~en~US~1",
"channel": "ONLINE",
"offerId": "1",
"contentLanguage": "en",
"feedLabel": "US",
"dataSource": "accounts/123/dataSources/456",
"attributes": {
  "title": "Color Headphones",
  "description": "A light and elegant design and super sound quality make these over-ear headphones a constant companion. Foldable to save space, and printed with the white Google logo on one earpiece.",
  "imageLink": "http://tmp53317.purecake.com/images/headphones.jpg",
  "availability": "in stock",
  "brand": "Google",
  "condition": "new",
  "googleProductCategory": "Electronics \u003e Audio \u003e Audio Components \u003e Headphones",
  "gtin": "00050644632143",
  "mpn": "90000007101",
  "price": {
    "amountMicros": "288000",
    "currencyCode": "USD"
  }
},
"productStatus": {
  "destinationStatuses": [
    {
      "reportingContext": "FREE_LISTINGS",
      "disapprovedCountries": [
        "US"
      ]
    }
  ],
  "itemLevelIssues": [
    {
      "code": "pending_phone_verification",
      "severity": "NOT_IMPACTED",
      "resolution": "merchant_action",
      "reportingContext": "FREE_LISTINGS",
      "description": "Unverified phone number",
      "detail": "Go to the Business information page to verify your business phone number",
      "documentation": "https://support.google.com/merchants/answer/10139041",
      "applicableCountries": [
        "US"
      ]
    },
    {
      "code": "pending_initial_policy_review_free_listings",
      "severity": "DISAPPROVED",
      "resolution": "pending_processing",
      "reportingContext": "FREE_LISTINGS",
      "description": "Pending initial review",
      "detail": "Please wait up to 3 business days for the review to be completed",
      "documentation": "https://support.google.com/merchants/answer/2948694",
      "applicableCountries": [
        "US"
      ]
    },
    {
      "code": "url_does_not_match_homepage",
      "severity": "DISAPPROVED",
      "resolution": "merchant_action",
      "attribute": "link",
      "reportingContext": "FREE_LISTINGS",
      "description": "Mismatched domains [link]",
      "detail": "Use the same domain for product landing page URLs as in your Merchant Center website setting",
      "documentation": "https://support.google.com/merchants/answer/160050",
      "applicableCountries": [
        "US"
      ]
    }
  ],
  "creationDate": "2024-05-27T16:15:31.791730Z",
  "lastUpdateDate": "2024-05-27T16:15:31.791730Z",
  "googleExpirationDate": "2024-06-26T16:15:31.791730Z"
}

Wyświetl listę wszystkich stanów produktów

W usłudze products.list możesz wyświetlić wszystkie produkty i ich stan.

Aby doprecyzować zapytanie, możesz użyć tych parametrów:

  • pageToken: służy do wyświetlania kolejnych stron wyników. Każda strona ma element nextPageToken, którego możesz użyć, aby przejść do następnej strony w sekwencji.
  • maxResults: maksymalna liczba wyników na stronę.

Oto przykładowe żądanie list z opcjonalnymi parametrami zapytania:

GET https://merchantapi.googleapis.com/products/v1beta/{parent}/products?maxResults=1&pageToken=5108b52782905aa9

Oto przykładowa odpowiedź JSON:

{
"nextPageToken": "632fd090c95712c6",
"products": [
 {
  "name": "accounts/123/products/online~en~US~1",
  "channel": "ONLINE",
  "offerId": "1",
  "contentLanguage": "en",
  "feedLabel": "US",
  "dataSource": "accounts/123/dataSources/10355371287",
  "attributes": {
    "title": "Color Headphones",
    "description": "A light and elegant design and super sound quality make these over-ear headphones a constant companion. Foldable to save space, and printed with the white Google logo on one earpiece.",
    "imageLink": "http://tmp53317.purecake.com/images/headphones.jpg",
    "availability": "in stock",
    "brand": "Google",
    "condition": "new",
    "googleProductCategory": "Electronics \u003e Audio \u003e Audio Components \u003e Headphones",
    "gtin": "00050644632143",
    "mpn": "90000007101",
    "price": {
      "amountMicros": "28800000",
      "currencyCode": "USD"
    }
  },
  "productStatus": {
    "destinationStatuses": [
      {
        "reportingContext": "FREE_LISTINGS",
        "disapprovedCountries": [
          "US"
        ]
      }
    ],
    "itemLevelIssues": [
      {
        "code": "pending_phone_verification",
        "severity": "NOT_IMPACTED",
        "resolution": "merchant_action",
        "reportingContext": "FREE_LISTINGS",
        "description": "Unverified phone number",
        "detail": "Go to the Business information page to verify your business phone number",
        "documentation": "https://support.google.com/merchants/answer/10139041",
        "applicableCountries": [
          "US"
        ]
      },
      {
        "code": "pending_initial_policy_review_free_listings",
        "severity": "DISAPPROVED",
        "resolution": "pending_processing",
        "reportingContext": "FREE_LISTINGS",
        "description": "Pending initial review",
        "detail": "Please wait up to 3 business days for the review to be completed",
        "documentation": "https://support.google.com/merchants/answer/2948694",
        "applicableCountries": [
          "US"
        ]
      },
      {
        "code": "url_does_not_match_homepage",
        "severity": "DISAPPROVED",
        "resolution": "merchant_action",
        "attribute": "link",
        "reportingContext": "FREE_LISTINGS",
        "description": "Mismatched domains [link]",
        "detail": "Use the same domain for product landing page URLs as in your Merchant Center website setting",
        "documentation": "https://support.google.com/merchants/answer/160050",
        "applicableCountries": [
          "US"
        ]
      }
    ],
    "creationDate": "2024-05-27T16:15:31.791730Z",
    "lastUpdateDate": "2024-05-27T16:15:31.791730Z",
    "googleExpirationDate": "2024-06-26T16:15:31.791730Z"
  }
]
}

Wywołanie productstatuses.list można bezpiecznie przetestować w wersji produkcyjnej, ponieważ nie wprowadza żadnych zmian w danych.

Problemy na poziomie produktu

Każdy problem na poziomie produktu zawiera te pola:

  • code: kod błędu problemu.
  • severity: wagę problemu.
  • resolution: informuje, czy sprzedawca może rozwiązać problem.
  • attribute: nazwa atrybutu, którego dotyczy zmiana.
  • reportingContext: kontekst raportowania, którego dotyczy problem.
  • description: opis problemu.
  • detail: zawiera więcej informacji o problemie.
  • documentation: adres URL dokumentacji dotyczącej problemu.
  • applicableCountries: wskazuje kraje, w których problem dotyczy produktu.